diff --git a/qt/widgets/common/CMakeLists.txt b/qt/widgets/common/CMakeLists.txt index cbc66f87052230e6f9b21f0cfd084943eb4a6abd..47b47a1eb0bacfeb2f77b5b99c4e057d5292b478 100644 --- a/qt/widgets/common/CMakeLists.txt +++ b/qt/widgets/common/CMakeLists.txt @@ -324,7 +324,7 @@ set ( INC_FILES inc/MantidQtWidgets/Common/DataProcessorUI/OpenTableCommand.h inc/MantidQtWidgets/Common/DataProcessorUI/OptionsCommand.h inc/MantidQtWidgets/Common/DataProcessorUI/PasteSelectedCommand.h - inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPauseCommand.h + inc/MantidQtWidgets/Common/DataProcessorUI/PauseCommand.h inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotGroupCommand.h inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotRowCommand.h inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPostprocessingAlgorithm.h diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPauseCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPauseCommand.h deleted file mode 100644 index a12eaf9b8023b15a831989433af8f0a56262dfef..0000000000000000000000000000000000000000 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPauseCommand.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef MANTIDQTMANTIDWIDGETS_DATAPROCESSORPAUSECOMMAND_H -#define MANTIDQTMANTIDWIDGETS_DATAPROCESSORPAUSECOMMAND_H - -#include "MantidQtWidgets/Common/DataProcessorUI/CommandBase.h" - -namespace MantidQt { -namespace MantidWidgets { -namespace DataProcessor { -/** @class DataProcessorPauseCommand - -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 DataProcessorPauseCommand : public CommandBase { -public: - DataProcessorPauseCommand(DataProcessorPresenter *tablePresenter) - : CommandBase(tablePresenter){}; - virtual ~DataProcessorPauseCommand(){}; - - 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/src/DataProcessorUI/DataProcessorTwoLevelTreeManager.cpp b/qt/widgets/common/src/DataProcessorUI/DataProcessorTwoLevelTreeManager.cpp index 42c89654f101cc3c16ae9ac9abcaecf00e7fe182..0f2e93cee6e2eef1fd88f3521df2091f2cf44b4c 100644 --- a/qt/widgets/common/src/DataProcessorUI/DataProcessorTwoLevelTreeManager.cpp +++ b/qt/widgets/common/src/DataProcessorUI/DataProcessorTwoLevelTreeManager.cpp @@ -19,7 +19,7 @@ #include "MantidQtWidgets/Common/DataProcessorUI/OpenTableCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/OptionsCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/PasteSelectedCommand.h" -#include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPauseCommand.h" +#include "MantidQtWidgets/Common/DataProcessorUI/PauseCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotGroupCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotRowCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorProcessCommand.h" @@ -92,7 +92,7 @@ DataProcessorTwoLevelTreeManager::publishCommands() { addCommand(commands, make_unique<OptionsCommand>(m_presenter)); addCommand(commands, make_unique<DataProcessorSeparatorCommand>(m_presenter)); addCommand(commands, make_unique<DataProcessorProcessCommand>(m_presenter)); - addCommand(commands, make_unique<DataProcessorPauseCommand>(m_presenter)); + addCommand(commands, make_unique<PauseCommand>(m_presenter)); addCommand(commands, make_unique<DataProcessorSeparatorCommand>(m_presenter)); addCommand(commands, make_unique<ExpandCommand>(m_presenter)); addCommand(commands, diff --git a/qt/widgets/common/src/DataProcessorUI/OneLevelTreeManager.cpp b/qt/widgets/common/src/DataProcessorUI/OneLevelTreeManager.cpp index 5a856765effc3749bebab546004b3dd75d1e538b..2946fe684ce78e068385f0bfb9025b872f70620e 100644 --- a/qt/widgets/common/src/DataProcessorUI/OneLevelTreeManager.cpp +++ b/qt/widgets/common/src/DataProcessorUI/OneLevelTreeManager.cpp @@ -13,7 +13,7 @@ #include "MantidQtWidgets/Common/DataProcessorUI/OpenTableCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/OptionsCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/PasteSelectedCommand.h" -#include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPauseCommand.h" +#include "MantidQtWidgets/Common/DataProcessorUI/PauseCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotRowCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorProcessCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorSaveTableAsCommand.h" @@ -83,7 +83,7 @@ OneLevelTreeManager::publishCommands() { addCommand(commands, make_unique<OptionsCommand>(m_presenter)); addCommand(commands, make_unique<DataProcessorSeparatorCommand>(m_presenter)); addCommand(commands, make_unique<DataProcessorProcessCommand>(m_presenter)); - addCommand(commands, make_unique<DataProcessorPauseCommand>(m_presenter)); + addCommand(commands, make_unique<PauseCommand>(m_presenter)); addCommand(commands, make_unique<DataProcessorSeparatorCommand>(m_presenter)); addCommand(commands, make_unique<DataProcessorPlotRowCommand>(m_presenter)); addCommand(commands, make_unique<DataProcessorSeparatorCommand>(m_presenter)); diff --git a/qt/widgets/common/test/DataProcessorUI/CommandsTest.h b/qt/widgets/common/test/DataProcessorUI/CommandsTest.h index a7a4faa65ea7203d72ed16b748fae1bdd276bb5a..ef742518eebcb6460163bd17d1d88907ef3fa91d 100644 --- a/qt/widgets/common/test/DataProcessorUI/CommandsTest.h +++ b/qt/widgets/common/test/DataProcessorUI/CommandsTest.h @@ -23,7 +23,7 @@ #include "MantidQtWidgets/Common/DataProcessorUI/OpenTableCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/OptionsCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/PasteSelectedCommand.h" -#include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPauseCommand.h" +#include "MantidQtWidgets/Common/DataProcessorUI/PauseCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotGroupCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotRowCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPresenter.h" @@ -159,7 +159,7 @@ public: void test_pause_command() { NiceMock<MockDataProcessorPresenter> mockPresenter; - DataProcessorPauseCommand command(&mockPresenter); + PauseCommand command(&mockPresenter); // The presenter should be notified with the PauseFlag EXPECT_CALL(mockPresenter, notify(DataProcessorPresenter::PauseFlag)) diff --git a/qt/widgets/common/test/DataProcessorUI/DataProcessorTwoLevelTreeManagerTest.h b/qt/widgets/common/test/DataProcessorUI/DataProcessorTwoLevelTreeManagerTest.h index 107de7bc7c3c88d5de4180c4ce363739aed38313..546fb4247145a0d0ca0b949030378c65157f36c7 100644 --- a/qt/widgets/common/test/DataProcessorUI/DataProcessorTwoLevelTreeManagerTest.h +++ b/qt/widgets/common/test/DataProcessorUI/DataProcessorTwoLevelTreeManagerTest.h @@ -27,7 +27,7 @@ #include "MantidQtWidgets/Common/DataProcessorUI/OpenTableCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/OptionsCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/PasteSelectedCommand.h" -#include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPauseCommand.h" +#include "MantidQtWidgets/Common/DataProcessorUI/PauseCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotGroupCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotRowCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorProcessCommand.h" @@ -150,7 +150,7 @@ public: TS_ASSERT(dynamic_cast<OptionsCommand *>(comm[8].get())); TS_ASSERT(dynamic_cast<DataProcessorSeparatorCommand *>(comm[9].get())); TS_ASSERT(dynamic_cast<DataProcessorProcessCommand *>(comm[10].get())); - TS_ASSERT(dynamic_cast<DataProcessorPauseCommand *>(comm[11].get())); + TS_ASSERT(dynamic_cast<PauseCommand *>(comm[11].get())); TS_ASSERT(dynamic_cast<DataProcessorSeparatorCommand *>(comm[12].get())); TS_ASSERT(dynamic_cast<ExpandCommand *>(comm[13].get())); TS_ASSERT(dynamic_cast<ExpandGroupsCommand *>(comm[14].get())); diff --git a/qt/widgets/common/test/DataProcessorUI/OneLevelTreeManagerTest.h b/qt/widgets/common/test/DataProcessorUI/OneLevelTreeManagerTest.h index de7d1cf86eef796471358c413bc9109421a538f9..a55b680db2f7f7b8ada797870e07fa96faa570bb 100644 --- a/qt/widgets/common/test/DataProcessorUI/OneLevelTreeManagerTest.h +++ b/qt/widgets/common/test/DataProcessorUI/OneLevelTreeManagerTest.h @@ -21,7 +21,7 @@ #include "MantidQtWidgets/Common/DataProcessorUI/OpenTableCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/OptionsCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/PasteSelectedCommand.h" -#include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPauseCommand.h" +#include "MantidQtWidgets/Common/DataProcessorUI/PauseCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPlotRowCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorProcessCommand.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorSaveTableAsCommand.h" @@ -138,7 +138,7 @@ public: TS_ASSERT(dynamic_cast<OptionsCommand *>(comm[8].get())); TS_ASSERT(dynamic_cast<DataProcessorSeparatorCommand *>(comm[9].get())); TS_ASSERT(dynamic_cast<DataProcessorProcessCommand *>(comm[10].get())); - TS_ASSERT(dynamic_cast<DataProcessorPauseCommand *>(comm[11].get())); + TS_ASSERT(dynamic_cast<PauseCommand *>(comm[11].get())); TS_ASSERT(dynamic_cast<DataProcessorSeparatorCommand *>(comm[12].get())); TS_ASSERT(dynamic_cast<DataProcessorPlotRowCommand *>(comm[13].get())); TS_ASSERT(dynamic_cast<DataProcessorSeparatorCommand *>(comm[14].get()));