Skip to content
Snippets Groups Projects
Commit 3180b010 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

replace 'm_statusLabel' by 'm_status_label'

parent 7b7ea017
No related branches found
No related tags found
1 merge request!2290replace camel case in member vars; simplify updateCanvas API
......@@ -22,7 +22,7 @@
ColorMapCanvas::ColorMapCanvas()
: m_colorMap(new ColorMap)
, m_canvasEvent(new FontScalingEvent(m_colorMap, this))
, m_statusLabel(new PlotStatusLabel(m_colorMap, this))
, m_status_label(new PlotStatusLabel(m_colorMap, this))
{
QObject::installEventFilter(m_canvasEvent);
......@@ -31,7 +31,7 @@ ColorMapCanvas::ColorMapCanvas()
layout->setSpacing(0);
layout->addWidget(m_colorMap);
layout->addWidget(m_statusLabel);
layout->addWidget(m_status_label);
setStatusLabelEnabled(false);
}
......@@ -43,6 +43,6 @@ void ColorMapCanvas::itemToCanvas(Data2DItem* item)
void ColorMapCanvas::setStatusLabelEnabled(bool flag)
{
m_statusLabel->setLabelEnabled(flag);
m_statusLabel->setHidden(!flag);
m_status_label->setLabelEnabled(flag);
m_status_label->setHidden(!flag);
}
......@@ -40,7 +40,7 @@ public:
private:
ColorMap* m_colorMap;
FontScalingEvent* m_canvasEvent;
PlotStatusLabel* m_statusLabel;
PlotStatusLabel* m_status_label;
};
#endif // BORNAGAIN_GUI_VIEW_CANVAS_COLORMAPCANVAS_H
......@@ -28,7 +28,7 @@
MaskEditorCanvas::MaskEditorCanvas()
: m_scene(new MaskGraphicsScene)
, m_view(new MaskGraphicsView(m_scene))
, m_statusLabel(new PlotStatusLabel(nullptr, this))
, m_status_label(new PlotStatusLabel(nullptr, this))
, m_data2DItem(nullptr)
{
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
......@@ -38,7 +38,7 @@ MaskEditorCanvas::MaskEditorCanvas()
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
layout->addWidget(m_view);
layout->addWidget(m_statusLabel);
layout->addWidget(m_status_label);
connect(m_view, &MaskGraphicsView::changeActivityRequest, this,
&MaskEditorCanvas::changeActivityRequest);
......@@ -56,14 +56,14 @@ void MaskEditorCanvas::updateCanvas(Data2DItem* data2DItem, QItemSelectionModel*
m_scene->updateSize(m_view->size());
m_statusLabel->setPlot(m_scene->colorMap());
m_status_label->setPlot(m_scene->colorMap());
}
void MaskEditorCanvas::resetCanvas()
{
m_data2DItem = nullptr;
m_scene->dissociateItems();
m_statusLabel->reset();
m_status_label->reset();
}
void MaskEditorCanvas::onPresentationChange(bool pixelized)
......
......@@ -53,7 +53,7 @@ private:
MaskGraphicsScene* m_scene;
MaskGraphicsView* m_view;
PlotStatusLabel* m_statusLabel;
PlotStatusLabel* m_status_label;
Data2DItem* m_data2DItem;
std::unique_ptr<Datafield> m_backup_data;
bool m_backup_interpolated = false;
......
......@@ -29,7 +29,7 @@
ProjectionsEditorCanvas::ProjectionsEditorCanvas()
: m_scene(new MaskGraphicsScene)
, m_view(new MaskGraphicsView(m_scene))
, m_statusLabel(new PlotStatusLabel(nullptr, this))
, m_status_label(new PlotStatusLabel(nullptr, this))
, m_currentActivity(MaskFlags::HORIZONTAL_LINE_MODE)
{
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
......@@ -38,7 +38,7 @@ ProjectionsEditorCanvas::ProjectionsEditorCanvas()
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
layout->addWidget(m_view);
layout->addWidget(m_statusLabel);
layout->addWidget(m_status_label);
connect(m_view, &MaskGraphicsView::changeActivityRequest, this,
&ProjectionsEditorCanvas::changeActivityRequest);
......@@ -88,7 +88,7 @@ void ProjectionsEditorCanvas::updateCanvas(Data2DItem* data2DItem)
connect(cm, &ColorMap::marginsChanged, this, &ProjectionsEditorCanvas::marginsChanged,
Qt::UniqueConnection);
m_statusLabel->setPlot(cm);
m_status_label->setPlot(cm);
onLeavingColorMap();
m_scene->onActivityChanged(m_currentActivity);
......
......@@ -59,7 +59,7 @@ private slots:
private:
MaskGraphicsScene* m_scene;
MaskGraphicsView* m_view;
PlotStatusLabel* m_statusLabel;
PlotStatusLabel* m_status_label;
Data2DItem* m_data2DItem;
std::unique_ptr<LineItem> m_liveProjection; //!< temporary, matching mouse move
MaskFlags::MaskMode m_currentActivity;
......
......@@ -21,7 +21,7 @@
SpecularPlotCanvas::SpecularPlotCanvas()
: m_plot(new SpecularPlot)
, m_canvasEvent(new FontScalingEvent(m_plot, this))
, m_statusLabel(new PlotStatusLabel(m_plot, this))
, m_status_label(new PlotStatusLabel(m_plot, this))
{
this->installEventFilter(m_canvasEvent);
......@@ -30,7 +30,7 @@ SpecularPlotCanvas::SpecularPlotCanvas()
layout->setSpacing(0);
layout->addWidget(m_plot);
layout->addWidget(m_statusLabel);
layout->addWidget(m_status_label);
setStatusLabelEnabled(false);
}
......@@ -46,6 +46,6 @@ QCustomPlot* SpecularPlotCanvas::customPlot()
void SpecularPlotCanvas::setStatusLabelEnabled(bool flag)
{
m_statusLabel->setLabelEnabled(flag);
m_statusLabel->setHidden(!flag);
m_status_label->setLabelEnabled(flag);
m_status_label->setHidden(!flag);
}
......@@ -40,7 +40,7 @@ public:
private:
SpecularPlot* m_plot;
FontScalingEvent* m_canvasEvent;
PlotStatusLabel* m_statusLabel;
PlotStatusLabel* m_status_label;
};
#endif // BORNAGAIN_GUI_VIEW_CANVAS_SPECULARPLOTCANVAS_H
......@@ -35,7 +35,7 @@ Fit1DFrame::Fit1DFrame(QWidget* parent)
, m_data_canvas(new SpecularPlotCanvas)
, m_diff_canvas(new SpecularPlotCanvas)
, m_progress_canvas(new ProgressCanvas)
, m_statusLabel(new PlotStatusLabel(nullptr, this))
, m_status_label(new PlotStatusLabel(nullptr, this))
, m_scaleEditor(new Scale1DEditor)
, m_resetViewAction(new QAction(this))
, m_togglePropertiesAction(
......@@ -56,11 +56,11 @@ Fit1DFrame::Fit1DFrame(QWidget* parent)
gridLayout->addWidget(m_progress_canvas, 1, 2, 1, 1);
vlayout->addLayout(gridLayout);
vlayout->addWidget(m_statusLabel);
vlayout->addWidget(m_status_label);
m_statusLabel->reset();
m_statusLabel->addPlot(m_data_canvas->specularPlot());
m_statusLabel->addPlot(m_diff_canvas->specularPlot());
m_status_label->reset();
m_status_label->addPlot(m_data_canvas->specularPlot());
m_status_label->addPlot(m_diff_canvas->specularPlot());
auto* hlayout = new QHBoxLayout(this);
hlayout->setContentsMargins(0, 0, 0, 0);
......
......@@ -44,7 +44,7 @@ private:
SpecularPlotCanvas* m_data_canvas;
SpecularPlotCanvas* m_diff_canvas;
ProgressCanvas* m_progress_canvas;
PlotStatusLabel* m_statusLabel;
PlotStatusLabel* m_status_label;
Scale1DEditor* m_scaleEditor;
QAction* m_resetViewAction;
......
......@@ -35,7 +35,7 @@ Fit2DFrame::Fit2DFrame()
, m_simuCanvas(new ColorMapCanvas)
, m_diffCanvas(new ColorMapCanvas)
, m_progress_canvas(new ProgressCanvas)
, m_statusLabel(new PlotStatusLabel(nullptr, this))
, m_status_label(new PlotStatusLabel(nullptr, this))
, m_scaleEditor(new Scale2DEditor)
, m_resetViewAction(new QAction(this))
, m_togglePropertiesAction(
......@@ -57,12 +57,12 @@ Fit2DFrame::Fit2DFrame()
gridLayout->addWidget(m_progress_canvas, 1, 1);
vlayout->addLayout(gridLayout);
vlayout->addWidget(m_statusLabel);
vlayout->addWidget(m_status_label);
m_statusLabel->reset();
m_statusLabel->addPlot(m_realCanvas->colorMap());
m_statusLabel->addPlot(m_simuCanvas->colorMap());
m_statusLabel->addPlot(m_diffCanvas->colorMap());
m_status_label->reset();
m_status_label->addPlot(m_realCanvas->colorMap());
m_status_label->addPlot(m_simuCanvas->colorMap());
m_status_label->addPlot(m_diffCanvas->colorMap());
auto* hlayout = new QHBoxLayout(this);
hlayout->setContentsMargins(0, 0, 0, 0);
......
......@@ -43,7 +43,7 @@ private:
ColorMapCanvas* m_simuCanvas;
ColorMapCanvas* m_diffCanvas;
ProgressCanvas* m_progress_canvas;
PlotStatusLabel* m_statusLabel;
PlotStatusLabel* m_status_label;
Scale2DEditor* m_scaleEditor;
QAction* m_resetViewAction;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment