From e01002596ae979c3860d4a2dce01615a20dd77ae Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Sat, 28 Oct 2017 11:15:37 +0200 Subject: [PATCH] SimulationExperiment view: removed the shell of a graph panel and graphs specific property editor (#1426). Indeed, refactoring the Graphs property editor was proving to be too tedious, not to mention that this meant several instances of our context menu, etc. one for each graph panel. So, not optimal at all. --- .../SimulationExperimentView/CMakeLists.txt | 4 -- ...ewinformationgraphpanelandgraphswidget.cpp | 7 +-- ...iewinformationgraphpanelpropertyeditor.cpp | 45 ---------------- ...tviewinformationgraphpanelpropertyeditor.h | 52 ------------------- ...entviewinformationgraphspropertyeditor.cpp | 45 ---------------- ...imentviewinformationgraphspropertyeditor.h | 52 ------------------- 6 files changed, 1 insertion(+), 204 deletions(-) delete mode 100644 src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphpanelpropertyeditor.cpp delete mode 100644 src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphpanelpropertyeditor.h delete mode 100644 src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphspropertyeditor.cpp delete mode 100644 src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphspropertyeditor.h diff --git a/src/plugins/simulation/SimulationExperimentView/CMakeLists.txt b/src/plugins/simulation/SimulationExperimentView/CMakeLists.txt index 5ae7a41559..d37e90b94d 100644 --- a/src/plugins/simulation/SimulationExperimentView/CMakeLists.txt +++ b/src/plugins/simulation/SimulationExperimentView/CMakeLists.txt @@ -16,8 +16,6 @@ ADD_PLUGIN(SimulationExperimentView src/simulationexperimentviewcontentswidget.cpp src/simulationexperimentviewinformationgraphpanelandgraphswidget.cpp - src/simulationexperimentviewinformationgraphpanelpropertyeditor.cpp - src/simulationexperimentviewinformationgraphspropertyeditor.cpp src/simulationexperimentviewinformationparameterswidget.cpp src/simulationexperimentviewinformationsimulationwidget.cpp src/simulationexperimentviewinformationsolverswidget.cpp @@ -33,8 +31,6 @@ ADD_PLUGIN(SimulationExperimentView src/simulationexperimentviewcontentswidget.h src/simulationexperimentviewinformationgraphpanelandgraphswidget.h - src/simulationexperimentviewinformationgraphpanelpropertyeditor.h - src/simulationexperimentviewinformationgraphspropertyeditor.h src/simulationexperimentviewinformationparameterswidget.h src/simulationexperimentviewinformationsimulationwidget.h src/simulationexperimentviewinformationsolverswidget.h diff --git a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphpanelandgraphswidget.cpp b/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphpanelandgraphswidget.cpp index bb7baf8708..70fcbe9692 100644 --- a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphpanelandgraphswidget.cpp +++ b/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphpanelandgraphswidget.cpp @@ -29,8 +29,6 @@ along with this program. If not, see . #include "sedmlsupport.h" #include "simulation.h" #include "simulationexperimentviewinformationgraphpanelandgraphswidget.h" -#include "simulationexperimentviewinformationgraphpanelpropertyeditor.h" -#include "simulationexperimentviewinformationgraphspropertyeditor.h" #include "simulationexperimentviewsimulationwidget.h" #include "simulationexperimentviewwidget.h" @@ -182,10 +180,7 @@ void SimulationExperimentViewInformationGraphPanelAndGraphsWidget::initialize(Op if (!mPropertyEditor) { // No property editor exists for the given graph panel, so create one - if (mMode == GraphPanel) - mPropertyEditor = new SimulationExperimentViewInformationGraphPanelPropertyEditor(this); - else - mPropertyEditor = new SimulationExperimentViewInformationGraphsPropertyEditor(this); + mPropertyEditor = new Core::PropertyEditorWidget(false, false, this); // We want our own context menu for our property editor diff --git a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphpanelpropertyeditor.cpp b/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphpanelpropertyeditor.cpp deleted file mode 100644 index 1197efa4e4..0000000000 --- a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphpanelpropertyeditor.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - -Copyright (C) The University of Auckland - -OpenCOR 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. - -OpenCOR 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 . - -*******************************************************************************/ - -//============================================================================== -// Simulation Experiment view information graph panel property editor -//============================================================================== - -#include "simulationexperimentviewinformationgraphpanelpropertyeditor.h" - -//============================================================================== - -namespace OpenCOR { -namespace SimulationExperimentView { - -//============================================================================== - -SimulationExperimentViewInformationGraphPanelPropertyEditor::SimulationExperimentViewInformationGraphPanelPropertyEditor(QWidget *pParent) : - Core::PropertyEditorWidget(false, false, pParent) -{ -} - -//============================================================================== - -} // namespace SimulationExperimentView -} // namespace OpenCOR - -//============================================================================== -// End of file -//============================================================================== diff --git a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphpanelpropertyeditor.h b/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphpanelpropertyeditor.h deleted file mode 100644 index 405888346a..0000000000 --- a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphpanelpropertyeditor.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - -Copyright (C) The University of Auckland - -OpenCOR 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. - -OpenCOR 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 . - -*******************************************************************************/ - -//============================================================================== -// Simulation Experiment view information graph panel property editor -//============================================================================== - -#pragma once - -//============================================================================== - -#include "propertyeditorwidget.h" - -//============================================================================== - -namespace OpenCOR { -namespace SimulationExperimentView { - -//============================================================================== - -class SimulationExperimentViewInformationGraphPanelPropertyEditor : public Core::PropertyEditorWidget -{ - Q_OBJECT - -public: - explicit SimulationExperimentViewInformationGraphPanelPropertyEditor(QWidget *pParent); -}; - -//============================================================================== - -} // namespace SimulationExperimentView -} // namespace OpenCOR - -//============================================================================== -// End of file -//============================================================================== diff --git a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphspropertyeditor.cpp b/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphspropertyeditor.cpp deleted file mode 100644 index 98edd549cf..0000000000 --- a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphspropertyeditor.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - -Copyright (C) The University of Auckland - -OpenCOR 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. - -OpenCOR 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 . - -*******************************************************************************/ - -//============================================================================== -// Simulation Experiment view information graphs property editor -//============================================================================== - -#include "simulationexperimentviewinformationgraphspropertyeditor.h" - -//============================================================================== - -namespace OpenCOR { -namespace SimulationExperimentView { - -//============================================================================== - -SimulationExperimentViewInformationGraphsPropertyEditor::SimulationExperimentViewInformationGraphsPropertyEditor(QWidget *pParent) : - Core::PropertyEditorWidget(false, false, pParent) -{ -} - -//============================================================================== - -} // namespace SimulationExperimentView -} // namespace OpenCOR - -//============================================================================== -// End of file -//============================================================================== diff --git a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphspropertyeditor.h b/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphspropertyeditor.h deleted file mode 100644 index 563cf58d85..0000000000 --- a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewinformationgraphspropertyeditor.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - -Copyright (C) The University of Auckland - -OpenCOR 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. - -OpenCOR 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 . - -*******************************************************************************/ - -//============================================================================== -// Simulation Experiment view information graphs property editor -//============================================================================== - -#pragma once - -//============================================================================== - -#include "propertyeditorwidget.h" - -//============================================================================== - -namespace OpenCOR { -namespace SimulationExperimentView { - -//============================================================================== - -class SimulationExperimentViewInformationGraphsPropertyEditor : public Core::PropertyEditorWidget -{ - Q_OBJECT - -public: - explicit SimulationExperimentViewInformationGraphsPropertyEditor(QWidget *pParent); -}; - -//============================================================================== - -} // namespace SimulationExperimentView -} // namespace OpenCOR - -//============================================================================== -// End of file -//==============================================================================