diff --git a/GUI/View/Compare/FitComparisonWidget.cpp b/GUI/View/Compare/FitComparisonWidget.cpp index 5c97c32edfbe8e3acddac37fe5c939b306ce262e..06d4a9731cfd19b4db71cb6f369eeb33c21a67f8 100644 --- a/GUI/View/Compare/FitComparisonWidget.cpp +++ b/GUI/View/Compare/FitComparisonWidget.cpp @@ -22,7 +22,7 @@ #include "GUI/View/Intensity/ColorMap.h" #include "GUI/View/Intensity/ColorMapCanvas.h" #include "GUI/View/Intensity/PlotStatusLabel.h" -#include "GUI/View/PropertyEditor/IntensityDataPropertyWidget.h" +#include "GUI/View/PropertyEditor/ItemPropertyWidget.h" #include <QAction> #include <QGridLayout> #include <QVBoxLayout> @@ -34,7 +34,7 @@ FitComparisonWidget::FitComparisonWidget(QWidget* parent) , m_relativeDiffPlot(new ColorMapCanvas) , m_fitFlowWidget(new FitFlowWidget) , m_statusLabel(new PlotStatusLabel(nullptr, this)) - , m_propertyWidget(new IntensityDataPropertyWidget) + , m_propertyWidget(new ItemPropertyWidget) , m_resetViewAction(new QAction(this)) , m_comparisonController(new FitComparisonController2D(this)) { diff --git a/GUI/View/Compare/FitComparisonWidget.h b/GUI/View/Compare/FitComparisonWidget.h index f39de6fd8fb56c7513bca3c41b1131c2171ee501..f4d558c22e1c7ffbb264edeac27fb38dedc6fa14 100644 --- a/GUI/View/Compare/FitComparisonWidget.h +++ b/GUI/View/Compare/FitComparisonWidget.h @@ -25,7 +25,7 @@ class SessionModel; class FitFlowWidget; class PlotStatusLabel; class QAction; -class IntensityDataPropertyWidget; +class ItemPropertyWidget; class PropertyRepeater; class FitComparisonController2D; @@ -59,7 +59,7 @@ private: ColorMapCanvas* m_relativeDiffPlot; FitFlowWidget* m_fitFlowWidget; PlotStatusLabel* m_statusLabel; - IntensityDataPropertyWidget* m_propertyWidget; + ItemPropertyWidget* m_propertyWidget; QAction* m_resetViewAction; FitComparisonController2D* m_comparisonController; diff --git a/GUI/View/Compare/FitComparisonWidget1D.cpp b/GUI/View/Compare/FitComparisonWidget1D.cpp index 987825fde2d350a3db570aefc9319b79c96e9ba8..061bfb12d3f426dd9e2674fb9ecde34551cd05fb 100644 --- a/GUI/View/Compare/FitComparisonWidget1D.cpp +++ b/GUI/View/Compare/FitComparisonWidget1D.cpp @@ -21,7 +21,7 @@ #include "GUI/View/Compare/FitFlowWidget.h" #include "GUI/View/Intensity/Plot1D.h" #include "GUI/View/Intensity/PlotStatusLabel.h" -#include "GUI/View/PropertyEditor/IntensityDataPropertyWidget.h" +#include "GUI/View/PropertyEditor/ItemPropertyWidget.h" #include "GUI/View/SpecularData/Plot1DCanvas.h" #include <QAction> #include <QGridLayout> @@ -33,7 +33,7 @@ FitComparisonWidget1D::FitComparisonWidget1D(QWidget* parent) , m_diff_plot(new Plot1DCanvas) , m_fitFlowWidget(new FitFlowWidget) , m_statusLabel(new PlotStatusLabel(nullptr, this)) - , m_propertyWidget(new IntensityDataPropertyWidget) + , m_propertyWidget(new ItemPropertyWidget) , m_resetViewAction(new QAction(this)) , m_comparisonController(new FitComparison1DViewController(this)) { diff --git a/GUI/View/Compare/FitComparisonWidget1D.h b/GUI/View/Compare/FitComparisonWidget1D.h index 027fe56c0e0501d15773ae6053bdcbef8ce37c53..17f157e85e4a64e474dd5e3a5f729d832ead1878 100644 --- a/GUI/View/Compare/FitComparisonWidget1D.h +++ b/GUI/View/Compare/FitComparisonWidget1D.h @@ -20,7 +20,7 @@ class Data1DViewItem; class FitComparison1DViewController; class FitFlowWidget; -class IntensityDataPropertyWidget; +class ItemPropertyWidget; class JobItem; class Plot1DCanvas; class PlotStatusLabel; @@ -52,7 +52,7 @@ private: Plot1DCanvas* m_diff_plot; FitFlowWidget* m_fitFlowWidget; PlotStatusLabel* m_statusLabel; - IntensityDataPropertyWidget* m_propertyWidget; + ItemPropertyWidget* m_propertyWidget; QAction* m_resetViewAction; FitComparison1DViewController* m_comparisonController; diff --git a/GUI/View/Intensity/IntensityDataWidget.cpp b/GUI/View/Intensity/IntensityDataWidget.cpp index c54272d6d25f58bd5b9a4f468fa5f7d9f798e202..323be672082b2a93c952ff419f41e9065f9f3320 100644 --- a/GUI/View/Intensity/IntensityDataWidget.cpp +++ b/GUI/View/Intensity/IntensityDataWidget.cpp @@ -17,14 +17,14 @@ #include "GUI/Model/Data/IntensityDataItem.h" #include "GUI/View/Intensity/IntensityDataCanvas.h" #include "GUI/View/Intensity/IntensityDataFFTPresenter.h" -#include "GUI/View/PropertyEditor//IntensityDataPropertyWidget.h" +#include "GUI/View/PropertyEditor/ItemPropertyWidget.h" #include <QBoxLayout> #include <QMenu> IntensityDataWidget::IntensityDataWidget(QWidget* parent) : SessionItemWidget(parent) , m_intensityCanvas(new IntensityDataCanvas) - , m_propertyWidget(new IntensityDataPropertyWidget) + , m_propertyWidget(new ItemPropertyWidget) , m_fftPresenter(new IntensityDataFFTPresenter(this)) { setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); diff --git a/GUI/View/Intensity/IntensityDataWidget.h b/GUI/View/Intensity/IntensityDataWidget.h index 2d88a7bcb97337a0fafcbe2faaab02e8d86eb34f..0a9a610118e0c8d2ab8c0e9263967095bae77a81 100644 --- a/GUI/View/Intensity/IntensityDataWidget.h +++ b/GUI/View/Intensity/IntensityDataWidget.h @@ -20,14 +20,14 @@ class SessionItem; class IntensityDataCanvas; -class IntensityDataPropertyWidget; +class ItemPropertyWidget; class IntensityDataItem; class QAction; class QContextMenuEvent; class IntensityDataFFTPresenter; //! A common widget to display color map (IntensityDataCanvas) and properties -//! (IntensityDataPropertyWidget) of intensity data item. +//! (ItemPropertyWidget) of intensity data item. class IntensityDataWidget : public SessionItemWidget { Q_OBJECT @@ -47,7 +47,7 @@ private: IntensityDataItem* intensityDataItem(); IntensityDataCanvas* m_intensityCanvas; - IntensityDataPropertyWidget* m_propertyWidget; + ItemPropertyWidget* m_propertyWidget; IntensityDataFFTPresenter* m_fftPresenter; }; diff --git a/GUI/View/Mask/MaskEditorPropertyPanel.cpp b/GUI/View/Mask/MaskEditorPropertyPanel.cpp index b306d4702de6b614d929748036f1d453169553a7..b02e6b9252218187b3603516bf284354fca70910 100644 --- a/GUI/View/Mask/MaskEditorPropertyPanel.cpp +++ b/GUI/View/Mask/MaskEditorPropertyPanel.cpp @@ -16,7 +16,7 @@ #include "GUI/Model/Data/IntensityDataItem.h" #include "GUI/Model/Session/SessionModel.h" #include "GUI/View/PropertyEditor/ComponentTreeView.h" -#include "GUI/View/PropertyEditor/IntensityDataPropertyWidget.h" +#include "GUI/View/PropertyEditor/ItemPropertyWidget.h" #include "GUI/View/Tool/GroupBoxCollapser.h" #include <QGroupBox> @@ -27,7 +27,7 @@ MaskEditorPropertyPanel::MaskEditorPropertyPanel(QWidget* parent) : QWidget(parent) , m_listView(new QListView) , m_maskPropertyEditor(new ComponentTreeView) - , m_plotPropertyEditor(new IntensityDataPropertyWidget) + , m_plotPropertyEditor(new ItemPropertyWidget) , m_maskModel(nullptr) , m_intensityDataItem(nullptr) { diff --git a/GUI/View/Mask/MaskEditorPropertyPanel.h b/GUI/View/Mask/MaskEditorPropertyPanel.h index 8aeae2e3d638dbb5b72b5020cf1a70270ca9b1bc..396ccdf7cb84d963131e7d8cf44035d2801c3015 100644 --- a/GUI/View/Mask/MaskEditorPropertyPanel.h +++ b/GUI/View/Mask/MaskEditorPropertyPanel.h @@ -25,7 +25,7 @@ class ComponentTreeView; class QItemSelection; class QItemSelectionModel; class IntensityDataItem; -class IntensityDataPropertyWidget; +class ItemPropertyWidget; //! Tool widget for MaskEditor @@ -56,7 +56,7 @@ private slots: private: QListView* m_listView; ComponentTreeView* m_maskPropertyEditor; - IntensityDataPropertyWidget* m_plotPropertyEditor; + ItemPropertyWidget* m_plotPropertyEditor; SessionModel* m_maskModel; QModelIndex m_rootIndex; IntensityDataItem* m_intensityDataItem; diff --git a/GUI/View/Projection/ProjectionsEditor.cpp b/GUI/View/Projection/ProjectionsEditor.cpp index 04045c0c401b682c3a589ef1d1c67b54f75dc65c..b59225e46a8aa4f3c43670a0e89199598c752d5b 100644 --- a/GUI/View/Projection/ProjectionsEditor.cpp +++ b/GUI/View/Projection/ProjectionsEditor.cpp @@ -19,7 +19,7 @@ #include "GUI/View/Projection/ProjectionsEditorCanvas.h" #include "GUI/View/Projection/ProjectionsToolBar.h" #include "GUI/View/Projection/ProjectionsWidget.h" -#include "GUI/View/PropertyEditor/IntensityDataPropertyWidget.h" +#include "GUI/View/PropertyEditor/ItemPropertyWidget.h" #include <QItemSelectionModel> #include <QSplitter> @@ -29,7 +29,7 @@ ProjectionsEditor::ProjectionsEditor(QWidget* parent) , m_toolBar(new ProjectionsToolBar(m_editorActions)) , m_projectionsCanvas(new ProjectionsEditorCanvas) , m_projectionsWidget(new ProjectionsWidget) - , m_propertyPanel(new IntensityDataPropertyWidget) + , m_propertyPanel(new ItemPropertyWidget) , m_selectionModel(nullptr) { addToolBar(Qt::RightToolBarArea, m_toolBar); diff --git a/GUI/View/Projection/ProjectionsEditor.h b/GUI/View/Projection/ProjectionsEditor.h index c1dd54eb3d8a4dcac75483e7df44cf2f885dc382..7057965e309933e53a91c78e95536ac7f2e3de32 100644 --- a/GUI/View/Projection/ProjectionsEditor.h +++ b/GUI/View/Projection/ProjectionsEditor.h @@ -26,7 +26,7 @@ class ProjectionsActions; class ProjectionsEditorCanvas; class ProjectionsWidget; class QItemSelectionModel; -class IntensityDataPropertyWidget; +class ItemPropertyWidget; //! Editor to draw projections on top of intensity plot. Part of @@ -50,7 +50,7 @@ private: ProjectionsToolBar* m_toolBar; //! main tool bar with bottoms at the right ProjectionsEditorCanvas* m_projectionsCanvas; //! canvas with color map at the top ProjectionsWidget* m_projectionsWidget; //! bottom widget to draw projections plot - IntensityDataPropertyWidget* m_propertyPanel; //! panel at the right with properties + ItemPropertyWidget* m_propertyPanel; //! panel at the right with properties QItemSelectionModel* m_selectionModel; }; diff --git a/GUI/View/PropertyEditor/IntensityDataPropertyWidget.cpp b/GUI/View/PropertyEditor/ItemPropertyWidget.cpp similarity index 65% rename from GUI/View/PropertyEditor/IntensityDataPropertyWidget.cpp rename to GUI/View/PropertyEditor/ItemPropertyWidget.cpp index acda658790fa45c4d1bcd250dfef2d9fae668d9a..41320f72a953118170e6a0d33626235adf157af0 100644 --- a/GUI/View/PropertyEditor/IntensityDataPropertyWidget.cpp +++ b/GUI/View/PropertyEditor/ItemPropertyWidget.cpp @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/PropertyEditor/IntensityDataPropertyWidget.cpp -//! @brief Implements class IntensityDataPropertyWidget +//! @file GUI/View/PropertyEditor/ItemPropertyWidget.cpp +//! @brief Implements class ItemPropertyWidget //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -12,20 +12,19 @@ // // ************************************************************************************************ -#include "GUI/View/PropertyEditor/IntensityDataPropertyWidget.h" +#include "GUI/View/PropertyEditor/ItemPropertyWidget.h" #include "GUI/View/PropertyEditor/ComponentTreeView.h" #include "GUI/View/Tool/StyleUtils.h" #include <QAction> #include <QVBoxLayout> -IntensityDataPropertyWidget::IntensityDataPropertyWidget(QWidget* parent) +ItemPropertyWidget::ItemPropertyWidget(QWidget* parent) : SessionItemWidget(parent) , m_togglePanelAction(new QAction(this)) , m_componentEditor(new ComponentTreeView) { setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); - setWindowTitle(QLatin1String("Intensity Data Properties")); - setObjectName(QLatin1String("Intensity Data Properties")); + setWindowTitle("Properties"); m_componentEditor->setShowHeader(false); @@ -39,43 +38,42 @@ IntensityDataPropertyWidget::IntensityDataPropertyWidget(QWidget* parent) m_togglePanelAction->setIcon(QIcon(":/images/dock-right.svg")); m_togglePanelAction->setToolTip("Toggle property panel"); m_togglePanelAction->setCheckable(true); - connect(m_togglePanelAction, &QAction::toggled, this, - &IntensityDataPropertyWidget::onTogglePanelAction); + connect(m_togglePanelAction, &QAction::toggled, this, &ItemPropertyWidget::onTogglePanelAction); } -QSize IntensityDataPropertyWidget::sizeHint() const +QSize ItemPropertyWidget::sizeHint() const { return QSize(GUI::Util::Style::PropertyPanelWidth() * 1.2, GUI::Util::Style::PropertyPanelWidth() * 2); } -QSize IntensityDataPropertyWidget::minimumSizeHint() const +QSize ItemPropertyWidget::minimumSizeHint() const { return QSize(GUI::Util::Style::PropertyPanelWidth() * 1.2, GUI::Util::Style::PropertyPanelWidth()); } -QList<QAction*> IntensityDataPropertyWidget::actionList() +QList<QAction*> ItemPropertyWidget::actionList() { return QList<QAction*>() << m_togglePanelAction; } -void IntensityDataPropertyWidget::onTogglePanelAction(bool toggled) +void ItemPropertyWidget::onTogglePanelAction(bool toggled) { setVisible(toggled); } -void IntensityDataPropertyWidget::subscribeToItem() +void ItemPropertyWidget::subscribeToItem() { m_componentEditor->setItem(currentItem()); } -void IntensityDataPropertyWidget::unsubscribeFromItem() +void ItemPropertyWidget::unsubscribeFromItem() { m_componentEditor->setItem(nullptr); } -void IntensityDataPropertyWidget::contextMenuEvent(QContextMenuEvent*) +void ItemPropertyWidget::contextMenuEvent(QContextMenuEvent*) { // Reimplemented to suppress menu from main window } diff --git a/GUI/View/PropertyEditor/IntensityDataPropertyWidget.h b/GUI/View/PropertyEditor/ItemPropertyWidget.h similarity index 65% rename from GUI/View/PropertyEditor/IntensityDataPropertyWidget.h rename to GUI/View/PropertyEditor/ItemPropertyWidget.h index 718b0487b168e3d732368f1c348f1d113fa11503..1683e71c7ce1d43ee1aeb8de44d66f8bc0a04e59 100644 --- a/GUI/View/PropertyEditor/IntensityDataPropertyWidget.h +++ b/GUI/View/PropertyEditor/ItemPropertyWidget.h @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/PropertyEditor/IntensityDataPropertyWidget.h -//! @brief Defines class IntensityDataPropertyWidget +//! @file GUI/View/PropertyEditor/ItemPropertyWidget.h +//! @brief Defines class ItemPropertyWidget //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -12,8 +12,8 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_INTENSITYDATAPROPERTYWIDGET_H -#define BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_INTENSITYDATAPROPERTYWIDGET_H +#ifndef BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_ITEMROPERTYWIDGET_H +#define BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_ITEMROPERTYWIDGET_H #include "GUI/View/Common/SessionItemWidget.h" @@ -21,12 +21,12 @@ class IntensityDataItem; class ComponentTreeView; class SessionItem; -//! The IntensityDataPropertyWidget shows ComponentEditor for given IntensityDataItem. +//! The ItemPropertyWidget shows ComponentTree for given Item. -class IntensityDataPropertyWidget : public SessionItemWidget { +class ItemPropertyWidget : public SessionItemWidget { Q_OBJECT public: - explicit IntensityDataPropertyWidget(QWidget* parent = nullptr); + explicit ItemPropertyWidget(QWidget* parent = nullptr); QSize sizeHint() const override; QSize minimumSizeHint() const override; @@ -46,4 +46,4 @@ private: ComponentTreeView* m_componentEditor; }; -#endif // BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_INTENSITYDATAPROPERTYWIDGET_H +#endif // BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_ITEMROPERTYWIDGET_H diff --git a/GUI/View/SpecularData/SpecularDataWidget.cpp b/GUI/View/SpecularData/SpecularDataWidget.cpp index 4764f8539369065a3812432f855b2d7fbff76803..bb4e70bbb2b66b7f2bb6e92b90a04b5277fc09fb 100644 --- a/GUI/View/SpecularData/SpecularDataWidget.cpp +++ b/GUI/View/SpecularData/SpecularDataWidget.cpp @@ -15,7 +15,7 @@ #include "GUI/View/SpecularData/SpecularDataWidget.h" #include "GUI/Model/Data/DataItemUtils.h" #include "GUI/Model/Data/SpecularDataItem.h" -#include "GUI/View/PropertyEditor/IntensityDataPropertyWidget.h" +#include "GUI/View/PropertyEditor/ItemPropertyWidget.h" #include "GUI/View/SpecularData/SpecularDataCanvas.h" #include <QBoxLayout> #include <QMenu> @@ -23,7 +23,7 @@ SpecularDataWidget::SpecularDataWidget(QWidget* parent) : SessionItemWidget(parent) , m_intensity_canvas(new SpecularDataCanvas) - , m_property_widget(new IntensityDataPropertyWidget) + , m_property_widget(new ItemPropertyWidget) { setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); diff --git a/GUI/View/SpecularData/SpecularDataWidget.h b/GUI/View/SpecularData/SpecularDataWidget.h index 0eed97483036cba056b037ebe076f2fe184b8a50..c871b073ee41649fbcd7272143edbcda835b14fd 100644 --- a/GUI/View/SpecularData/SpecularDataWidget.h +++ b/GUI/View/SpecularData/SpecularDataWidget.h @@ -19,7 +19,7 @@ class SpecularDataCanvas; class SpecularDataItem; -class IntensityDataPropertyWidget; +class ItemPropertyWidget; class SpecularDataWidget : public SessionItemWidget { Q_OBJECT @@ -38,7 +38,7 @@ private: SpecularDataItem* specularDataItem(); SpecularDataCanvas* m_intensity_canvas; - IntensityDataPropertyWidget* m_property_widget; + ItemPropertyWidget* m_property_widget; }; #endif // BORNAGAIN_GUI_VIEW_SPECULARDATA_SPECULARDATAWIDGET_H