diff --git a/GUI/View/Import/RealDataMaskWidget.cpp b/GUI/View/Import/RealDataMaskWidget.cpp index 53d997205768c7c4860071d32b0d7968a45f5409..d33b59cfe1ae8d3f2abc196193c5036f4554b4dd 100644 --- a/GUI/View/Import/RealDataMaskWidget.cpp +++ b/GUI/View/Import/RealDataMaskWidget.cpp @@ -25,7 +25,6 @@ RealDataMaskWidget::RealDataMaskWidget(QWidget* parent) : DataAccessWidget(parent) , m_editorActions(new MaskEditorActions(this)) - , m_toolbar(new MaskEditorToolbar(m_editorActions)) , m_editorPropertyPanel(new MaskEditorPropertyPanel) , m_editorCanvas(new MaskEditorCanvas) { @@ -42,13 +41,54 @@ RealDataMaskWidget::RealDataMaskWidget(QWidget* parent) mainLayout->setSpacing(0); mainLayout->setContentsMargins(0, 0, 0, 0); - m_toolbar->setOrientation(Qt::Vertical); - m_toolbar->setStyleSheet("QToolBar{border-left:1px solid rgb(180,180,180);}"); - mainLayout->addWidget(m_toolbar); - - setup_connections(); + auto* toolbar = new MaskEditorToolbar(m_editorActions); + toolbar->setOrientation(Qt::Vertical); + toolbar->setStyleSheet("QToolBar{border-left:1px solid rgb(180,180,180);}"); + mainLayout->addWidget(toolbar); m_editorPropertyPanel->setPanelHidden(true); + + //... Connections + + // reset view request is propagated from editorActions to graphics view + connect(m_editorActions, &MaskEditorActions::resetViewRequest, m_editorCanvas, + &MaskEditorCanvas::onResetViewRequest); + + // tool panel request is propagated from editorActions to this MaskEditor + connect(m_editorActions, &MaskEditorActions::propertyPanelRequest, this, + &RealDataMaskWidget::onPropertyPanelRequest); + + // save plot request is propagated from editorActions to graphics scene + connect(m_editorActions, &MaskEditorActions::savePlotRequest, m_editorCanvas, + &MaskEditorCanvas::onSavePlotRequest); + + // selection/drawing activity is propagated from Toolbar to graphics scene + connect(toolbar, &MaskEditorToolbar::activityModeChanged, m_editorCanvas->getScene(), + &MaskGraphicsScene::onActivityModeChanged); + + // mask value is propagated from Toolbar to graphics scene + connect(toolbar, &MaskEditorToolbar::maskValueChanged, m_editorCanvas->getScene(), + &MaskGraphicsScene::onMaskValueChanged); + + // show results request is propagated from Toolbar to Canvas + connect(toolbar, &MaskEditorToolbar::presentationTypeRequest, m_editorCanvas, + &MaskEditorCanvas::onPresentationTypeRequest); + + // space bar push (request for zoom mode) is propagated from graphics view to Toolbar + connect(m_editorCanvas, &MaskEditorCanvas::changeActivityRequest, toolbar, + &MaskEditorToolbar::onChangeActivityRequest); + + // Delete request is propagated from canvas to actions + connect(m_editorCanvas, &MaskEditorCanvas::deleteSelectedRequest, m_editorActions, + &MaskEditorActions::onDeleteMaskAction); + + // context menu request is propagated from graphics scene to MaskEditorActions + connect(m_editorCanvas->getScene(), &MaskGraphicsScene::itemContextMenuRequest, m_editorActions, + &MaskEditorActions::onItemContextMenuRequest); + + // context menu request is propagated from PropertyPanel to MaskEditorActions + connect(m_editorPropertyPanel, &MaskEditorPropertyPanel::itemContextMenuRequest, + m_editorActions, &MaskEditorActions::onItemContextMenuRequest); } void RealDataMaskWidget::setJobOrRealItem(QObject* job_or_real_item) @@ -108,46 +148,3 @@ void RealDataMaskWidget::hideEvent(QHideEvent*) { resetContext(); } - -void RealDataMaskWidget::setup_connections() -{ - // reset view request is propagated from editorActions to graphics view - connect(m_editorActions, &MaskEditorActions::resetViewRequest, m_editorCanvas, - &MaskEditorCanvas::onResetViewRequest); - - // tool panel request is propagated from editorActions to this MaskEditor - connect(m_editorActions, &MaskEditorActions::propertyPanelRequest, this, - &RealDataMaskWidget::onPropertyPanelRequest); - - // save plot request is propagated from editorActions to graphics scene - connect(m_editorActions, &MaskEditorActions::savePlotRequest, m_editorCanvas, - &MaskEditorCanvas::onSavePlotRequest); - - // selection/drawing activity is propagated from Toolbar to graphics scene - connect(m_toolbar, &MaskEditorToolbar::activityModeChanged, m_editorCanvas->getScene(), - &MaskGraphicsScene::onActivityModeChanged); - - // mask value is propagated from Toolbar to graphics scene - connect(m_toolbar, &MaskEditorToolbar::maskValueChanged, m_editorCanvas->getScene(), - &MaskGraphicsScene::onMaskValueChanged); - - // show results request is propagated from Toolbar to Canvas - connect(m_toolbar, &MaskEditorToolbar::presentationTypeRequest, m_editorCanvas, - &MaskEditorCanvas::onPresentationTypeRequest); - - // space bar push (request for zoom mode) is propagated from graphics view to Toolbar - connect(m_editorCanvas, &MaskEditorCanvas::changeActivityRequest, m_toolbar, - &MaskEditorToolbar::onChangeActivityRequest); - - // Delete request is propagated from canvas to actions - connect(m_editorCanvas, &MaskEditorCanvas::deleteSelectedRequest, m_editorActions, - &MaskEditorActions::onDeleteMaskAction); - - // context menu request is propagated from graphics scene to MaskEditorActions - connect(m_editorCanvas->getScene(), &MaskGraphicsScene::itemContextMenuRequest, m_editorActions, - &MaskEditorActions::onItemContextMenuRequest); - - // context menu request is propagated from PropertyPanel to MaskEditorActions - connect(m_editorPropertyPanel, &MaskEditorPropertyPanel::itemContextMenuRequest, - m_editorActions, &MaskEditorActions::onItemContextMenuRequest); -} diff --git a/GUI/View/Import/RealDataMaskWidget.h b/GUI/View/Import/RealDataMaskWidget.h index 234ae0496caf6fb93028923c4c9d6b9cc0606a1d..eb276d4e9db686ccd2468f5bd6d20edf5ce05937 100644 --- a/GUI/View/Import/RealDataMaskWidget.h +++ b/GUI/View/Import/RealDataMaskWidget.h @@ -20,7 +20,6 @@ class MaskEditorActions; class MaskEditorCanvas; class MaskEditorPropertyPanel; -class MaskEditorToolbar; //! Mask editing for RealItem on ImportDataView. @@ -39,11 +38,9 @@ private: void showEvent(QShowEvent*) override; void hideEvent(QHideEvent*) override; - void setup_connections(); void onPropertyPanelRequest(); MaskEditorActions* m_editorActions; - MaskEditorToolbar* m_toolbar; MaskEditorPropertyPanel* m_editorPropertyPanel; MaskEditorCanvas* m_editorCanvas; }; diff --git a/GUI/View/Import/RealDataPresenter.h b/GUI/View/Import/RealDataPresenter.h index 9f5804244e6ea614a0450497ca08c4eaf2bd9df4..c088a531a27f33df89492b9bdc41229abaafcb50 100644 --- a/GUI/View/Import/RealDataPresenter.h +++ b/GUI/View/Import/RealDataPresenter.h @@ -28,7 +28,7 @@ public: void setPresentation(const QString& presentationType) override; void setModel(QObject*) {} -protected: +private: QStringList activePresentationList() const override; QString itemPresentation() const override; }; diff --git a/GUI/View/Mask/MaskAllView.cpp b/GUI/View/Mask/MaskAllView.cpp index 87731eb1459fd81c4e11cc0f6cbd3b8255eef7a1..2ea56b88c9191e2a5ec24617bfe2a2ec5bfe2b90 100644 --- a/GUI/View/Mask/MaskAllView.cpp +++ b/GUI/View/Mask/MaskAllView.cpp @@ -14,7 +14,7 @@ #include "GUI/View/Mask/MaskAllView.h" #include "GUI/Model/Data/MaskItems.h" -#include "GUI/View/Mask/SceneAdaptor.h" +#include "GUI/View/Shape/SceneAdaptor.h" #include <QBrush> #include <QPainter> #include <QStyleOptionGraphicsItem> diff --git a/GUI/View/Mask/MaskAllView.h b/GUI/View/Mask/MaskAllView.h index 445e7f5754741196f9f356339b32fa2abcec32fe..634162a0d29a6b8993b0d0ec740e5999aa4523c5 100644 --- a/GUI/View/Mask/MaskAllView.h +++ b/GUI/View/Mask/MaskAllView.h @@ -15,7 +15,7 @@ #ifndef BORNAGAIN_GUI_VIEW_MASK_MASKALLVIEW_H #define BORNAGAIN_GUI_VIEW_MASK_MASKALLVIEW_H -#include "GUI/View/Mask/IShape2DView.h" +#include "GUI/View/Shape/IShape2DView.h" class MaskAllItem; diff --git a/GUI/View/Mask/MaskContainerView.cpp b/GUI/View/Mask/MaskContainerView.cpp index 5e8d0b90520284a0ff1d67a8e7a05c1cd7591789..4bfb2c3d46a122d8ee39d5c41e7d299ec6c9f427 100644 --- a/GUI/View/Mask/MaskContainerView.cpp +++ b/GUI/View/Mask/MaskContainerView.cpp @@ -15,7 +15,7 @@ #include "GUI/View/Mask/MaskContainerView.h" #include "GUI/Model/Data/MaskItems.h" #include "GUI/Model/Data/ProjectionItems.h" -#include "GUI/View/Mask/SceneAdaptor.h" +#include "GUI/View/Shape/SceneAdaptor.h" #include <QBrush> #include <QPainter> #include <QStyleOptionGraphicsItem> diff --git a/GUI/View/Mask/MaskContainerView.h b/GUI/View/Mask/MaskContainerView.h index 86ae900bce1081eeb25c27e9a8f0516756cb3347..0a8dca8596381c7eb8da6197e3c4204c7df7c852 100644 --- a/GUI/View/Mask/MaskContainerView.h +++ b/GUI/View/Mask/MaskContainerView.h @@ -15,8 +15,8 @@ #ifndef BORNAGAIN_GUI_VIEW_MASK_MASKCONTAINERVIEW_H #define BORNAGAIN_GUI_VIEW_MASK_MASKCONTAINERVIEW_H -#include "GUI/View/Mask/IShape2DView.h" -#include "GUI/View/Mask/SizeHandleElement.h" +#include "GUI/View/Shape/IShape2DView.h" +#include "GUI/View/Shape/SizeHandleElement.h" #include <QMap> class MaskContainerItem; diff --git a/GUI/View/Mask/MaskEditorCanvas.cpp b/GUI/View/Mask/MaskEditorCanvas.cpp index 14089a9872d7ae1531e3477bcff1c3a087be5ce4..977145b118905d7dbf92dd3708e3eaa9020b1f50 100644 --- a/GUI/View/Mask/MaskEditorCanvas.cpp +++ b/GUI/View/Mask/MaskEditorCanvas.cpp @@ -19,8 +19,8 @@ #include "GUI/View/Mask/MaskGraphicsScene.h" #include "GUI/View/Mask/MaskGraphicsView.h" #include "GUI/View/Mask/MaskResultsPresenter.h" -#include "GUI/View/PlotScale/ColorMap.h" #include "GUI/View/PlotScale/SavePlotAssistant.h" +#include "GUI/View/PlotUtil/ColorMap.h" #include "GUI/View/PlotUtil/PlotStatusLabel.h" #include <QVBoxLayout> @@ -52,7 +52,7 @@ void MaskEditorCanvas::setMaskContext(Data2DItem* data2DItem) { m_data2DItem = data2DItem; - m_scene->setMaskContext(data2DItem, data2DItem->maskContainerItem()); + m_scene->setAssociatedItems(data2DItem, data2DItem->maskContainerItem()); m_resultsPresenter->setMaskContext(data2DItem); m_view->updateSize(m_view->size()); diff --git a/GUI/View/Mask/MaskEditorPropertyPanel.h b/GUI/View/Mask/MaskEditorPropertyPanel.h index c5b5dfb1d629116703cf892800f5e81a6dec9ade..49317558d4d0c4d66b1bb834f588c8b0b7bc4daa 100644 --- a/GUI/View/Mask/MaskEditorPropertyPanel.h +++ b/GUI/View/Mask/MaskEditorPropertyPanel.h @@ -65,14 +65,12 @@ private: void addMaskCheckBox(const QString& title, std::function<bool()> getter, std::function<void(bool)> setter); - //! Return the mask item for the given index. nullptr if index invalid or not pointing to a mask - //! item. + //! Returns the mask item for the given index, or nullptr if invalid. MaskItem* maskItemForIndex(const QModelIndex& index); //! Creates the UI to edit the current mask's properties void createMaskEditorUI(); -private: QListView* m_listView; IntensityDataPropertyWidget* m_propertyPanel; MaskContainerModel* m_maskContainerModel; diff --git a/GUI/View/Mask/MaskGraphicsProxy.cpp b/GUI/View/Mask/MaskGraphicsProxy.cpp index a81ffed8c906cf469c3d694ecd183f7236ba27d3..72bc93783f71cb47d2dab6741f538a6e33980ce9 100644 --- a/GUI/View/Mask/MaskGraphicsProxy.cpp +++ b/GUI/View/Mask/MaskGraphicsProxy.cpp @@ -14,8 +14,8 @@ #include "GUI/View/Mask/MaskGraphicsProxy.h" #include "GUI/Model/Data/Data2DItem.h" -#include "GUI/View/Mask/SceneAdaptor.h" -#include "GUI/View/PlotScale/ColorMap.h" +#include "GUI/View/PlotUtil/ColorMap.h" +#include "GUI/View/Shape/SceneAdaptor.h" #include <QGraphicsSceneMouseEvent> MaskGraphicsProxy::MaskGraphicsProxy() diff --git a/GUI/View/Mask/MaskGraphicsProxy.h b/GUI/View/Mask/MaskGraphicsProxy.h index 2ec82d09e192a668ab90e63ebaa96f1f1f230f32..ab29e42e06f114848d3617033daac6ce0f76c994 100644 --- a/GUI/View/Mask/MaskGraphicsProxy.h +++ b/GUI/View/Mask/MaskGraphicsProxy.h @@ -15,7 +15,7 @@ #ifndef BORNAGAIN_GUI_VIEW_MASK_MASKGRAPHICSPROXY_H #define BORNAGAIN_GUI_VIEW_MASK_MASKGRAPHICSPROXY_H -#include "GUI/View/Mask/MaskEditorHelper.h" +#include "GUI/View/Shape/MaskEditorHelper.h" #include <QGraphicsProxyWidget> class ColorMap; diff --git a/GUI/View/Mask/MaskGraphicsScene.cpp b/GUI/View/Mask/MaskGraphicsScene.cpp index 1cdcf05b0d9bf00d0aea640568ce2be704c9c032..e2549a9f2205e4b140bc1ac87f8b435f29968844 100644 --- a/GUI/View/Mask/MaskGraphicsScene.cpp +++ b/GUI/View/Mask/MaskGraphicsScene.cpp @@ -19,8 +19,8 @@ #include "GUI/Model/Project/ProjectDocument.h" #include "GUI/View/Mask/MaskGraphicsProxy.h" #include "GUI/View/Mask/MaskViewFactory.h" -#include "GUI/View/Mask/PolygonView.h" -#include "GUI/View/Mask/SceneAdaptor.h" +#include "GUI/View/Shape/PolygonView.h" +#include "GUI/View/Shape/SceneAdaptor.h" #include <QGraphicsSceneContextMenuEvent> #include <boost/polymorphic_cast.hpp> @@ -33,6 +33,7 @@ const qreal min_distance_to_create_rect = 10; } // namespace + MaskGraphicsScene::MaskGraphicsScene(QObject* parent) : QGraphicsScene(parent) { @@ -43,12 +44,13 @@ MaskGraphicsScene::MaskGraphicsScene(QObject* parent) MaskGraphicsScene::~MaskGraphicsScene() { - // Fix within #1792 + // Fix along with redmine#1792 if (m_proxy) m_proxy->setSceneAdaptor(nullptr); } -void MaskGraphicsScene::setMaskContext(Data2DItem* data2DItem, MaskContainerItem* maskContainerItem) +void MaskGraphicsScene::setAssociatedItems(Data2DItem* data2DItem, + MaskContainerItem* maskContainerItem) { if (!data2DItem) return; @@ -233,9 +235,6 @@ void MaskGraphicsScene::onSceneSelectionChanged() m_block_selection = true; - if (!m_selectionModel) - return; - m_selectionModel->clearSelection(); for (QGraphicsItem* graphicsItem : selectedItems()) { diff --git a/GUI/View/Mask/MaskGraphicsScene.h b/GUI/View/Mask/MaskGraphicsScene.h index 681fbe7b2fcbc69890653af3a4e4eb58d3f85c84..b63d1cbd2beaf82fc4ae43bfbccdf8b0b72a115f 100644 --- a/GUI/View/Mask/MaskGraphicsScene.h +++ b/GUI/View/Mask/MaskGraphicsScene.h @@ -16,14 +16,14 @@ #define BORNAGAIN_GUI_VIEW_MASK_MASKGRAPHICSSCENE_H #include "GUI/View/Mask/MaskDrawingContext.h" -#include "GUI/View/Mask/MaskEditorHelper.h" +#include "GUI/View/Shape/MaskEditorHelper.h" #include <QGraphicsScene> #include <QItemSelection> #include <QItemSelectionModel> -class SceneAdaptor; -class IShape2DView; +class ColorMap; class Data2DItem; +class IShape2DView; class MaskContainerItem; class MaskContainerModel; class MaskEditorAction; @@ -31,8 +31,7 @@ class MaskGraphicsProxy; class MaskItem; class MaskItemObject; class PolygonView; - -class ColorMap; +class SceneAdaptor; //! Graphics scene for MaskEditorCanvas to draw masks on top of intensity data widgets. @@ -42,13 +41,14 @@ public: MaskGraphicsScene(QObject* parent = nullptr); ~MaskGraphicsScene() override; - void setMaskContext(Data2DItem* data2DItem, MaskContainerItem* maskContainerItem); + void setAssociatedItems(Data2DItem* data2DItem, MaskContainerItem* maskContainerItem); void resetContext(); void setSelectionModel(QItemSelectionModel* selectionModel); ColorMap* colorMap(); + signals: void itemContextMenuRequest(const QPoint& point); void lineItemProcessed(); @@ -70,14 +70,13 @@ private slots: void onSceneSelectionChanged(); void onMaskMove(); -protected: +private: void mousePressEvent(QGraphicsSceneMouseEvent* event) override; void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override; void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override; void drawForeground(QPainter* painter, const QRectF& rect) override; void contextMenuEvent(QGraphicsSceneContextMenuEvent* event) override; -private: void updateProxyWidget(); void updateViews(); IShape2DView* addViewForItem(MaskItemObject* item); diff --git a/GUI/View/Mask/MaskGraphicsView.cpp b/GUI/View/Mask/MaskGraphicsView.cpp index 4afd3d44ac1b81694301ae84265762dcbaca1929..c69a2b17070ac7a3202ea542bc3c9be33477bcc2 100644 --- a/GUI/View/Mask/MaskGraphicsView.cpp +++ b/GUI/View/Mask/MaskGraphicsView.cpp @@ -28,6 +28,7 @@ const double zoom_step = 0.05; } // namespace + MaskGraphicsView::MaskGraphicsView(QGraphicsScene* scene, QWidget* parent) : QGraphicsView(scene, parent) , m_current_zoom_value(1.0) diff --git a/GUI/View/Mask/MaskViewFactory.cpp b/GUI/View/Mask/MaskViewFactory.cpp index c3d730d49a2df8316cf4aaff7cb5e537dc4982cb..944f483459da5d5fbb030909d267c3f20a623bf4 100644 --- a/GUI/View/Mask/MaskViewFactory.cpp +++ b/GUI/View/Mask/MaskViewFactory.cpp @@ -15,13 +15,13 @@ #include "GUI/View/Mask/MaskViewFactory.h" #include "GUI/Model/Data/MaskItems.h" #include "GUI/Model/Data/ProjectionItems.h" -#include "GUI/View/Mask/EllipseView.h" -#include "GUI/View/Mask/LineViews.h" #include "GUI/View/Mask/MaskAllView.h" #include "GUI/View/Mask/MaskContainerView.h" -#include "GUI/View/Mask/PolygonPointView.h" -#include "GUI/View/Mask/PolygonView.h" #include "GUI/View/Mask/RegionOfInterestView.h" +#include "GUI/View/Shape/EllipseView.h" +#include "GUI/View/Shape/LineViews.h" +#include "GUI/View/Shape/PolygonPointView.h" +#include "GUI/View/Shape/PolygonView.h" #include <boost/polymorphic_cast.hpp> diff --git a/GUI/View/Mask/MaskWidgets.qrc b/GUI/View/Mask/MaskWidgets.qrc index b7d41f68afafbc84326969276666a0f90e63d42e..fdf067e3ec8e415630adb446e0f29e117b8426ad 100644 --- a/GUI/View/Mask/MaskWidgets.qrc +++ b/GUI/View/Mask/MaskWidgets.qrc @@ -1,21 +1,21 @@ <RCC> <qresource prefix="/Mask"> <file>images/maskeditor_arrow.svg</file> - <file>images/maskeditor_hand.svg</file> - <file>images/maskeditor_refresh.svg</file> - <file>images/maskeditor_rectangle.svg</file> - <file>images/maskeditor_ellipse.svg</file> - <file>images/maskeditor_polygon.svg</file> <file>images/maskeditor_bringtofront.svg</file> - <file>images/maskeditor_sendtoback.svg</file> - <file>images/maskeditor_maskall.svg</file> - <file>images/maskeditor_verticalline.svg</file> + <file>images/maskeditor_ellipse.svg</file> + <file>images/maskeditor_hand.svg</file> <file>images/maskeditor_horizontalline.svg</file> - <file>images/maskeditor_toolpanel.svg</file> - <file>images/maskeditor_masktrue.svg</file> - <file>images/maskeditor_maskfalse.svg</file> <file>images/maskeditor_lightbulb.svg</file> + <file>images/maskeditor_maskall.svg</file> + <file>images/maskeditor_maskfalse.svg</file> + <file>images/maskeditor_masktrue.svg</file> + <file>images/maskeditor_polygon.svg</file> + <file>images/maskeditor_rectangle.svg</file> + <file>images/maskeditor_refresh.svg</file> <file>images/maskeditor_roi.svg</file> <file>images/maskeditor_save.svg</file> + <file>images/maskeditor_sendtoback.svg</file> + <file>images/maskeditor_toolpanel.svg</file> + <file>images/maskeditor_verticalline.svg</file> </qresource> </RCC> diff --git a/GUI/View/Mask/RegionOfInterestView.cpp b/GUI/View/Mask/RegionOfInterestView.cpp index e4e3aa2fe24de4091c44b2670630371d29b10d3e..9e5a54482bd8345e195ce30d9cfc5cb0bb06ac24 100644 --- a/GUI/View/Mask/RegionOfInterestView.cpp +++ b/GUI/View/Mask/RegionOfInterestView.cpp @@ -14,7 +14,7 @@ #include "GUI/View/Mask/RegionOfInterestView.h" #include "GUI/Model/Data/MaskItems.h" -#include "GUI/View/Mask/SceneAdaptor.h" +#include "GUI/View/Shape/SceneAdaptor.h" #include <QPainter> RegionOfInterestView::RegionOfInterestView(RegionOfInterestItem* item) diff --git a/GUI/View/Mask/RegionOfInterestView.h b/GUI/View/Mask/RegionOfInterestView.h index 17a5eb37cc81a264131019f68bc8dfea83a9ab5d..555308b1376b308de7c7b7ff2bad18af0aa5e3c7 100644 --- a/GUI/View/Mask/RegionOfInterestView.h +++ b/GUI/View/Mask/RegionOfInterestView.h @@ -15,7 +15,7 @@ #ifndef BORNAGAIN_GUI_VIEW_MASK_REGIONOFINTERESTVIEW_H #define BORNAGAIN_GUI_VIEW_MASK_REGIONOFINTERESTVIEW_H -#include "GUI/View/Mask/RectangleView.h" +#include "GUI/View/Shape/RectangleView.h" class RegionOfInterestItem; diff --git a/GUI/View/Plot2D/ColorMapCanvas.cpp b/GUI/View/Plot2D/ColorMapCanvas.cpp index 07688e2cee7f7c5376aaf827f3f1126632c8bf0a..e4055be8f0a04b3f4df51a41f214e742150c8618 100644 --- a/GUI/View/Plot2D/ColorMapCanvas.cpp +++ b/GUI/View/Plot2D/ColorMapCanvas.cpp @@ -14,8 +14,8 @@ #include "GUI/View/Plot2D/ColorMapCanvas.h" #include "GUI/Model/Data/Data2DItem.h" -#include "GUI/View/PlotScale/ColorMap.h" #include "GUI/View/PlotScale/FontScalingEvent.h" +#include "GUI/View/PlotUtil/ColorMap.h" #include "GUI/View/PlotUtil/PlotStatusLabel.h" #include <QVBoxLayout> diff --git a/GUI/View/Plot2D/IntensityDataCanvas.cpp b/GUI/View/Plot2D/IntensityDataCanvas.cpp index 89911390b6164d818b0883507d7643b8ff49242d..fdd65816f9d0e865e9033c4fe146c1b0f34e2181 100644 --- a/GUI/View/Plot2D/IntensityDataCanvas.cpp +++ b/GUI/View/Plot2D/IntensityDataCanvas.cpp @@ -19,8 +19,8 @@ #include "GUI/Support/Tool/Globals.h" #include "GUI/View/Info/MessageBox.h" #include "GUI/View/Plot2D/ColorMapCanvas.h" -#include "GUI/View/PlotScale/ColorMap.h" #include "GUI/View/PlotScale/SavePlotAssistant.h" +#include "GUI/View/PlotUtil/ColorMap.h" #include <QVBoxLayout> #include <qcustomplot.h> diff --git a/GUI/View/PlotComparison/Fitpair2DWidget.cpp b/GUI/View/PlotComparison/Fitpair2DWidget.cpp index b11898fddcddcafd74b9d422c3b1f16fb9461dc0..e5a22dc1bd6e7141ccbad9e8ab4be80127b21eb1 100644 --- a/GUI/View/PlotComparison/Fitpair2DWidget.cpp +++ b/GUI/View/PlotComparison/Fitpair2DWidget.cpp @@ -23,8 +23,8 @@ #include "GUI/View/Data/IntensityDataPropertyWidget.h" #include "GUI/View/Plot2D/ColorMapCanvas.h" #include "GUI/View/PlotComparison/FitFlowWidget.h" -#include "GUI/View/PlotScale/ColorMap.h" #include "GUI/View/PlotScale/RangeUtil.h" +#include "GUI/View/PlotUtil/ColorMap.h" #include "GUI/View/PlotUtil/PlotStatusLabel.h" #include <QAction> #include <QVBoxLayout> diff --git a/GUI/View/PlotScale/FontScalingEvent.cpp b/GUI/View/PlotScale/FontScalingEvent.cpp index f3cb4eeb818fbebb628a3ffdc9771cedddcd0ef6..7af58a2c6f8a6b8acaa34f0fd1cd8aafbddcdda7 100644 --- a/GUI/View/PlotScale/FontScalingEvent.cpp +++ b/GUI/View/PlotScale/FontScalingEvent.cpp @@ -14,7 +14,7 @@ #include "GUI/View/PlotScale/FontScalingEvent.h" #include "Base/Util/Assert.h" -#include "GUI/View/PlotScale/ColorMap.h" +#include "GUI/View/PlotUtil/ColorMap.h" #include <QResizeEvent> #include <qcustomplot.h> diff --git a/GUI/View/PlotScale/SavePlotAssistant.cpp b/GUI/View/PlotScale/SavePlotAssistant.cpp index e6352261cf96f19fb5dc1ee44784ece433ec3bc5..1e9f8a8336629f80867439631ad58afc86fe46de 100644 --- a/GUI/View/PlotScale/SavePlotAssistant.cpp +++ b/GUI/View/PlotScale/SavePlotAssistant.cpp @@ -16,7 +16,7 @@ #include "Base/Util/Assert.h" #include "Device/IO/IOFactory.h" #include "GUI/Support/Style/ApplicationSettings.h" -#include "GUI/View/PlotScale/ColorMap.h" +#include "GUI/View/PlotUtil/ColorMap.h" #include <QFileDialog> #include <QMessageBox> #include <QVector> diff --git a/GUI/View/PlotScale/ColorMap.cpp b/GUI/View/PlotUtil/ColorMap.cpp similarity index 99% rename from GUI/View/PlotScale/ColorMap.cpp rename to GUI/View/PlotUtil/ColorMap.cpp index 417cb760af35a6d40a95f31f0f86a7d5e4b6f648..7bb136935ec73fe8ef9a3b6981a772a6ce87fab1 100644 --- a/GUI/View/PlotScale/ColorMap.cpp +++ b/GUI/View/PlotUtil/ColorMap.cpp @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/PlotScale/ColorMap.cpp +//! @file GUI/View/PlotUtil/ColorMap.cpp //! @brief Implements class ColorMap //! //! @homepage http://www.bornagainproject.org @@ -12,7 +12,7 @@ // // ************************************************************************************************ -#include "GUI/View/PlotScale/ColorMap.h" +#include "GUI/View/PlotUtil/ColorMap.h" #include "Device/Data/Datafield.h" #include "GUI/Model/Axis/AmplitudeAxisItem.h" #include "GUI/Model/Axis/BasicAxisItem.h" @@ -20,7 +20,6 @@ #include "GUI/Model/Project/ProjectDocument.h" #include "GUI/Support/Tool/UpdateTimer.h" #include "GUI/Support/Util/QCP_Util.h" -#include "GUI/View/PlotScale/RangeUtil.h" #include "GUI/View/PlotUtil/PlotConstants.h" #include "GUI/View/PlotUtil/PlotEventInfo.h" #include <qcustomplot.h> diff --git a/GUI/View/PlotScale/ColorMap.h b/GUI/View/PlotUtil/ColorMap.h similarity index 93% rename from GUI/View/PlotScale/ColorMap.h rename to GUI/View/PlotUtil/ColorMap.h index ecd55ccf069be67bfc1d3dc149f11e14d761806a..838deb4295ee9ca445457a2394f23207d5ebcd5a 100644 --- a/GUI/View/PlotScale/ColorMap.h +++ b/GUI/View/PlotUtil/ColorMap.h @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/PlotScale/ColorMap.h +//! @file GUI/View/PlotUtil/ColorMap.h //! @brief Defines class ColorMap //! //! @homepage http://www.bornagainproject.org @@ -12,8 +12,8 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_GUI_VIEW_PLOTSCALE_COLORMAP_H -#define BORNAGAIN_GUI_VIEW_PLOTSCALE_COLORMAP_H +#ifndef BORNAGAIN_GUI_VIEW_PLOTUTIL_COLORMAP_H +#define BORNAGAIN_GUI_VIEW_PLOTUTIL_COLORMAP_H #include "GUI/View/PlotUtil/ScientificPlot.h" @@ -88,4 +88,4 @@ private: UpdateTimer* m_updateTimer; }; -#endif // BORNAGAIN_GUI_VIEW_PLOTSCALE_COLORMAP_H +#endif // BORNAGAIN_GUI_VIEW_PLOTUTIL_COLORMAP_H diff --git a/GUI/View/Projection/ProjectionsEditorCanvas.cpp b/GUI/View/Projection/ProjectionsEditorCanvas.cpp index 88079132eca6b52fe657bf1fb3706031b1aead58..b952443c8361214c4eb1a1f340e94f80c6c9ea6d 100644 --- a/GUI/View/Projection/ProjectionsEditorCanvas.cpp +++ b/GUI/View/Projection/ProjectionsEditorCanvas.cpp @@ -19,7 +19,7 @@ #include "GUI/Model/Project/ProjectDocument.h" #include "GUI/View/Mask/MaskGraphicsScene.h" #include "GUI/View/Mask/MaskGraphicsView.h" -#include "GUI/View/PlotScale/ColorMap.h" +#include "GUI/View/PlotUtil/ColorMap.h" #include "GUI/View/PlotUtil/PlotStatusLabel.h" #include "GUI/View/PlotUtil/ScientificPlotEvent.h" #include <QItemSelectionModel> @@ -57,7 +57,7 @@ void ProjectionsEditorCanvas::setContext(Data2DItem* data2DItem) ProjectionContainerItem* containerItem = data2DItem->getOrCreateProjectionContainerItem(); ASSERT(containerItem); - m_scene->setMaskContext(data2DItem, containerItem); + m_scene->setAssociatedItems(data2DItem, containerItem); m_scene->setSelectionModel(containerItem->selectionModel()); // notify ProjectionPlot about the changes diff --git a/GUI/View/SampleDesigner/SampleDesigner.qrc b/GUI/View/SampleDesigner/SampleDesigner.qrc index 54e22385b4d27e598ffc4c82b335a750e04bddf2..121ef5d8c1684d8404e49a22b90267963d793e57 100644 --- a/GUI/View/SampleDesigner/SampleDesigner.qrc +++ b/GUI/View/SampleDesigner/SampleDesigner.qrc @@ -1,13 +1,15 @@ <RCC> <qresource prefix="/SampleDesigner"> - <file>images/hand-right.svg</file> + <file>images/alpha-m-box.svg</file> <file>images/arrow-top-left.svg</file> - <file>images/delete.svg</file> <file>images/camera-metering-center.svg</file> - <file>images/alpha-m-box.svg</file> + <file>images/delete.svg</file> + <file>images/hand-right.svg</file> <file>images/rotate-3d.svg</file> </qresource> <qresource prefix="/SampleDesignerToolbox"> + <file>images/Compound_64x64.png</file> + <file>images/CoreAndShell_64x64.png</file> <file>images/Lattice1D.png</file> <file>images/Lattice2D.png</file> <file>images/Lattice2DFinite.png</file> @@ -16,19 +18,15 @@ <file>images/MultiLayer.png</file> <file>images/Paracrystal1D.png</file> <file>images/Paracrystal2D.png</file> - <file>images/Compound_64x64.png</file> - <file>images/CoreAndShell_64x64.png</file> <file>images/ParticleLayout.png</file> <file>images/Transformation.png</file> + <file>images/ff_Bipyramid4_64x64.png</file> <file>images/ff_Box_64x64.png</file> <file>images/ff_Cone_64x64.png</file> <file>images/ff_CosineRipple_64x64.png</file> - <file>images/ff_Bipyramid4_64x64.png</file> <file>images/ff_Cylinder_64x64.png</file> <file>images/ff_Dodecahedron_64x64.png</file> <file>images/ff_EllipsoidalCylinder_64x64.png</file> - <file>images/ff_Sphere_64x64.png</file> - <file>images/ff_Spheroid_64x64.png</file> <file>images/ff_HemiEllipsoid_64x64.png</file> <file>images/ff_Icosahedron_64x64.png</file> <file>images/ff_Prism3_64x64.png</file> @@ -38,6 +36,8 @@ <file>images/ff_Pyramid4_64x64.png</file> <file>images/ff_Pyramid6_64x64.png</file> <file>images/ff_SawtoothRipple_64x64.png</file> + <file>images/ff_Sphere_64x64.png</file> + <file>images/ff_Spheroid_64x64.png</file> <file>images/ff_TruncatedCube_64x64.png</file> <file>images/ff_TruncatedSphere_64x64.png</file> <file>images/ff_TruncatedSpheroid_64x64.png</file> diff --git a/GUI/View/Mask/EllipseView.cpp b/GUI/View/Shape/EllipseView.cpp similarity index 98% rename from GUI/View/Mask/EllipseView.cpp rename to GUI/View/Shape/EllipseView.cpp index 911938d58c2adf9136e17b6eb8ff3bc9b70a00aa..9fcc24b62a0b5b0b858ce971dcb82dde3943391a 100644 --- a/GUI/View/Mask/EllipseView.cpp +++ b/GUI/View/Shape/EllipseView.cpp @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/EllipseView.cpp +//! @file GUI/View/Shape/EllipseView.cpp //! @brief Implements EllipseView class //! //! @homepage http://www.bornagainproject.org @@ -12,7 +12,7 @@ // // ************************************************************************************************ -#include "GUI/View/Mask/EllipseView.h" +#include "GUI/View/Shape/EllipseView.h" #include "GUI/Model/Data/MaskItems.h" #include <QGraphicsSceneMouseEvent> #include <QPainter> diff --git a/GUI/View/Mask/EllipseView.h b/GUI/View/Shape/EllipseView.h similarity index 86% rename from GUI/View/Mask/EllipseView.h rename to GUI/View/Shape/EllipseView.h index 14046db34137b58b14b8f6526bcb4cd3dbc1f8c4..4d149844e87b19e8279699c4f84a1f7742d8761e 100644 --- a/GUI/View/Mask/EllipseView.h +++ b/GUI/View/Shape/EllipseView.h @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/EllipseView.h +//! @file GUI/View/Shape/EllipseView.h //! @brief Defines EllipseView class //! //! @homepage http://www.bornagainproject.org @@ -12,10 +12,10 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_GUI_VIEW_MASK_ELLIPSEVIEW_H -#define BORNAGAIN_GUI_VIEW_MASK_ELLIPSEVIEW_H +#ifndef BORNAGAIN_GUI_VIEW_SHAPE_ELLIPSEVIEW_H +#define BORNAGAIN_GUI_VIEW_SHAPE_ELLIPSEVIEW_H -#include "GUI/View/Mask/RectangleBaseView.h" +#include "GUI/View/Shape/RectangleBaseView.h" class EllipseItem; @@ -53,4 +53,4 @@ private: EllipseItem* m_item; }; -#endif // BORNAGAIN_GUI_VIEW_MASK_ELLIPSEVIEW_H +#endif // BORNAGAIN_GUI_VIEW_SHAPE_ELLIPSEVIEW_H diff --git a/GUI/View/Mask/IShape2DView.cpp b/GUI/View/Shape/IShape2DView.cpp similarity index 97% rename from GUI/View/Mask/IShape2DView.cpp rename to GUI/View/Shape/IShape2DView.cpp index 4cbb7ac59ca8759b71c551cc826c41ae2e63a3c2..82e59ca8f5c913f42f65e0e5f36616f31f9c737e 100644 --- a/GUI/View/Mask/IShape2DView.cpp +++ b/GUI/View/Shape/IShape2DView.cpp @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/IShape2DView.cpp +//! @file GUI/View/Shape/IShape2DView.cpp //! @brief Implements interface IShape2DView. //! //! @homepage http://www.bornagainproject.org @@ -12,9 +12,9 @@ // // ************************************************************************************************ -#include "GUI/View/Mask/IShape2DView.h" +#include "GUI/View/Shape/IShape2DView.h" #include "GUI/Model/Data/MaskItems.h" -#include "GUI/View/Mask/SceneAdaptor.h" +#include "GUI/View/Shape/SceneAdaptor.h" #include <QAction> #include <QGraphicsScene> #include <QGraphicsSceneContextMenuEvent> diff --git a/GUI/View/Mask/IShape2DView.h b/GUI/View/Shape/IShape2DView.h similarity index 89% rename from GUI/View/Mask/IShape2DView.h rename to GUI/View/Shape/IShape2DView.h index f4891f3a0e50116a8ed1ee8331038043d7c349c3..e27943dc22dd187de5d993709bd1253a9f79784d 100644 --- a/GUI/View/Mask/IShape2DView.h +++ b/GUI/View/Shape/IShape2DView.h @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/IShape2DView.h +//! @file GUI/View/Shape/IShape2DView.h //! @brief Defines interface IShape2DView. //! //! @homepage http://www.bornagainproject.org @@ -12,10 +12,10 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_GUI_VIEW_MASK_ISHAPE2DVIEW_H -#define BORNAGAIN_GUI_VIEW_MASK_ISHAPE2DVIEW_H +#ifndef BORNAGAIN_GUI_VIEW_SHAPE_ISHAPE2DVIEW_H +#define BORNAGAIN_GUI_VIEW_SHAPE_ISHAPE2DVIEW_H -#include "GUI/View/Mask/MaskEditorHelper.h" +#include "GUI/View/Shape/MaskEditorHelper.h" #include <QGraphicsObject> #include <QPainter> @@ -71,4 +71,4 @@ private: void onVisibilityChange(); }; -#endif // BORNAGAIN_GUI_VIEW_MASK_ISHAPE2DVIEW_H +#endif // BORNAGAIN_GUI_VIEW_SHAPE_ISHAPE2DVIEW_H diff --git a/GUI/View/Mask/LineViews.cpp b/GUI/View/Shape/LineViews.cpp similarity index 97% rename from GUI/View/Mask/LineViews.cpp rename to GUI/View/Shape/LineViews.cpp index b8a820dd977ed7ec2ab84fedb418529d6a8b932b..532285e56ccf228bfb9738634750763811482997 100644 --- a/GUI/View/Mask/LineViews.cpp +++ b/GUI/View/Shape/LineViews.cpp @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/LineViews.cpp +//! @file GUI/View/Shape/LineViews.cpp //! @brief Implements classes VerticalLineView and HorizontalLineView //! //! @homepage http://www.bornagainproject.org @@ -12,9 +12,9 @@ // // ************************************************************************************************ -#include "GUI/View/Mask/LineViews.h" +#include "GUI/View/Shape/LineViews.h" #include "GUI/Model/Data/MaskItems.h" -#include "GUI/View/Mask/SceneAdaptor.h" +#include "GUI/View/Shape/SceneAdaptor.h" #include <QCursor> #include <QPainter> #include <QStyleOptionGraphicsItem> diff --git a/GUI/View/Mask/LineViews.h b/GUI/View/Shape/LineViews.h similarity index 90% rename from GUI/View/Mask/LineViews.h rename to GUI/View/Shape/LineViews.h index 93ecb378362962db16e8f3785e5d0301f4398af9..4c52fc67ab28280dc0e7f61f42fe60fbb2e1ceff 100644 --- a/GUI/View/Mask/LineViews.h +++ b/GUI/View/Shape/LineViews.h @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/LineViews.h +//! @file GUI/View/Shape/LineViews.h //! @brief Defines classes VerticalLineView and HorizontalLineView //! //! @homepage http://www.bornagainproject.org @@ -12,10 +12,10 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_GUI_VIEW_MASK_LINEVIEWS_H -#define BORNAGAIN_GUI_VIEW_MASK_LINEVIEWS_H +#ifndef BORNAGAIN_GUI_VIEW_SHAPE_LINEVIEWS_H +#define BORNAGAIN_GUI_VIEW_SHAPE_LINEVIEWS_H -#include "GUI/View/Mask/IShape2DView.h" +#include "GUI/View/Shape/IShape2DView.h" class VerticalLineItem; class HorizontalLineItem; @@ -73,4 +73,4 @@ private: HorizontalLineItem* m_item; }; -#endif // BORNAGAIN_GUI_VIEW_MASK_LINEVIEWS_H +#endif // BORNAGAIN_GUI_VIEW_SHAPE_LINEVIEWS_H diff --git a/GUI/View/Mask/MaskEditorHelper.cpp b/GUI/View/Shape/MaskEditorHelper.cpp similarity index 93% rename from GUI/View/Mask/MaskEditorHelper.cpp rename to GUI/View/Shape/MaskEditorHelper.cpp index c6c2d638278441704b5a6f2286e213ad4769506a..bdc3765e33318b767c21a3b2665e5f5b7bcac8a7 100644 --- a/GUI/View/Mask/MaskEditorHelper.cpp +++ b/GUI/View/Shape/MaskEditorHelper.cpp @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/MaskEditorHelper.cpp +//! @file GUI/View/Shape/MaskEditorHelper.cpp //! @brief Implements class MaskEditorHelper //! //! @homepage http://www.bornagainproject.org @@ -12,7 +12,7 @@ // // ************************************************************************************************ -#include "GUI/View/Mask/MaskEditorHelper.h" +#include "GUI/View/Shape/MaskEditorHelper.h" #include <QBrush> #include <QColor> #include <QPen> diff --git a/GUI/View/Mask/MaskEditorHelper.h b/GUI/View/Shape/MaskEditorHelper.h similarity index 86% rename from GUI/View/Mask/MaskEditorHelper.h rename to GUI/View/Shape/MaskEditorHelper.h index 04399bdd82d04912815b5b06a0ef87276271f910..73442fdf21b64e4bf0d673020164da3a3ce89313 100644 --- a/GUI/View/Mask/MaskEditorHelper.h +++ b/GUI/View/Shape/MaskEditorHelper.h @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/MaskEditorHelper.h +//! @file GUI/View/Shape/MaskEditorHelper.h //! @brief Defines class MaskEditorHelper //! //! @homepage http://www.bornagainproject.org @@ -12,8 +12,8 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_GUI_VIEW_MASK_MASKEDITORHELPER_H -#define BORNAGAIN_GUI_VIEW_MASK_MASKEDITORHELPER_H +#ifndef BORNAGAIN_GUI_VIEW_SHAPE_MASKEDITORHELPER_H +#define BORNAGAIN_GUI_VIEW_SHAPE_MASKEDITORHELPER_H #include <QGraphicsItem> @@ -49,4 +49,4 @@ public: static QRectF getMarkerRectangle(const QPointF& pos); }; -#endif // BORNAGAIN_GUI_VIEW_MASK_MASKEDITORHELPER_H +#endif // BORNAGAIN_GUI_VIEW_SHAPE_MASKEDITORHELPER_H diff --git a/GUI/View/Mask/PolygonPointView.cpp b/GUI/View/Shape/PolygonPointView.cpp similarity index 95% rename from GUI/View/Mask/PolygonPointView.cpp rename to GUI/View/Shape/PolygonPointView.cpp index fd3d69cd20af0a0932032b50c110b8aa130a987d..23651ced4f2db2bef3ae69c38606ad909746ad60 100644 --- a/GUI/View/Mask/PolygonPointView.cpp +++ b/GUI/View/Shape/PolygonPointView.cpp @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/PolygonPointView.cpp +//! @file GUI/View/Shape/PolygonPointView.cpp //! @brief Implements PolygonPointView class //! //! @homepage http://www.bornagainproject.org @@ -12,7 +12,7 @@ // // ************************************************************************************************ -#include "GUI/View/Mask/PolygonPointView.h" +#include "GUI/View/Shape/PolygonPointView.h" #include "GUI/Model/Data/MaskItems.h" #include <QGraphicsSceneMouseEvent> #include <QPainter> diff --git a/GUI/View/Mask/PolygonPointView.h b/GUI/View/Shape/PolygonPointView.h similarity index 86% rename from GUI/View/Mask/PolygonPointView.h rename to GUI/View/Shape/PolygonPointView.h index 9c9ff69ba2f54f395f0aa9534724ad3a1f0d7776..7e6d423212388287821d0dd97be11764fa26b9cd 100644 --- a/GUI/View/Mask/PolygonPointView.h +++ b/GUI/View/Shape/PolygonPointView.h @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/PolygonPointView.h +//! @file GUI/View/Shape/PolygonPointView.h //! @brief Defines PolygonPointView class //! //! @homepage http://www.bornagainproject.org @@ -12,10 +12,10 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_GUI_VIEW_MASK_POLYGONPOINTVIEW_H -#define BORNAGAIN_GUI_VIEW_MASK_POLYGONPOINTVIEW_H +#ifndef BORNAGAIN_GUI_VIEW_SHAPE_POLYGONPOINTVIEW_H +#define BORNAGAIN_GUI_VIEW_SHAPE_POLYGONPOINTVIEW_H -#include "GUI/View/Mask/IShape2DView.h" +#include "GUI/View/Shape/IShape2DView.h" class PolygonPointItem; @@ -54,4 +54,4 @@ private: bool m_on_hover; }; -#endif // BORNAGAIN_GUI_VIEW_MASK_POLYGONPOINTVIEW_H +#endif // BORNAGAIN_GUI_VIEW_SHAPE_POLYGONPOINTVIEW_H diff --git a/GUI/View/Mask/PolygonView.cpp b/GUI/View/Shape/PolygonView.cpp similarity index 97% rename from GUI/View/Mask/PolygonView.cpp rename to GUI/View/Shape/PolygonView.cpp index 653be70aedbc481048c6cf091335c6f1a61d998c..4d480dab428a1b59e572b00101487fc6be3eca2d 100644 --- a/GUI/View/Mask/PolygonView.cpp +++ b/GUI/View/Shape/PolygonView.cpp @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/PolygonView.cpp +//! @file GUI/View/Shape/PolygonView.cpp //! @brief Implements PolygonView class //! //! @homepage http://www.bornagainproject.org @@ -12,9 +12,9 @@ // // ************************************************************************************************ -#include "GUI/View/Mask/PolygonView.h" +#include "GUI/View/Shape/PolygonView.h" #include "GUI/Model/Data/MaskItems.h" -#include "GUI/View/Mask/PolygonPointView.h" +#include "GUI/View/Shape/PolygonPointView.h" #include <QCursor> #include <QPainter> diff --git a/GUI/View/Mask/PolygonView.h b/GUI/View/Shape/PolygonView.h similarity index 88% rename from GUI/View/Mask/PolygonView.h rename to GUI/View/Shape/PolygonView.h index 2c891bd16ee88117195ebbea50223598fd4b3bd2..bd6a1533870ef4a0c06b7915ea99129955ebdd29 100644 --- a/GUI/View/Mask/PolygonView.h +++ b/GUI/View/Shape/PolygonView.h @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/PolygonView.h +//! @file GUI/View/Shape/PolygonView.h //! @brief Defines PolygonView class //! //! @homepage http://www.bornagainproject.org @@ -12,10 +12,10 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_GUI_VIEW_MASK_POLYGONVIEW_H -#define BORNAGAIN_GUI_VIEW_MASK_POLYGONVIEW_H +#ifndef BORNAGAIN_GUI_VIEW_SHAPE_POLYGONVIEW_H +#define BORNAGAIN_GUI_VIEW_SHAPE_POLYGONVIEW_H -#include "GUI/View/Mask/IShape2DView.h" +#include "GUI/View/Shape/IShape2DView.h" #include <QPolygonF> class PolygonItem; @@ -63,4 +63,4 @@ private: bool m_close_polygon_request; }; -#endif // BORNAGAIN_GUI_VIEW_MASK_POLYGONVIEW_H +#endif // BORNAGAIN_GUI_VIEW_SHAPE_POLYGONVIEW_H diff --git a/GUI/View/Mask/RectangleBaseView.cpp b/GUI/View/Shape/RectangleBaseView.cpp similarity index 97% rename from GUI/View/Mask/RectangleBaseView.cpp rename to GUI/View/Shape/RectangleBaseView.cpp index 970cba813a6cccf2196d09cf773395877501abbc..a2e6c9de7eb91c03103e6194b9f506ee2af063e4 100644 --- a/GUI/View/Mask/RectangleBaseView.cpp +++ b/GUI/View/Shape/RectangleBaseView.cpp @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/RectangleBaseView.cpp +//! @file GUI/View/Shape/RectangleBaseView.cpp //! @brief Implements RectangleBaseView class //! //! @homepage http://www.bornagainproject.org @@ -12,7 +12,7 @@ // // ************************************************************************************************ -#include "GUI/View/Mask/RectangleBaseView.h" +#include "GUI/View/Shape/RectangleBaseView.h" #include "Base/Util/Assert.h" namespace { diff --git a/GUI/View/Mask/RectangleBaseView.h b/GUI/View/Shape/RectangleBaseView.h similarity index 85% rename from GUI/View/Mask/RectangleBaseView.h rename to GUI/View/Shape/RectangleBaseView.h index afa65cc7dcf44cfb21a172add03f4526ff03cf02..53b52fa62242f192dfa4468abca191981514c75e 100644 --- a/GUI/View/Mask/RectangleBaseView.h +++ b/GUI/View/Shape/RectangleBaseView.h @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/RectangleBaseView.h +//! @file GUI/View/Shape/RectangleBaseView.h //! @brief Defines RectangleBaseView class //! //! @homepage http://www.bornagainproject.org @@ -12,11 +12,11 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_GUI_VIEW_MASK_RECTANGLEBASEVIEW_H -#define BORNAGAIN_GUI_VIEW_MASK_RECTANGLEBASEVIEW_H +#ifndef BORNAGAIN_GUI_VIEW_SHAPE_RECTANGLEBASEVIEW_H +#define BORNAGAIN_GUI_VIEW_SHAPE_RECTANGLEBASEVIEW_H -#include "GUI/View/Mask/IShape2DView.h" -#include "GUI/View/Mask/SizeHandleElement.h" +#include "GUI/View/Shape/IShape2DView.h" +#include "GUI/View/Shape/SizeHandleElement.h" #include <QMap> //! Base view for all rectangular-like masks. @@ -57,4 +57,4 @@ protected: SizeHandleElement* m_activeHandleElement; }; -#endif // BORNAGAIN_GUI_VIEW_MASK_RECTANGLEBASEVIEW_H +#endif // BORNAGAIN_GUI_VIEW_SHAPE_RECTANGLEBASEVIEW_H diff --git a/GUI/View/Mask/RectangleView.cpp b/GUI/View/Shape/RectangleView.cpp similarity index 97% rename from GUI/View/Mask/RectangleView.cpp rename to GUI/View/Shape/RectangleView.cpp index 68df592a21a2aaf20d40c6fb0ef77c131a1fa4c0..99c435741c67534b6a915e75a381741144dfa93e 100644 --- a/GUI/View/Mask/RectangleView.cpp +++ b/GUI/View/Shape/RectangleView.cpp @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/RectangleView.cpp +//! @file GUI/View/Shape/RectangleView.cpp //! @brief Implements RectangleView class //! //! @homepage http://www.bornagainproject.org @@ -12,7 +12,7 @@ // // ************************************************************************************************ -#include "GUI/View/Mask/RectangleView.h" +#include "GUI/View/Shape/RectangleView.h" #include "GUI/Model/Data/MaskItems.h" #include <QGraphicsSceneMouseEvent> #include <QPainter> diff --git a/GUI/View/Mask/RectangleView.h b/GUI/View/Shape/RectangleView.h similarity index 86% rename from GUI/View/Mask/RectangleView.h rename to GUI/View/Shape/RectangleView.h index 07e193b7aec31dbb9e6d3f6b1ce300dc83c368cd..5dc4d5c343ebfa7d84109444f45141e92aa35d43 100644 --- a/GUI/View/Mask/RectangleView.h +++ b/GUI/View/Shape/RectangleView.h @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/RectangleView.h +//! @file GUI/View/Shape/RectangleView.h //! @brief Defines RectangleView class //! //! @homepage http://www.bornagainproject.org @@ -12,10 +12,10 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_GUI_VIEW_MASK_RECTANGLEVIEW_H -#define BORNAGAIN_GUI_VIEW_MASK_RECTANGLEVIEW_H +#ifndef BORNAGAIN_GUI_VIEW_SHAPE_RECTANGLEVIEW_H +#define BORNAGAIN_GUI_VIEW_SHAPE_RECTANGLEVIEW_H -#include "GUI/View/Mask/RectangleBaseView.h" +#include "GUI/View/Shape/RectangleBaseView.h" class RectangleItem; @@ -53,4 +53,4 @@ private: RectangleItem* m_item; }; -#endif // BORNAGAIN_GUI_VIEW_MASK_RECTANGLEVIEW_H +#endif // BORNAGAIN_GUI_VIEW_SHAPE_RECTANGLEVIEW_H diff --git a/GUI/View/Mask/SceneAdaptor.cpp b/GUI/View/Shape/SceneAdaptor.cpp similarity index 92% rename from GUI/View/Mask/SceneAdaptor.cpp rename to GUI/View/Shape/SceneAdaptor.cpp index 0be72e7caf98a435c37287fdf1d5f5724f3a9774..0dbd4fc0da1333ba67c82d3979e48a3d4872e18d 100644 --- a/GUI/View/Mask/SceneAdaptor.cpp +++ b/GUI/View/Shape/SceneAdaptor.cpp @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/SceneAdaptor.cpp +//! @file GUI/View/Shape/SceneAdaptor.cpp //! @brief Implements class SceneAdaptor //! //! @homepage http://www.bornagainproject.org @@ -12,8 +12,8 @@ // // ************************************************************************************************ -#include "GUI/View/Mask/SceneAdaptor.h" -#include "GUI/View/PlotScale/ColorMap.h" +#include "GUI/View/Shape/SceneAdaptor.h" +#include "GUI/View/PlotUtil/ColorMap.h" #include <QEvent> SceneAdaptor::SceneAdaptor() diff --git a/GUI/View/Mask/SceneAdaptor.h b/GUI/View/Shape/SceneAdaptor.h similarity index 87% rename from GUI/View/Mask/SceneAdaptor.h rename to GUI/View/Shape/SceneAdaptor.h index f4a12ec78ea5806cc7d9e612f2a0e4b0eb0fe1be..662d344e0ad65678ed0340e62b52ca0e721b1433 100644 --- a/GUI/View/Mask/SceneAdaptor.h +++ b/GUI/View/Shape/SceneAdaptor.h @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/SceneAdaptor.h +//! @file GUI/View/Shape/SceneAdaptor.h //! @brief Defines class SceneAdaptor //! //! @homepage http://www.bornagainproject.org @@ -12,8 +12,8 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_GUI_VIEW_MASK_SCENEADAPTOR_H -#define BORNAGAIN_GUI_VIEW_MASK_SCENEADAPTOR_H +#ifndef BORNAGAIN_GUI_VIEW_SHAPE_SCENEADAPTOR_H +#define BORNAGAIN_GUI_VIEW_SHAPE_SCENEADAPTOR_H #include <QObject> #include <QRectF> @@ -47,4 +47,4 @@ private: ColorMap* m_plot; }; -#endif // BORNAGAIN_GUI_VIEW_MASK_SCENEADAPTOR_H +#endif // BORNAGAIN_GUI_VIEW_SHAPE_SCENEADAPTOR_H diff --git a/GUI/View/Mask/SizeHandleElement.cpp b/GUI/View/Shape/SizeHandleElement.cpp similarity index 98% rename from GUI/View/Mask/SizeHandleElement.cpp rename to GUI/View/Shape/SizeHandleElement.cpp index cb98b00c3017fdc097b222a80be0ca4a61b9b88f..545d72b1c76c2427b36c15953f9d68e0540a2dab 100644 --- a/GUI/View/Mask/SizeHandleElement.cpp +++ b/GUI/View/Shape/SizeHandleElement.cpp @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/SizeHandleElement.cpp +//! @file GUI/View/Shape/SizeHandleElement.cpp //! @brief Implements SizeHandleElement class //! //! @homepage http://www.bornagainproject.org @@ -12,7 +12,7 @@ // // ************************************************************************************************ -#include "GUI/View/Mask/SizeHandleElement.h" +#include "GUI/View/Shape/SizeHandleElement.h" #include <QGraphicsSceneHoverEvent> #include <QPainter> diff --git a/GUI/View/Mask/SizeHandleElement.h b/GUI/View/Shape/SizeHandleElement.h similarity index 89% rename from GUI/View/Mask/SizeHandleElement.h rename to GUI/View/Shape/SizeHandleElement.h index e811fac2bcd82a6591b7fb789df2da2cb64b1107..6e6c9c64682188816b7281117b181be1cc02fef3 100644 --- a/GUI/View/Mask/SizeHandleElement.h +++ b/GUI/View/Shape/SizeHandleElement.h @@ -2,7 +2,7 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Mask/SizeHandleElement.h +//! @file GUI/View/Shape/SizeHandleElement.h //! @brief Defines SizeHandleElement class //! //! @homepage http://www.bornagainproject.org @@ -12,10 +12,10 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_GUI_VIEW_MASK_SIZEHANDLEELEMENT_H -#define BORNAGAIN_GUI_VIEW_MASK_SIZEHANDLEELEMENT_H +#ifndef BORNAGAIN_GUI_VIEW_SHAPE_SIZEHANDLEELEMENT_H +#define BORNAGAIN_GUI_VIEW_SHAPE_SIZEHANDLEELEMENT_H -#include "GUI/View/Mask/MaskEditorHelper.h" +#include "GUI/View/Shape/MaskEditorHelper.h" #include <QCursor> #include <QGraphicsObject> #include <QMap> @@ -72,4 +72,4 @@ private: static QMap<EHandleLocation, EHandleLocation> m_opposite_handle_location; }; -#endif // BORNAGAIN_GUI_VIEW_MASK_SIZEHANDLEELEMENT_H +#endif // BORNAGAIN_GUI_VIEW_SHAPE_SIZEHANDLEELEMENT_H