BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
MaskContainerView.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Mask/MaskContainerView.h
6 //! @brief Defines MaskContainerView class
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI_VIEW_MASK_MASKCONTAINERVIEW_H
16 #define BORNAGAIN_GUI_VIEW_MASK_MASKCONTAINERVIEW_H
17 
20 #include <QMap>
21 
22 class MaskContainerItem;
24 
25 //! The MaskContainerView is nothing more than just transparent rectangle to cover axes area
26 //! of ColorMapPlot inside MaskGraphicsScene. The goal of this rectangle is to hide all MaskViews
27 //! if they are going outside of ColorMapPlot.
28 //!
29 //! The size of the rectangle always matches axes viewport at any zoom level.
30 //! All MasksViews are added to MaskContainerView as children.
31 
33  Q_OBJECT
34 
35 public:
36  int type() const override { return MaskEditorHelper::MASKCONTAINER; }
37 
38  explicit MaskContainerView(MaskContainerItem* item);
40  ~MaskContainerView() override;
41 
42  SessionItem* parameterizedItem() const override;
43 
44 protected slots:
45  void update_view() override;
46 
47 protected:
48  void paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*) override;
49 
50 private:
51  void onItemDestroyed() override;
52 
53 private:
55 };
56 
57 #endif // BORNAGAIN_GUI_VIEW_MASK_MASKCONTAINERVIEW_H
Defines interface IShape2DView.
Defines SizeHandleElement class.
Main interface class for views representing MaskItems, Projections on graphics scene.
Definition: IShape2DView.h:27
Container holding various masks as children.
Definition: MaskItems.h:202
The MaskContainerView is nothing more than just transparent rectangle to cover axes area of ColorMapP...
void onItemDestroyed() override
void update_view() override
SessionItem * parameterizedItem() const override
MaskContainerView(MaskContainerItem *item)
void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override
~MaskContainerView() override
SessionItem * m_item
int type() const override
A container to hold ProjectionItems, intended to store projections of color map on X,...
Base class for a GUI data item.
Definition: SessionItem.h:204