24 #include <QItemSelectionModel>
25 #include <QVBoxLayout>
27 #include <boost/polymorphic_cast.hpp>
29 using boost::polymorphic_downcast;
37 , m_liveProjection(nullptr)
39 , m_intensityDataItem(nullptr)
41 , m_block_update(false)
43 setObjectName(
"MaskEditorCanvas");
44 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
46 auto* mainLayout =
new QVBoxLayout;
47 mainLayout->addWidget(
m_view);
49 mainLayout->setMargin(0);
50 mainLayout->setSpacing(0);
51 setLayout(mainLayout);
60 const QModelIndex& shapeContainerIndex,
Defines class IntensityDataItem.
Defines class MaskGraphicsScene.
Defines class MaskGraphicsView.
Defines MaskItems classes.
Defines class PlotStatusLabel.
Defines class ProjectionsEditorCanvas.
Defines class ScientificPlotEvent.
Defines class SessionModel.
The ColorMap class presents 2D intensity data from IntensityDataItem as color map.
void marginsChanged(double left, double right)
void resetView()
Set axes viewport to original data.
Help class to define various flags for MaskEditor operation.
Graphics scene for MaskEditorCanvas to draw masks on top of intensity data widgets.
void setSelectionModel(QItemSelectionModel *model)
void setMaskContext(SessionModel *model, const QModelIndex &maskContainerIndex, IntensityDataItem *intensityItem)
void onActivityModeChanged(MaskEditorFlags::Activity value)
Graphics view for MaskEditorCanvas.
void changeActivityRequest(MaskEditorFlags::Activity)
void updateSize(const QSize &newSize)
void deleteSelectedRequest()
void onResetViewRequest()
Reset given view to original zoom state. Also asks graphics scene to do the same with color map.
void setIsVisibleValue(bool visible)
The PlotStatusLabel class shows status string as reported by DescriptedPlot in a frame....
void reset()
Disconnects all color maps from the label.
void addPlot(ScientificPlot *plot)
PlotStatusLabel * m_statusLabel
void setSelectionModel(QItemSelectionModel *model)
MaskEditorFlags::Activity m_currentActivity
void onActivityModeChanged(MaskEditorFlags::Activity value)
void onEnteringColorMap()
void onPositionChanged(double x, double y)
ProjectionsEditorCanvas(QWidget *parent=nullptr)
QModelIndex m_containerIndex
void onResetViewRequest()
MaskItem * m_liveProjection
temporary projection item matching mouse move
void changeActivityRequest(MaskEditorFlags::Activity)
void setConnected(bool isConnected)
void setContext(SessionModel *model, const QModelIndex &shapeContainerIndex, IntensityDataItem *intensityItem)
void marginsChanged(double left, double right)
void setColorMap(ColorMap *colorMap)
void deleteSelectedRequest()
MaskGraphicsView * m_view
MaskGraphicsScene * m_scene
MaskGraphicsScene * getScene()
IntensityDataItem * m_intensityDataItem
void positionChanged(double x, double y)
ScientificPlotEvent * plotEvent()
int rowOfChild(SessionItem *child) const
Returns row index of given child.
SessionItem * takeRow(int row)
Removes row from item and returns the item.
SessionItem * parentItem() const
Returns parent of this item.
Base class for a GUI data collection. A collection is e.g. all real data (RealDataModel)....
T * insertItem(SessionItem *parent=nullptr, int row=-1, QString tag="")