diff --git a/src/ui/linechart/ChartPlot.cc b/src/ui/linechart/ChartPlot.cc index 2f5c29736a9241f560c17ea8b82e1b957b59ec81..61f1de095beca1fd9520887d04c37d9e2ee32520 100644 --- a/src/ui/linechart/ChartPlot.cc +++ b/src/ui/linechart/ChartPlot.cc @@ -29,8 +29,7 @@ ChartPlot::ChartPlot(QWidget *parent): nextColorIndex(0), symbolWidth(2.0f), curveWidth(2.0f), - gridWidth(0.8f), - zoomerWidth(2.0f) + gridWidth(0.8f) { // Initialize the list of curves. curves = QMap(); @@ -40,10 +39,6 @@ ChartPlot::ChartPlot(QWidget *parent): grid->enableXMin(true); grid->attach(this); - // Enable zooming - QwtPlotCanvas *c = static_cast(canvas()); - zoomer = new ScrollZoomer(c); - colors = QList(); ///> Color map for plots, includes 20 colors @@ -100,10 +95,6 @@ void ChartPlot::styleChanged(bool styleIsDark) // Configure the rest of the UI colors based on the current theme. if (styleIsDark) { - // Set the coloring of the area selector for zooming. - zoomer->setRubberBandPen(QPen(QColor(0xB8, 0xD3, 0xE6), zoomerWidth, Qt::DotLine)); - zoomer->setTrackerPen(QPen(QColor(0xB8, 0xD3, 0xE6))); - // Set canvas background setCanvasBackground(QColor(0, 0, 0)); @@ -113,10 +104,6 @@ void ChartPlot::styleChanged(bool styleIsDark) } else { - // Set the coloring of the area selector for zooming. - zoomer->setRubberBandPen(QPen(QColor(0x37, 0x9A, 0xC3), zoomerWidth, Qt::DotLine)); - zoomer->setTrackerPen(QPen(QColor(0x37, 0x9A, 0xC3))); - // Set canvas background setCanvasBackground(QColor(0xFF, 0xFF, 0xFF)); diff --git a/src/ui/linechart/ChartPlot.h b/src/ui/linechart/ChartPlot.h index 1589285a48308a3a6c22e730f486c8f1ae76d72b..acbb85a46b9199513a309fe59226231b33ec6302 100644 --- a/src/ui/linechart/ChartPlot.h +++ b/src/ui/linechart/ChartPlot.h @@ -34,13 +34,11 @@ protected: QList colors; ///< Colormap for curves int nextColorIndex; ///< Next index in color map QMap curves; ///< Plot curves - ScrollZoomer* zoomer; ///< Zoomer class for widget QwtPlotGrid* grid; ///< Plot grid float symbolWidth; ///< Width of curve symbols in pixels float curveWidth; ///< Width of curve lines in pixels float gridWidth; ///< Width of gridlines in pixels - float zoomerWidth; ///< Width of zoomer selection box }; #endif // CHARTPLOT_H diff --git a/src/ui/linechart/IncrementalPlot.cc b/src/ui/linechart/IncrementalPlot.cc index 4c8268978e208d496f770a11a520a2cbd68851db..1731aa10c54ece33000f99355e68b6d02be8b465 100644 --- a/src/ui/linechart/IncrementalPlot.cc +++ b/src/ui/linechart/IncrementalPlot.cc @@ -254,7 +254,6 @@ void IncrementalPlot::updateScale() } setAxisScale(xBottom, xMinRange, xMaxRange); setAxisScale(yLeft, yMinRange, yMaxRange); - zoomer->setZoomBase(true); } void IncrementalPlot::appendData(const QString &key, double x, double y) diff --git a/src/ui/linechart/LinechartPlot.cc b/src/ui/linechart/LinechartPlot.cc index 37867390f73f7642ec509f799c01ea919ac524a0..dc6b84f96f0c5b4beb883f2a62c833e60d81d9de 100644 --- a/src/ui/linechart/LinechartPlot.cc +++ b/src/ui/linechart/LinechartPlot.cc @@ -679,15 +679,7 @@ void LinechartPlot::paintRealtime() windowLock.unlock(); - // Only set current view as zoombase if zoomer is not active - // else we could not zoom out any more - - if(zoomer->zoomStack().size() < 2) { - zoomer->setZoomBase(true); - } else { - replot(); - } - + replot(); /* QMap::iterator i;