# HG changeset patch # User Hasan Yavuz Ă–ZDERYA # Date 2015-07-25 16:32:21 # Node ID 62a88b598bdb961ab30228816ead18250c2fd45c # Parent c636e8d93e115c23b0d79195b6552fb22f3b28dc added grid diff --git a/plot.cpp b/plot.cpp --- a/plot.cpp +++ b/plot.cpp @@ -28,6 +28,8 @@ Plot::Plot(QWidget* parent) : QObject::connect(&zoomer, &Zoomer::unzoomed, this, &Plot::unzoomed); zoomer.setZoomBase(); + grid.setPen(Qt::lightGray); + grid.attach(this); } void Plot::setAxis(bool autoScaled, double yAxisMin, double yAxisMax) diff --git a/plot.h b/plot.h --- a/plot.h +++ b/plot.h @@ -18,6 +18,7 @@ */ #include +#include #include "zoomer.h" class Plot : public QwtPlot @@ -32,6 +33,7 @@ private: bool isAutoScaled; double yMin, yMax; Zoomer zoomer; + QwtPlotGrid grid; void resetAxes();