Mantid
Loading...
Searching...
No Matches
IWorkspaceDockView.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 <map>
12#include <memory>
13namespace MantidQt {
14namespace MantidWidgets {
15
17class ViewNotifiable;
18
19using WorkspacePresenterWN_wptr = std::weak_ptr<WorkspaceProviderNotifiable>;
20using WorkspacePresenterVN_sptr = std::shared_ptr<ViewNotifiable>;
21using StringList = std::vector<std::string>;
29public:
32 enum class SaveFileType { Nexus, ASCII };
33
35
37
38 virtual bool askUserYesNo(const std::string &caption, const std::string &message) const = 0;
39 virtual void showCriticalUserMessage(const std::string &caption, const std::string &message) const = 0;
40 virtual void showLoadDialog() = 0;
41 virtual void showLiveDataDialog() = 0;
42 virtual void showRenameDialog(const StringList &wsNames) = 0;
43 virtual void recordWorkspaceRename(const std::string &oldName, const std::string &newName) = 0;
44 virtual void enableDeletePrompt(bool enable) = 0;
45 virtual bool isPromptDelete() const = 0;
46 virtual bool deleteConfirmation() const = 0;
47 virtual void deleteWorkspaces(const StringList &wsNames) = 0;
48 virtual bool clearWorkspacesConfirmation() const = 0;
49 virtual void enableClearButton(bool enable) = 0;
50 virtual void clearView() = 0;
51 virtual SortDirection getSortDirection() const = 0;
52 virtual SortCriteria getSortCriteria() const = 0;
53 virtual void sortWorkspaces(SortCriteria criteria, SortDirection direction) = 0;
54 virtual SaveFileType getSaveFileType() const = 0;
55 virtual void saveWorkspace(const std::string &wsName, const SaveFileType type) = 0;
56 virtual void saveWorkspaces(const StringList &wsNames) = 0;
57 virtual std::string getFilterText() const = 0;
58 virtual void filterWorkspaces(const std::string &filterText) = 0;
61 virtual void refreshWorkspaces() = 0;
62 virtual void updateTree(const std::map<std::string, Mantid::API::Workspace_sptr> &items) = 0;
63
64 // Workspace Context Menu Handlers
65 virtual void popupContextMenu() = 0;
66 virtual void showWorkspaceData() = 0;
67 virtual void showInstrumentView() = 0;
68 virtual void saveToProgram() = 0;
69 virtual void plotSpectrum(const std::string &type) = 0;
70 virtual void showColourFillPlot() = 0;
71 virtual void showDetectorsTable() = 0;
72 virtual void showBoxDataTable() = 0;
73 virtual void showMDPlot() = 0;
74 virtual void showListData() = 0;
75 virtual void showSpectrumViewer() = 0;
76 virtual void showSliceViewer() = 0;
77 virtual void showLogs() = 0;
78 virtual void showSampleMaterialWindow() = 0;
79 virtual void showAlgorithmHistory() = 0;
80 virtual void showTransposed() = 0;
81 virtual void convertToMatrixWorkspace() = 0;
83
84 virtual bool executeAlgorithmAsync(Mantid::API::IAlgorithm_sptr alg, const bool wait = true) = 0;
85};
86} // namespace MantidWidgets
87} // namespace MantidQt
virtual void enableDeletePrompt(bool enable)=0
virtual bool clearWorkspacesConfirmation() const =0
virtual void updateTree(const std::map< std::string, Mantid::API::Workspace_sptr > &items)=0
virtual void plotSpectrum(const std::string &type)=0
virtual SortCriteria getSortCriteria() const =0
virtual void showCriticalUserMessage(const std::string &caption, const std::string &message) const =0
virtual StringList getSelectedWorkspaceNames() const =0
virtual Mantid::API::Workspace_sptr getSelectedWorkspace() const =0
virtual void showRenameDialog(const StringList &wsNames)=0
virtual void enableClearButton(bool enable)=0
virtual void recordWorkspaceRename(const std::string &oldName, const std::string &newName)=0
virtual void saveWorkspace(const std::string &wsName, const SaveFileType type)=0
virtual WorkspacePresenterWN_wptr getPresenterWeakPtr()=0
virtual void saveWorkspaces(const StringList &wsNames)=0
virtual SortDirection getSortDirection() const =0
virtual SaveFileType getSaveFileType() const =0
virtual void sortWorkspaces(SortCriteria criteria, SortDirection direction)=0
virtual bool executeAlgorithmAsync(Mantid::API::IAlgorithm_sptr alg, const bool wait=true)=0
virtual std::string getFilterText() const =0
virtual bool askUserYesNo(const std::string &caption, const std::string &message) const =0
virtual void deleteWorkspaces(const StringList &wsNames)=0
virtual bool deleteConfirmation() const =0
virtual void filterWorkspaces(const std::string &filterText)=0
Mixin class allows view notifications.
Mixin class allows ADS notifications.
std::shared_ptr< ViewNotifiable > WorkspacePresenterVN_sptr
std::vector< std::string > StringList
std::weak_ptr< WorkspaceProviderNotifiable > WorkspacePresenterWN_wptr
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< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
Definition: Workspace_fwd.h:20