From 9e27764954778fc24b10a216babf0746caa4a06a Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de> Date: Mon, 22 Jan 2024 14:00:39 +0100 Subject: [PATCH] rm PlotStatusLabel::onPlotStatusString --- GUI/View/Plotter/PlotStatusLabel.cpp | 9 ++------- GUI/View/Plotter/PlotStatusLabel.h | 6 +----- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/GUI/View/Plotter/PlotStatusLabel.cpp b/GUI/View/Plotter/PlotStatusLabel.cpp index daa026f2516..b8794e905f6 100644 --- a/GUI/View/Plotter/PlotStatusLabel.cpp +++ b/GUI/View/Plotter/PlotStatusLabel.cpp @@ -96,11 +96,6 @@ void PlotStatusLabel::setLabelEnabled(bool flag) setEnabled(flag); } -void PlotStatusLabel::onPlotStatusString(const QString& text) -{ - setText(text); -} - //! Enables/disables showing of label for given plot. void PlotStatusLabel::setPlotLabelEnabled(ScientificPlot* plot, bool flag) { @@ -112,12 +107,12 @@ void PlotStatusLabel::setPlotLabelEnabled(ScientificPlot* plot, bool flag) void PlotStatusLabel::setConnected(ScientificPlot* plot, bool flag) const { if (flag) { - connect(plot, &ScientificPlot::statusString, this, &PlotStatusLabel::onPlotStatusString, + connect(plot, &ScientificPlot::statusString, this, &PlotStatusLabel::setText, Qt::UniqueConnection); connect(plot, &ScientificPlot::destroyed, this, &PlotStatusLabel::onPlotDestroyed, Qt::UniqueConnection); } else { - disconnect(plot, &ScientificPlot::statusString, this, &PlotStatusLabel::onPlotStatusString); + disconnect(plot, &ScientificPlot::statusString, this, &PlotStatusLabel::setText); } } diff --git a/GUI/View/Plotter/PlotStatusLabel.h b/GUI/View/Plotter/PlotStatusLabel.h index 3029361264d..9696a3472bc 100644 --- a/GUI/View/Plotter/PlotStatusLabel.h +++ b/GUI/View/Plotter/PlotStatusLabel.h @@ -35,15 +35,11 @@ public: void addPlot(ScientificPlot* plot); void setPlot(ScientificPlot* plot); - void setText(const QString& text); - void setLabelEnabled(bool flag); -public slots: - void onPlotStatusString(const QString& text); - private slots: void onPlotDestroyed(QObject* obj); + void setText(const QString& text); private: void paintEvent(QPaintEvent* event) override; -- GitLab