Mantid
Loading...
Searching...
No Matches
MantidDisplayBase.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2016 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
11#include "MantidKernel/System.h"
14#include <QStringList>
15#include <map>
16#include <set>
17#include <string>
18#include <unordered_map>
19#include <vector>
20
21template <class Key, class T> class QHash;
22template <class Key, class T> class QMultiMap;
23template <class T> class QList;
24class QString;
25class QWidget;
26class Table;
27class MultiLayer;
28class MantidMatrix;
29
30namespace MantidQt {
31namespace MantidWidgets {
32
33class MantidWSIndexDialog;
34
44public:
45 virtual ~MantidDisplayBase() = default;
46
47 // Data display and saving methods
48 virtual void updateRecentFilesList(const QString &fname) = 0;
49 virtual void enableSaveNexus(const QString &wsName) = 0;
50 virtual void disableSaveNexus() = 0;
51 virtual void deleteWorkspaces(const QStringList &wsNames = QStringList()) = 0;
52 virtual void importWorkspace() = 0;
54 int upper = -1, bool showDlg = true) = 0;
55 virtual void importWorkspace(const QString &wsName, bool showDlg = true, bool makeVisible = true) = 0;
56 virtual void renameWorkspace(QStringList = QStringList()) = 0;
57 virtual void showMantidInstrumentSelected() = 0;
58 virtual Table *createDetectorTable(const QString &wsName, const std::vector<int> &indices,
59 bool include_data = false) = 0;
60 virtual void importBoxDataTable() = 0;
61 virtual void showListData() = 0;
62 virtual void importTransposed() = 0;
63
64 // Algorithm Display and Execution Methods
65 virtual Mantid::API::IAlgorithm_sptr createAlgorithm(const QString &algName, int version = -1) = 0;
66 virtual void showAlgorithmDialog(const QString &algName, int version = -1) = 0;
67 virtual void showAlgorithmDialog(const QString &algName, QHash<QString, QString> paramList,
68 Mantid::API::AlgorithmObserver *obs = nullptr, int version = -1) = 0;
70 virtual bool executeAlgorithmAsync(Mantid::API::IAlgorithm_sptr alg, const bool wait = false) = 0;
71
72 virtual Mantid::API::Workspace_const_sptr getWorkspace(const QString &workspaceName) = 0;
73
74 virtual QWidget *getParent() = 0;
75
76 // Plotting Methods
77 virtual MultiLayer *plot1D(const QMultiMap<QString, std::set<int>> &toPlot, bool spectrumPlot,
79 MultiLayer *plotWindow = nullptr, bool clearWindow = false, bool waterfallPlot = false,
80 const QString &log = "", const std::set<double> &customLogValues = std::set<double>()) = 0;
81 virtual void drawColorFillPlots(const QStringList &wsNames,
83 virtual void showMDPlot() = 0;
84 virtual MultiLayer *plotSubplots(const QMultiMap<QString, std::set<int>> &toPlot,
86 MultiLayer *plotWindow = nullptr) = 0;
87 virtual void plotSurface(bool accepted, int plotIndex, const QString &axisName, const QString &logName,
88 const std::set<double> &customLogValues, const QList<QString> &workspaceNames) = 0;
89 virtual void plotContour(bool accepted, int plotIndex, const QString &axisName, const QString &logName,
90 const std::set<double> &customLogValues, const QList<QString> &workspaceNames) = 0;
91
92 // Interface Methods
93 virtual void showSpectrumViewer() = 0;
94 virtual void showSliceViewer() = 0;
95 virtual void showLogFileWindow() = 0;
96 virtual void showSampleMaterialWindow() = 0;
97 virtual void showAlgorithmHistory() = 0;
98
99 virtual MantidWSIndexDialog *createWorkspaceIndexDialog(int flags, const QStringList &wsNames, bool showWaterfall,
100 bool showPlotAll, bool showTiledOpt,
101 bool isAdvanced = false) = 0;
102
103 virtual void updateProject() = 0;
104 virtual void showCritical(const QString & /*unused*/) {}
105};
106} // namespace MantidWidgets
107} // namespace MantidQt
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
#define DLLExport
Definitions of the DLLImport compiler directives for MSVC.
Definition: System.h:53
double lower
lower and upper bounds on the multiplier, if known
double upper
virtual void deleteWorkspaces(const QStringList &wsNames=QStringList())=0
virtual void showCritical(const QString &)
virtual MantidWSIndexDialog * createWorkspaceIndexDialog(int flags, const QStringList &wsNames, bool showWaterfall, bool showPlotAll, bool showTiledOpt, bool isAdvanced=false)=0
virtual bool executeAlgorithmAsync(Mantid::API::IAlgorithm_sptr alg, const bool wait=false)=0
virtual void executeAlgorithm(Mantid::API::IAlgorithm_sptr alg)=0
virtual MultiLayer * plot1D(const QMultiMap< QString, std::set< int > > &toPlot, bool spectrumPlot, MantidQt::DistributionFlag distr=MantidQt::DistributionDefault, bool errs=false, MultiLayer *plotWindow=nullptr, bool clearWindow=false, bool waterfallPlot=false, const QString &log="", const std::set< double > &customLogValues=std::set< double >())=0
virtual void plotSurface(bool accepted, int plotIndex, const QString &axisName, const QString &logName, const std::set< double > &customLogValues, const QList< QString > &workspaceNames)=0
virtual void drawColorFillPlots(const QStringList &wsNames, GraphOptions::CurveType curveType=GraphOptions::ColorMap)=0
virtual void importWorkspace(const QString &wsName, bool showDlg=true, bool makeVisible=true)=0
virtual MultiLayer * plotSubplots(const QMultiMap< QString, std::set< int > > &toPlot, MantidQt::DistributionFlag distr=MantidQt::DistributionDefault, bool errs=false, MultiLayer *plotWindow=nullptr)=0
virtual Mantid::API::Workspace_const_sptr getWorkspace(const QString &workspaceName)=0
virtual void updateRecentFilesList(const QString &fname)=0
virtual Mantid::API::IAlgorithm_sptr createAlgorithm(const QString &algName, int version=-1)=0
virtual void showAlgorithmDialog(const QString &algName, int version=-1)=0
virtual void renameWorkspace(QStringList=QStringList())=0
virtual void showAlgorithmDialog(const QString &algName, QHash< QString, QString > paramList, Mantid::API::AlgorithmObserver *obs=nullptr, int version=-1)=0
virtual MantidMatrix * importMatrixWorkspace(const Mantid::API::MatrixWorkspace_sptr workspace, int lower=-1, int upper=-1, bool showDlg=true)=0
virtual void enableSaveNexus(const QString &wsName)=0
virtual Table * createDetectorTable(const QString &wsName, const std::vector< int > &indices, bool include_data=false)=0
virtual void plotContour(bool accepted, int plotIndex, const QString &axisName, const QString &logName, const std::set< double > &customLogValues, const QList< QString > &workspaceNames)=0
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
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class