24 #include <QContextMenuEvent>
34 setObjectName(
"MaskEditor");
35 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
37 auto* splitter =
new QSplitter;
40 splitter->setCollapsible(1,
true);
42 addToolBar(Qt::RightToolBarArea,
m_toolbar);
44 setCentralWidget(splitter);
56 ASSERT(intensityItem);
57 ASSERT(maskContainerIndex.isValid());
Defines class MaskEditorActions.
Defines class MaskEditorCanvas.
Defines class MaskEditorPropertyPanel.
Defines class MaskEditor.
Defines class MaskGraphicsScene.
Defines MaskItems classes.
Defines class SessionModel.
static constexpr auto M_TYPE
Defines actions for MaskEditor which are related to selected MaskItem (toggle mask value,...
QList< QAction * > topToolbarActions()
void propertyPanelRequest()
void onItemContextMenuRequest(const QPoint &point)
Constructs MaskItem context menu following the request from MaskGraphicsScene or MaskEditorInfoPanel.
void setModel(SessionModel *maskModel, const QModelIndex &rootIndex)
void setSelectionModel(QItemSelectionModel *selectionModel)
void onDeleteMaskAction()
Painting widget for MaskEditor, contains graphics scene and graphics view.
void deleteSelectedRequest()
void onSavePlotRequest()
Saves plot into project directory.
void changeActivityRequest(MaskEditorFlags::Activity)
void onResetViewRequest()
MaskGraphicsScene * getScene()
void onPresentationTypeRequest(MaskEditorFlags::PresentationType presentationType)
void setSelectionModel(QItemSelectionModel *model)
void setMaskContext(SessionModel *model, const QModelIndex &maskContainerIndex, IntensityDataItem *intensityItem)
Tool widget for MaskEditor.
void setPanelHidden(bool hidden)
Show/Hide panel. When panel is hidden, all property editors are disabled.
void itemContextMenuRequest(const QPoint &point)
void setMaskContext(SessionModel *model, const QModelIndex &maskContainerIndex, IntensityDataItem *intensityItem)
QItemSelectionModel * selectionModel()
MaskEditorCanvas * m_editorCanvas
void onPropertyPanelRequest()
shows/hides right panel with properties
QList< QAction * > topToolbarActions()
Returns list of actions intended for styled toolbar (on the top).
MaskEditor(QWidget *parent=nullptr)
MaskEditorToolbar * m_toolbar
MaskEditorActions * m_editorActions
void setMaskContext(SessionModel *model, const QModelIndex &maskContainerIndex, IntensityDataItem *intensityItem)
Main method to setup context for mask editing.
void contextMenuEvent(QContextMenuEvent *event) override
Context menu reimplemented to supress default menu.
MaskEditorPropertyPanel * m_editorPropertyPanel
void onMaskValueChanged(MaskEditorFlags::MaskValue value)
void itemContextMenuRequest(const QPoint &point)
void onActivityModeChanged(MaskEditorFlags::Activity value)
QString modelType() const
Get model type.
Base class for a GUI data collection. A collection is e.g. all real data (RealDataModel)....
SessionItem * itemForIndex(const QModelIndex &index) const