From cc9230d89a47e5ad0bda8dd1fcbc9632b92eb83f Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de> Date: Mon, 22 Jan 2024 13:54:30 +0100 Subject: [PATCH] PlotStatusLabel rm parent --- GUI/View/Canvas/ColorMapCanvas.cpp | 2 +- GUI/View/Canvas/MaskEditorCanvas.cpp | 2 +- GUI/View/Canvas/SpecularPlotCanvas.cpp | 2 +- GUI/View/Frame/Fit1DFrame.cpp | 2 +- GUI/View/Frame/Fit2DFrame.cpp | 2 +- GUI/View/Plotter/PlotStatusLabel.cpp | 3 +-- GUI/View/Plotter/PlotStatusLabel.h | 2 +- GUI/View/Plotter/StatusLabel.cpp | 5 ++--- GUI/View/Plotter/StatusLabel.h | 2 +- 9 files changed, 10 insertions(+), 12 deletions(-) diff --git a/GUI/View/Canvas/ColorMapCanvas.cpp b/GUI/View/Canvas/ColorMapCanvas.cpp index 34dc2e05bdd..4a8f0f965eb 100644 --- a/GUI/View/Canvas/ColorMapCanvas.cpp +++ b/GUI/View/Canvas/ColorMapCanvas.cpp @@ -22,7 +22,7 @@ ColorMapCanvas::ColorMapCanvas() : m_color_map(new ColorMap) , m_canvas_event(new FontScalingEvent(m_color_map, this)) - , m_status_label(new PlotStatusLabel(m_color_map, this)) + , m_status_label(new PlotStatusLabel(m_color_map)) { QObject::installEventFilter(m_canvas_event); diff --git a/GUI/View/Canvas/MaskEditorCanvas.cpp b/GUI/View/Canvas/MaskEditorCanvas.cpp index 20050f0887a..a7abdc86efe 100644 --- a/GUI/View/Canvas/MaskEditorCanvas.cpp +++ b/GUI/View/Canvas/MaskEditorCanvas.cpp @@ -31,7 +31,7 @@ MaskEditorCanvas::MaskEditorCanvas() : m_scene(new MaskGraphicsScene) , m_view(new MaskGraphicsView(m_scene)) - , m_status_label(new PlotStatusLabel(nullptr, this)) + , m_status_label(new PlotStatusLabel(nullptr)) , m_data_item(nullptr) , m_current_activity(MaskFlags::HORIZONTAL_LINE_MODE) { diff --git a/GUI/View/Canvas/SpecularPlotCanvas.cpp b/GUI/View/Canvas/SpecularPlotCanvas.cpp index 72f58d18b3f..0f9641f3b0b 100644 --- a/GUI/View/Canvas/SpecularPlotCanvas.cpp +++ b/GUI/View/Canvas/SpecularPlotCanvas.cpp @@ -21,7 +21,7 @@ SpecularPlotCanvas::SpecularPlotCanvas() : m_plot(new SpecularPlot) , m_canvas_event(new FontScalingEvent(m_plot, this)) - , m_status_label(new PlotStatusLabel(m_plot, this)) + , m_status_label(new PlotStatusLabel(m_plot)) { this->installEventFilter(m_canvas_event); diff --git a/GUI/View/Frame/Fit1DFrame.cpp b/GUI/View/Frame/Fit1DFrame.cpp index 7ae0d72dddb..7b547dc78c1 100644 --- a/GUI/View/Frame/Fit1DFrame.cpp +++ b/GUI/View/Frame/Fit1DFrame.cpp @@ -34,7 +34,7 @@ Fit1DFrame::Fit1DFrame(JobItem* job_item) : m_data_canvas(new SpecularPlotCanvas) , m_diff_canvas(new SpecularPlotCanvas) , m_progress_canvas(new ProgressCanvas) - , m_status_label(new PlotStatusLabel(nullptr, this)) + , m_status_label(new PlotStatusLabel(nullptr)) , m_scale_editor(new AxisPanel) , m_reset_view_action(new QAction(this)) { diff --git a/GUI/View/Frame/Fit2DFrame.cpp b/GUI/View/Frame/Fit2DFrame.cpp index 47e2d0e8789..abf85e957ad 100644 --- a/GUI/View/Frame/Fit2DFrame.cpp +++ b/GUI/View/Frame/Fit2DFrame.cpp @@ -34,7 +34,7 @@ Fit2DFrame::Fit2DFrame(JobItem* job_item) , m_simu_canvas(new ColorMapCanvas) , m_diff_canvas(new ColorMapCanvas) , m_progress_canvas(new ProgressCanvas) - , m_status_label(new PlotStatusLabel(nullptr, this)) + , m_status_label(new PlotStatusLabel(nullptr)) , m_scale_editor(new AxesPanel) , m_reset_view_action(new QAction(this)) { diff --git a/GUI/View/Plotter/PlotStatusLabel.cpp b/GUI/View/Plotter/PlotStatusLabel.cpp index b3697446b4a..5d0d76d730a 100644 --- a/GUI/View/Plotter/PlotStatusLabel.cpp +++ b/GUI/View/Plotter/PlotStatusLabel.cpp @@ -15,8 +15,7 @@ #include "GUI/View/Plotter/PlotStatusLabel.h" #include "GUI/View/Plotter/ScientificPlot.h" -PlotStatusLabel::PlotStatusLabel(ScientificPlot* plot, QWidget* parent) - : StatusLabel(parent) +PlotStatusLabel::PlotStatusLabel(ScientificPlot* plot) { if (plot) addPlot(plot); diff --git a/GUI/View/Plotter/PlotStatusLabel.h b/GUI/View/Plotter/PlotStatusLabel.h index d48860fc025..0d82e609ea6 100644 --- a/GUI/View/Plotter/PlotStatusLabel.h +++ b/GUI/View/Plotter/PlotStatusLabel.h @@ -28,7 +28,7 @@ class ScientificPlot; class PlotStatusLabel : public StatusLabel { Q_OBJECT public: - PlotStatusLabel(ScientificPlot* plot, QWidget* parent = nullptr); + PlotStatusLabel(ScientificPlot* plot); void reset(); void addPlot(ScientificPlot* plot); diff --git a/GUI/View/Plotter/StatusLabel.cpp b/GUI/View/Plotter/StatusLabel.cpp index b5f6335214e..de53618a44d 100644 --- a/GUI/View/Plotter/StatusLabel.cpp +++ b/GUI/View/Plotter/StatusLabel.cpp @@ -32,9 +32,8 @@ int default_label_height() } // namespace -StatusLabel::StatusLabel(QWidget* parent) - : QFrame(parent) - , m_font("Monospace", default_text_size(), QFont::Normal, false) +StatusLabel::StatusLabel() + : m_font("Monospace", default_text_size(), QFont::Normal, false) { setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); setFixedHeight(default_label_height()); diff --git a/GUI/View/Plotter/StatusLabel.h b/GUI/View/Plotter/StatusLabel.h index 1d7e8f9dbfd..101d4609883 100644 --- a/GUI/View/Plotter/StatusLabel.h +++ b/GUI/View/Plotter/StatusLabel.h @@ -27,7 +27,7 @@ class StatusLabel : public QFrame { Q_OBJECT public: - explicit StatusLabel(QWidget* parent = nullptr); + StatusLabel(); void setText(const QString& text); -- GitLab