26 #include <QVBoxLayout>
32 , m_intensityDataItem(0)
36 setObjectName(
"MaskEditorCanvas");
37 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
39 QVBoxLayout* mainLayout =
new QVBoxLayout;
40 mainLayout->addWidget(
m_view);
42 mainLayout->setMargin(0);
43 mainLayout->setSpacing(0);
44 setLayout(mainLayout);
87 for (
auto mask : container->getItems())
#define ASSERT(condition)
Defines class ProjectManager.
Defines class IntensityDataItem.
Defines class MaskEditorCanvas.
Defines class MaskGraphicsScene.
Defines class MaskGraphicsView.
Defines MaskItems classes.
Defines class MaskResultsPresenter.
Defines class PlotStatusLabel.
Defines class SavePlotAssistant.
static ProjectManager * projectManager()
QCustomPlot * customPlot() override
OutputData< double > * getOutputData()
void setLowerX(double value)
MaskContainerItem * maskContainerItem()
double getYmin() const
returns min and max range of y-axis as given by IntensityData
void setLowerY(double value)
double getLowerY() const
returns lower and upper zoom ranges of y-axis
void resetView()
Set axes viewport to original data.
void setUpperX(double value)
double getXmin() const
returns min and max range of x-axis as given by IntensityData
void setUpperY(double value)
double getLowerX() const
returns lower and upper zoom ranges of x-axis
Container holding various masks as children.
void deleteSelectedRequest()
void onSavePlotRequest()
Saves plot into project directory.
MaskGraphicsView * m_view
bool isAxisRangeMatchData() const
Returns true if IntensityData is currently at 100% zoom level.
PlotStatusLabel * m_statusLabel
void changeActivityRequest(MaskEditorFlags::Activity)
void onResetViewRequest()
MaskGraphicsScene * getScene()
void onPresentationTypeRequest(MaskEditorFlags::PresentationType presentationType)
MaskResultsPresenter * m_resultsPresenter
IntensityDataItem * m_intensityDataItem
void setSelectionModel(QItemSelectionModel *model)
MaskEditorCanvas(QWidget *parent=0)
MaskGraphicsScene * m_scene
void setMaskContext(SessionModel *model, const QModelIndex &maskContainerIndex, IntensityDataItem *intensityItem)
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)
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.
static const QString P_IS_VISIBLE
Updates bin values inside IntensityData to display current mask state.
void updatePresenter(MaskEditorFlags::PresentationType mode)
void setMaskContext(SessionModel *maskModel, const QModelIndex &maskContainerIndex, IntensityDataItem *intensityItem)
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)
QString userExportDir() const
Returns directory name suitable for saving plots.
static const QString P_XUP
static const QString P_YLOW
static const QString P_YUP
static const QString P_XLOW
Assistant class which contains all logic for saving IntensityData to various formats from IntensityDa...
void savePlot(const QString &dirname, QCustomPlot *plot, OutputData< double > *output_data)
SessionItem * getChildOfType(const QString &type) const
Returns the first child of the given type.