Commit d736bbfa authored by Don Gagne's avatar Don Gagne

Remove zoom support

Bugs causing it to not be able to un-zoom.
parent dcd55081
......@@ -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<QString, QwtPlotCurve*>();
......@@ -40,10 +39,6 @@ ChartPlot::ChartPlot(QWidget *parent):
grid->enableXMin(true);
grid->attach(this);
// Enable zooming
QwtPlotCanvas *c = static_cast<QwtPlotCanvas*>(canvas());
zoomer = new ScrollZoomer(c);
colors = QList<QColor>();
///> 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));
......
......@@ -34,13 +34,11 @@ protected:
QList<QColor> colors; ///< Colormap for curves
int nextColorIndex; ///< Next index in color map
QMap<QString, QwtPlotCurve* > 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
......@@ -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)
......
......@@ -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<QString, QwtPlotCurve*>::iterator i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment