Mantid
Loading...
Searching...
No Matches
ADSAdapter.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
12#include <Poco/NObserver.h>
13
14namespace MantidQt {
15namespace MantidWidgets {
23public:
24 explicit ADSAdapter();
25 ~ADSAdapter() override;
26 void registerPresenter(Presenter_wptr presenter) override;
27 bool doesWorkspaceExist(const std::string &wsname) const override;
28
29 std::map<std::string, Mantid::API::Workspace_sptr> topLevelItems() const override;
30
31 std::string getOldName() const override;
32 std::string getNewName() const override;
33
34private:
35 std::string m_oldName;
36 std::string m_newName;
37
39
40 Presenter_sptr lockPresenter();
41
42 // ADS Notification Handlers
43 void handleAddWorkspace(Mantid::API::WorkspaceAddNotification_ptr pNf);
45
46 void handleReplaceWorkspace(Mantid::API::WorkspaceAfterReplaceNotification_ptr pNf);
48
49 void handleDeleteWorkspace(Mantid::API::WorkspacePostDeleteNotification_ptr pNf);
51
52 void handleClearADS(Mantid::API::ClearADSNotification_ptr pNf);
54
55 void handleRenameWorkspace(Mantid::API::WorkspaceRenameNotification_ptr pNf);
57
58 void handleGroupWorkspaces(Mantid::API::WorkspacesGroupedNotification_ptr pNf);
60
61 void handleUnGroupWorkspace(Mantid::API::WorkspaceUnGroupingNotification_ptr pNf);
63
64 void handleWorkspaceGroupUpdate(Mantid::API::GroupUpdatedNotification_ptr pNf);
66};
67} // namespace MantidWidgets
68} // namespace MantidQt
#define EXPORT_OPT_MANTIDQT_COMMON
Definition: DllOption.h:15
Poco::NObserver< ADSAdapter, Mantid::API::GroupUpdatedNotification > m_workspaceGroupUpdateObserver
Definition: ADSAdapter.h:65
Poco::NObserver< ADSAdapter, Mantid::API::WorkspacePostDeleteNotification > m_deleteObserver
Definition: ADSAdapter.h:50
Poco::NObserver< ADSAdapter, Mantid::API::WorkspacesGroupedNotification > m_groupworkspacesObserver
Definition: ADSAdapter.h:59
Poco::NObserver< ADSAdapter, Mantid::API::WorkspaceUnGroupingNotification > m_ungroupworkspaceObserver
Definition: ADSAdapter.h:62
Poco::NObserver< ADSAdapter, Mantid::API::WorkspaceRenameNotification > m_renameObserver
Definition: ADSAdapter.h:56
Poco::NObserver< ADSAdapter, Mantid::API::WorkspaceAfterReplaceNotification > m_replaceObserver
Definition: ADSAdapter.h:47
Poco::NObserver< ADSAdapter, Mantid::API::ClearADSNotification > m_clearADSObserver
Definition: ADSAdapter.h:53
Poco::NObserver< ADSAdapter, Mantid::API::WorkspaceAddNotification > m_addObserver
Definition: ADSAdapter.h:44
std::shared_ptr< WorkspaceProviderNotifiable > Presenter_sptr
std::weak_ptr< WorkspaceProviderNotifiable > Presenter_wptr
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...
const Poco::AutoPtr< Mantid::Kernel::DataService< Mantid::API::Workspace >::AfterReplaceNotification > & WorkspaceAfterReplaceNotification_ptr
const Poco::AutoPtr< Mantid::Kernel::DataService< Mantid::API::Workspace >::ClearNotification > & ClearADSNotification_ptr
const Poco::AutoPtr< AnalysisDataServiceImpl::GroupUpdatedNotification > & GroupUpdatedNotification_ptr
const Poco::AutoPtr< AnalysisDataServiceImpl::GroupWorkspacesNotification > & WorkspacesGroupedNotification_ptr
const Poco::AutoPtr< AnalysisDataServiceImpl::UnGroupingWorkspaceNotification > & WorkspaceUnGroupingNotification_ptr
const Poco::AutoPtr< Mantid::Kernel::DataService< Mantid::API::Workspace >::RenameNotification > & WorkspaceRenameNotification_ptr
const Poco::AutoPtr< Mantid::Kernel::DataService< Mantid::API::Workspace >::AddNotification > & WorkspaceAddNotification_ptr
const Poco::AutoPtr< Mantid::Kernel::DataService< Mantid::API::Workspace >::PostDeleteNotification > & WorkspacePostDeleteNotification_ptr