Mantid
Loading...
Searching...
No Matches
MantidTreeModel.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8//----------------------------------
9// Includes
10//----------------------------------
14
15#include <QHash>
16#include <QObject>
17
18//----------------------------------
19// Forward declarations
20//----------------------------------
21
22namespace MantidQt {
23namespace MantidWidgets {
24
25class MantidWSIndexDialog;
26
36 Q_OBJECT
37
38public:
41
42 // Data display and saving methods
43 void updateRecentFilesList(const QString &fname) override;
44 void deleteWorkspaces(const QStringList &wsNames = QStringList()) override;
45
46 // Algorithm Display and Execution Methods
47 Mantid::API::IAlgorithm_sptr createAlgorithm(const QString &algName, int version = -1) override;
48
49 bool executeAlgorithmAsync(Mantid::API::IAlgorithm_sptr alg, const bool wait = false) override;
50
51 Mantid::API::Workspace_const_sptr getWorkspace(const QString &workspaceName) override;
52 QWidget *getParent() override;
53
54 MantidQt::API::AlgorithmDialog *createAlgorithmDialog(const Mantid::API::IAlgorithm_sptr &alg);
55
56 // Plotting Methods
57 MultiLayer *plotSubplots(const QMultiMap<QString, std::set<int>> &toPlot,
59 MultiLayer *plotWindow = nullptr) override;
60
61public slots:
62 // Data display and saving methods
63 void enableSaveNexus(const QString &wsName) override;
64 void disableSaveNexus() override;
65 void importWorkspace() override;
66
67 MantidMatrix *importMatrixWorkspace(const Mantid::API::MatrixWorkspace_sptr workspace, int lower = -1, int upper = -1,
68 bool showDlg = true) override;
69
70 void importWorkspace(const QString &wsName, bool showDlg = true, bool makeVisible = true) override;
71
72 void showMantidInstrumentSelected() override;
73 Table *createDetectorTable(const QString &wsName, const std::vector<int> &indices,
74 bool include_data = false) override;
75 void importBoxDataTable() override;
76 void showListData() override;
77 void importTransposed() override;
78 void renameWorkspace(QStringList /*unused*/ = QStringList()) override;
79
80 // Algorithm Display and Execution Methods
81 void showAlgorithmDialog(const QString &algName, int version = -1) override;
82 void showAlgorithmDialog(const QString &algName, QHash<QString, QString> paramList,
83 Mantid::API::AlgorithmObserver *obs = nullptr, int version = -1) override;
84 void executeAlgorithm(Mantid::API::IAlgorithm_sptr alg) override;
85
86 // Plotting Methods
87 MultiLayer *plot1D(const QMultiMap<QString, std::set<int>> &toPlot, bool spectrumPlot,
89 MultiLayer *plotWindow = nullptr, bool clearWindow = false, bool waterfallPlot = false,
90 const QString &log = "", const std::set<double> &customLogValues = std::set<double>()) override;
91
92 void drawColorFillPlots(const QStringList &wsNames,
94
95 void showMDPlot() override;
96
97 void plotSurface(bool accepted, int plotIndex, const QString &axisName, const QString &logName,
98 const std::set<double> &customLogValues, const QList<QString> &workspaceNames) override;
99
100 void plotContour(bool accepted, int plotIndex, const QString &axisName, const QString &logName,
101 const std::set<double> &customLogValues, const QList<QString> &workspaceNames) override;
102
103 // Inteface methods
104 // ONLY REQUIRED TO STATIFY MantidDisplayBase INTERFACE
105 void showSpectrumViewer() override;
106 void showSliceViewer() override;
107 void showLogFileWindow() override;
108 void showSampleMaterialWindow() override;
109 void showAlgorithmHistory() override;
110
111 MantidQt::MantidWidgets::MantidWSIndexDialog *createWorkspaceIndexDialog(int flags, const QStringList &wsNames,
112 bool showWaterfall, bool showPlotAll,
113 bool showTiledOpt,
114 bool isAdvanced = false) override;
115
116 void updateProject() override;
117 void showCritical(const QString & /*unused*/) override;
118
119private:
120 // overide copy operations
123};
124} // namespace MantidWidgets
125} // namespace MantidQt
#define EXPORT_OPT_MANTIDQT_COMMON
Definition: DllOption.h:15
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
double lower
lower and upper bounds on the multiplier, if known
double upper
This class should be the basis for all customised algorithm dialogs.
MantidTreeModel(const MantidTreeModel &)
MantidTreeModel & operator=(const MantidTreeModel &)
Observes Algorithm notifications: start,progress,finish,error.
CurveType
Graph curve type.
Definition: GraphOptions.h:28
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...
std::shared_ptr< IAlgorithm > IAlgorithm_sptr
shared pointer to Mantid::API::IAlgorithm
std::shared_ptr< const Workspace > Workspace_const_sptr
shared pointer to Mantid::API::Workspace (const version)
Definition: Workspace_fwd.h:22
void renameWorkspace(const IAlgorithm_sptr &renamer, const Workspace_sptr &workspace, const std::string &newName)
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class