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

rm PlotStatusLabel::onPlotStatusString

parent 93ac0e9e
No related branches found
No related tags found
1 merge request!2315simplify PlotStatusLabel
......@@ -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);
}
}
......
......@@ -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;
......
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