IndirectInterface.cpp 1.71 KB
Newer Older
1
2
3
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI,
4
5
//   NScD Oak Ridge National Laboratory, European Spallation Source,
//   Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6
7
8
// SPDX - License - Identifier: GPL - 3.0 +
#include "IndirectInterface.h"

9
#include "MantidQtWidgets/Common/HelpWindow.h"
10
#include "MantidQtWidgets/Common/InterfaceManager.h"
11
12
13

using namespace MantidQt::API;

14
15
16
17
namespace MantidQt {
namespace CustomInterfaces {

IndirectInterface::IndirectInterface(QWidget *parent)
18
    : UserSubWindow(parent),
19
      m_settings(dynamic_cast<IndirectSettings *>(
20
          InterfaceManager().createSubWindow("Settings", this))) {
21
22
23
24
25
26
27

  connect(m_settings.get(), SIGNAL(applySettings()), this,
          SLOT(applySettings()));
}

void IndirectInterface::help() {
  HelpWindow::showCustomInterface(nullptr,
28
                                  QString::fromStdString(documentationPage()),QString("indirect"));
29
30
31
32
}

void IndirectInterface::settings() {
  m_settings->loadSettings();
33
  m_settings->setWindowModality(Qt::WindowModal);
34
  m_settings->show();
35
36
37
38
39
40
41
}

void IndirectInterface::applySettings() {
  applySettings(getInterfaceSettings());
}

void IndirectInterface::applySettings(
Robert Applin's avatar
Robert Applin committed
42
    std::map<std::string, QVariant> const &settings) {
43
44
45
46
47
48
49
50
51
  UNUSED_ARG(settings);
}

std::map<std::string, QVariant>
IndirectInterface::getInterfaceSettings() const {
  return m_settings->getSettings();
}

void IndirectInterface::manageUserDirectories() {
52
  ManageUserDirectories::openManageUserDirectories();
53
54
55
56
57
}

void IndirectInterface::showMessageBox(QString const &message) {
  showInformationBox(message);
}
58
59
60

} // namespace CustomInterfaces
} // namespace MantidQt