diff --git a/qt/python/CMakeLists.txt b/qt/python/CMakeLists.txt index 795d80f54cc37abe3afb053a1c4d8d4434230c33..da9cabef976f5b277930e1804830f0c6e6cf5a5c 100644 --- a/qt/python/CMakeLists.txt +++ b/qt/python/CMakeLists.txt @@ -51,7 +51,7 @@ set ( SIP_HDRS ../widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OpenTableCommand.h ../widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OptionsCommand.h ../widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PasteSelectedCommand.h - ../widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotGroupCommand.h + ../widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PlotGroupCommand.h ../widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotRowCommand.h ../widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorProcessCommand.h ../widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorSaveTableCommand.h diff --git a/qt/python/mantidqt.sip b/qt/python/mantidqt.sip index d8ec87df703727b4839618bd6a59c3266190bd87..303213eea54aa60a0a8dbb5c1e28a9f1b7733a37 100644 --- a/qt/python/mantidqt.sip +++ b/qt/python/mantidqt.sip @@ -1866,13 +1866,13 @@ PasteSelectedCommand(); PasteSelectedCommand(const MantidQt::MantidWidgets::DataProcessor::PasteSelectedCommand &); }; -class DataProcessorPlotGroupCommand +class PlotGroupCommand { %TypeHeaderCode -#include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotGroupCommand.h" +#include "MantidQtWidgets/Common/DataProcessorUI/PlotGroupCommand.h" %End public: -DataProcessorPlotGroupCommand(const MantidQt::MantidWidgets::DataProcessor::QDataProcessorWidget &); +PlotGroupCommand(const MantidQt::MantidWidgets::DataProcessor::QDataProcessorWidget &); void execute(); QString name(); QString icon(); @@ -1881,8 +1881,8 @@ QString whatsthis(); QString shortcut(); private: -DataProcessorPlotGroupCommand(); -DataProcessorPlotGroupCommand(const MantidQt::MantidWidgets::DataProcessor::DataProcessorPlotGroupCommand &); +PlotGroupCommand(); +PlotGroupCommand(const MantidQt::MantidWidgets::DataProcessor::PlotGroupCommand &); }; class DataProcessorPlotRowCommand diff --git a/qt/widgets/common/CMakeLists.txt b/qt/widgets/common/CMakeLists.txt index 47b47a1eb0bacfeb2f77b5b99c4e057d5292b478..5f0243aee67401c7ed5ceb034c38b906c292c10e 100644 --- a/qt/widgets/common/CMakeLists.txt +++ b/qt/widgets/common/CMakeLists.txt @@ -325,7 +325,7 @@ set ( INC_FILES inc/MantidQtWidgets/Common/DataProcessorUI/OptionsCommand.h inc/MantidQtWidgets/Common/DataProcessorUI/PasteSelectedCommand.h inc/MantidQtWidgets/Common/DataProcessorUI/PauseCommand.h - inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotGroupCommand.h + inc/MantidQtWidgets/Common/DataProcessorUI/PlotGroupCommand.h inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotRowCommand.h inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPostprocessingAlgorithm.h inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPreprocessingAlgorithm.h diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PauseCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PauseCommand.h new file mode 100644 index 0000000000000000000000000000000000000000..870319fed0c7367fcea087f9098097f7e207c5c7 --- /dev/null +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PauseCommand.h @@ -0,0 +1,55 @@ +#ifndef MANTIDQTMANTIDWIDGETS_DATAPROCESSORPAUSECOMMAND_H +#define MANTIDQTMANTIDWIDGETS_DATAPROCESSORPAUSECOMMAND_H + +#include "MantidQtWidgets/Common/DataProcessorUI/CommandBase.h" + +namespace MantidQt { +namespace MantidWidgets { +namespace DataProcessor { +/** @class PauseCommand + +DataProcessorProcessCommand defines the action "Pause" + +Copyright © 2011-16 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge +National Laboratory & European Spallation Source + +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 PauseCommand : public CommandBase { +public: + PauseCommand(DataProcessorPresenter *tablePresenter) + : CommandBase(tablePresenter){}; + virtual ~PauseCommand(){}; + + void execute() override { + m_presenter->notify(DataProcessorPresenter::PauseFlag); + }; + QString name() override { return QString("Pause"); } + QString icon() override { return QString("://pause.png"); } + QString tooltip() override { return QString("Pause processing runs"); } + QString whatsthis() override { + return QString("Pauses processing any selected runs. Processing may be " + "resumed by clicking on the 'Process' button."); + } + QString shortcut() override { return QString(); } +}; +} +} +} +#endif /*MANTIDQTMANTIDWIDGETS_DATAPROCESSORPAUSECOMMAND_H*/ diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotGroupCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PlotGroupCommand.h similarity index 83% rename from qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotGroupCommand.h rename to qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PlotGroupCommand.h index 6d3c1aa1745bd81217b08eba367074706d963ebf..53d68f18758e633c5017a84b561b0f45be1f4738 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotGroupCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PlotGroupCommand.h @@ -6,9 +6,9 @@ namespace MantidQt { namespace MantidWidgets { namespace DataProcessor { -/** @class DataProcessorPlotGroupCommand +/** @class PlotGroupCommand -DataProcessorPlotGroupCommand defines the action "Plot Selected Groups" +PlotGroupCommand defines the action "Plot Selected Groups" Copyright © 2011-16 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge National Laboratory & European Spallation Source @@ -31,13 +31,13 @@ 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 DataProcessorPlotGroupCommand : public CommandBase { +class PlotGroupCommand : public CommandBase { public: - DataProcessorPlotGroupCommand(DataProcessorPresenter *tablePresenter) + PlotGroupCommand(DataProcessorPresenter *tablePresenter) : CommandBase(tablePresenter){}; - DataProcessorPlotGroupCommand(const QDataProcessorWidget &widget) + PlotGroupCommand(const QDataProcessorWidget &widget) : CommandBase(widget){}; - virtual ~DataProcessorPlotGroupCommand(){}; + virtual ~PlotGroupCommand(){}; void execute() override { m_presenter->notify(DataProcessorPresenter::PlotGroupFlag); diff --git a/qt/widgets/common/src/DataProcessorUI/DataProcessorTwoLevelTreeManager.cpp b/qt/widgets/common/src/DataProcessorUI/DataProcessorTwoLevelTreeManager.cpp index 0f2e93cee6e2eef1fd88f3521df2091f2cf44b4c..c9cedcec5abbc5827b804b175bfd5bd47edef2be 100644 --- a/qt/widgets/common/src/DataProcessorUI/DataProcessorTwoLevelTreeManager.cpp +++ b/qt/widgets/common/src/DataProcessorUI/DataProcessorTwoLevelTreeManager.cpp @@ -20,7 +20,7 @@ #include "MantidQtWidgets/Common/DataProcessorUI/OptionsCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/PasteSelectedCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/PauseCommand.h" -#include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotGroupCommand.h" +#include "MantidQtWidgets/Common/DataProcessorUI/PlotGroupCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotRowCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorProcessCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorSaveTableAsCommand.h" @@ -101,7 +101,7 @@ DataProcessorTwoLevelTreeManager::publishCommands() { make_unique<CollapseGroupsCommand>(m_presenter)); addCommand(commands, make_unique<DataProcessorSeparatorCommand>(m_presenter)); addCommand(commands, make_unique<DataProcessorPlotRowCommand>(m_presenter)); - addCommand(commands, make_unique<DataProcessorPlotGroupCommand>(m_presenter)); + addCommand(commands, make_unique<PlotGroupCommand>(m_presenter)); addCommand(commands, make_unique<DataProcessorSeparatorCommand>(m_presenter)); addCommand(commands, make_unique<AppendRowCommand>(m_presenter)); addCommand(commands, diff --git a/qt/widgets/common/test/DataProcessorUI/CommandsTest.h b/qt/widgets/common/test/DataProcessorUI/CommandsTest.h index ef742518eebcb6460163bd17d1d88907ef3fa91d..5b9da7638057ad67ccfbcd34a4b69dcd5817f63d 100644 --- a/qt/widgets/common/test/DataProcessorUI/CommandsTest.h +++ b/qt/widgets/common/test/DataProcessorUI/CommandsTest.h @@ -24,7 +24,7 @@ #include "MantidQtWidgets/Common/DataProcessorUI/OptionsCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/PasteSelectedCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/PauseCommand.h" -#include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotGroupCommand.h" +#include "MantidQtWidgets/Common/DataProcessorUI/PlotGroupCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotRowCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPresenter.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPresenter.h" @@ -227,7 +227,7 @@ public: void test_plot_group_command() { NiceMock<MockDataProcessorPresenter> mockPresenter; - DataProcessorPlotGroupCommand command(&mockPresenter); + PlotGroupCommand command(&mockPresenter); // The presenter should be notified with the PlotGroupFlag EXPECT_CALL(mockPresenter, notify(DataProcessorPresenter::PlotGroupFlag)) diff --git a/qt/widgets/common/test/DataProcessorUI/DataProcessorTwoLevelTreeManagerTest.h b/qt/widgets/common/test/DataProcessorUI/DataProcessorTwoLevelTreeManagerTest.h index 546fb4247145a0d0ca0b949030378c65157f36c7..c7f9a356bab0fae3d7cea52b83fa13182906a92d 100644 --- a/qt/widgets/common/test/DataProcessorUI/DataProcessorTwoLevelTreeManagerTest.h +++ b/qt/widgets/common/test/DataProcessorUI/DataProcessorTwoLevelTreeManagerTest.h @@ -28,7 +28,7 @@ #include "MantidQtWidgets/Common/DataProcessorUI/OptionsCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/PasteSelectedCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/PauseCommand.h" -#include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotGroupCommand.h" +#include "MantidQtWidgets/Common/DataProcessorUI/PlotGroupCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotRowCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorProcessCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorSaveTableAsCommand.h" @@ -158,7 +158,7 @@ public: dynamic_cast<CollapseGroupsCommand *>(comm[15].get())); TS_ASSERT(dynamic_cast<DataProcessorSeparatorCommand *>(comm[16].get())); TS_ASSERT(dynamic_cast<DataProcessorPlotRowCommand *>(comm[17].get())); - TS_ASSERT(dynamic_cast<DataProcessorPlotGroupCommand *>(comm[18].get())); + TS_ASSERT(dynamic_cast<PlotGroupCommand *>(comm[18].get())); TS_ASSERT(dynamic_cast<DataProcessorSeparatorCommand *>(comm[19].get())); TS_ASSERT(dynamic_cast<AppendRowCommand *>(comm[20].get())); TS_ASSERT(dynamic_cast<AppendGroupCommand *>(comm[21].get())); diff --git a/scripts/Interface/ui/dataprocessorinterface/data_processor_gui.py b/scripts/Interface/ui/dataprocessorinterface/data_processor_gui.py index 3a62de2f44dd563dedf90e019ddbce48ed7f4bbb..0c71da1ed0f79de06de439fbd455945f5aa1a4b5 100644 --- a/scripts/Interface/ui/dataprocessorinterface/data_processor_gui.py +++ b/scripts/Interface/ui/dataprocessorinterface/data_processor_gui.py @@ -163,7 +163,7 @@ class DataProcessorGui(QtGui.QMainWindow, ui_data_processor_window.Ui_DataProces self._create_action(MantidQt.MantidWidgets.DataProcessorProcessCommand(self.data_processor_table), self.menuEdit) self._create_action(MantidQt.MantidWidgets.ExpandCommand(self.data_processor_table), self.menuEdit) self._create_action(MantidQt.MantidWidgets.DataProcessorPlotRowCommand(self.data_processor_table), self.menuEdit) - self._create_action(MantidQt.MantidWidgets.DataProcessorPlotGroupCommand(self.data_processor_table), self.menuEdit) + self._create_action(MantidQt.MantidWidgets.PlotGroupCommand(self.data_processor_table), self.menuEdit) self._create_action(MantidQt.MantidWidgets.AppendRowCommand(self.data_processor_table), self.menuEdit) self._create_action(MantidQt.MantidWidgets.AppendGroupCommand(self.data_processor_table), self.menuEdit) self._create_action(MantidQt.MantidWidgets.GroupRowsCommand(self.data_processor_table), self.menuEdit) diff --git a/scripts/Interface/ui/poldi/poldi_gui.py b/scripts/Interface/ui/poldi/poldi_gui.py index 24b8a3b194b6b2273a2d8898b3541657136ed2ab..5c2a53df31ea874f7e8d2581b2d0d872c4150faa 100644 --- a/scripts/Interface/ui/poldi/poldi_gui.py +++ b/scripts/Interface/ui/poldi/poldi_gui.py @@ -152,7 +152,7 @@ class PoldiGui(QtGui.QMainWindow, ui_poldi_window.Ui_PoldiWindow): self._create_action(MantidQt.MantidWidgets.DataProcessorProcessCommand(self.data_processor_table), self.menuEdit) self._create_action(MantidQt.MantidWidgets.ExpandCommand(self.data_processor_table), self.menuEdit) self._create_action(MantidQt.MantidWidgets.DataProcessorPlotRowCommand(self.data_processor_table), self.menuEdit) - self._create_action(MantidQt.MantidWidgets.DataProcessorPlotGroupCommand(self.data_processor_table), self.menuEdit) + self._create_action(MantidQt.MantidWidgets.PlotGroupCommand(self.data_processor_table), self.menuEdit) self._create_action(MantidQt.MantidWidgets.AppendRowCommand(self.data_processor_table), self.menuEdit) self._create_action(MantidQt.MantidWidgets.AppendGroupCommand(self.data_processor_table), self.menuEdit) self._create_action(MantidQt.MantidWidgets.GroupRowsCommand(self.data_processor_table), self.menuEdit)