diff --git a/src/plot.cpp b/src/plot.cpp --- a/src/plot.cpp +++ b/src/plot.cpp @@ -43,6 +43,16 @@ Plot::Plot(QWidget* parent) : darkBackground(false); snapshotOverlay = NULL; + + // init demo indicator + QwtText demoText(" DEMO RUNNING "); // looks better with spaces + demoText.setColor(QColor("white")); + demoText.setBackgroundBrush(Qt::darkRed); + demoText.setBorderRadius(4); + demoText.setRenderFlags(Qt::AlignLeft | Qt::AlignTop); + demoIndicator.setText(demoText); + demoIndicator.hide(); + demoIndicator.attach(this); } Plot::~Plot() @@ -104,6 +114,12 @@ void Plot::showLegend(bool show) replot(); } +void Plot::showDemoIndicator(bool show) +{ + demoIndicator.setVisible(show); + replot(); +} + void Plot::unzoom() { zoomer.zoom(0);