-
Notifications
You must be signed in to change notification settings - Fork 122
/
IndirectDataReductionTab.h
108 lines (85 loc) · 3.62 KB
/
IndirectDataReductionTab.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#ifndef MANTID_CUSTOMINTERFACES_INDIRECTDATAREDUCTIONTAB_H_
#define MANTID_CUSTOMINTERFACES_INDIRECTDATAREDUCTIONTAB_H_
#include "MantidAPI/AlgorithmManager.h"
#include "MantidAPI/AnalysisDataService.h"
#include "MantidKernel/System.h"
#include "MantidQtAPI/AlgorithmRunner.h"
#include "MantidQtAPI/BatchAlgorithmRunner.h"
#include "MantidQtAPI/PythonRunner.h"
#include "MantidQtAPI/QwtWorkspaceSpectrumData.h"
#include "MantidQtCustomInterfaces/IndirectDataReduction.h"
#include "MantidQtCustomInterfaces/IndirectTab.h"
#include "MantidQtMantidWidgets/RangeSelector.h"
#include <QDoubleValidator>
#include <QMap>
#include <QtIntPropertyManager>
#include <QtTreePropertyBrowser>
#include <qwt_plot.h>
#include <qwt_plot_curve.h>
// Suppress a warning coming out of code that isn't ours
#if defined(__INTEL_COMPILER)
#pragma warning disable 1125
#elif defined(__GNUC__)
#if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 6 )
#pragma GCC diagnostic push
#endif
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#endif
#include "DoubleEditorFactory.h"
#if defined(__INTEL_COMPILER)
#pragma warning enable 1125
#elif defined(__GNUC__)
#if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 6 )
#pragma GCC diagnostic pop
#endif
#endif
namespace MantidQt
{
namespace CustomInterfaces
{
/** IndirectDataReductionTab
This class defines common functionality of tabs used in the Indirect Data Reduction interface.
@author Samuel Jackson
@date 13/08/2013
Copyright © 2013 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory
This file is part of Mantid.
Mantid is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
Mantid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
File change history is stored at: <https://github.com/mantidproject/mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport IndirectDataReductionTab : public IndirectTab
{
Q_OBJECT
public:
IndirectDataReductionTab(Ui::IndirectDataReduction& uiForm, QObject * parent = 0);
virtual ~IndirectDataReductionTab();
public slots:
void runTab();
protected:
Mantid::API::MatrixWorkspace_sptr loadInstrumentIfNotExist(std::string instrumentName, std::string analyser="", std::string reflection="");
/// Get information about the operation modes of an indirect instrument
std::vector<std::pair<std::string, std::vector<std::string> > > getInstrumentModes(std::string instrumentName);
/// Function to get details about the instrument configuration defined on C2E tab
std::map<QString, QString> getInstrumentDetails();
std::map<std::string, double> getRangesFromInstrument(QString instName = "", QString analyser = "", QString reflection = "");
Ui::IndirectDataReduction m_uiForm;
signals:
/// Update the Run button on the IDR main window
void updateRunButton(bool enabled = true, QString message = "Run", QString tooltip = "");
private:
bool m_tabRunning;
private slots:
void tabExecutionComplete(bool error);
};
} // namespace CustomInterfaces
} // namespace Mantid
#endif /* MANTID_CUSTOMINTERFACES_INDIRECTDATAREDUCTIONTAB_H_ */