15 #ifndef BORNAGAIN_GUI_COREGUI_VIEWS_SAMPLEDESIGNER_MULTILAYERVIEW_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_SAMPLEDESIGNER_MULTILAYERVIEW_H
21 class QGraphicsSceneDragDropEvent;
36 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget)
override;
54 void dropEvent(QGraphicsSceneDragDropEvent* event)
override;
55 void dragMoveEvent(QGraphicsSceneDragDropEvent* event)
override;
57 QVariant
itemChange(GraphicsItemChange change,
const QVariant& value)
override;
Defines interface ILayerView.
Mime data for use with SampleDesigner drag and drop operations.
Base class for LayerView and MultiLayerView Provides functionality for moving view on top of MultiLay...
parent class for graphic representation of all ISampleNode's
Class representing view of MultiLayer.
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
void onLayerAboutToBeDeleted()
virtual void removeLayer(ILayerView *layer)
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
void updateGeometry()
Updates geometry of MultiLayerView from current childs geometries.
void addView(IView *childView, int row=0) override
int getDropArea(QPointF pos)
Returns index of drop area for given coordinate.
QRectF boundingRect() const override
const DesignerMimeData * checkDragEvent(QGraphicsSceneDragDropEvent *event)
int type() const override
void dropEvent(QGraphicsSceneDragDropEvent *event) override
void updateWidth()
Updates MultiLayerView width, sets x-positions of children.
QList< QLineF > m_interfaces
void dragMoveEvent(QGraphicsSceneDragDropEvent *event) override
QList< QRectF > m_drop_areas
QList< ILayerView * > m_layers
MultiLayerView(QGraphicsItem *parent=0)
virtual void addNewLayer(ILayerView *layer, int row)
QRectF getDropAreaRectangle(int row)
Returns drop area rectangle corresponding to given row.
QLineF getInterfaceLine(int row)
Returns line representing interface.
void updateHeight()
Updates MultiLayer height, sets y-positions of children, defines new drop areas.