From 2a094c8fe93e8cf3f966d2751c0d8823abea0a40 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Mon, 11 Feb 2013 16:46:15 +0000 Subject: [PATCH] HrPwPlot: Show/Hide fullplot .. since it doesn't add much now its lost shading. --- src/HrPwWindow.cpp | 14 ++++++++++++++ src/HrPwWindow.h | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/src/HrPwWindow.cpp b/src/HrPwWindow.cpp index c5f496ebf..e30ca9ddc 100644 --- a/src/HrPwWindow.cpp +++ b/src/HrPwWindow.cpp @@ -169,11 +169,18 @@ HrPwWindow::HrPwWindow(MainWindow *mainWindow) : setShadeZones(); cl->addRow(shadeZones); + fullplot = new QCheckBox(this);; + fullplot->setText(tr("Show Full Plot")); + fullplot->setCheckState(Qt::Checked); + showHidePlot(); + cl->addRow(fullplot); + // connect them all up now initialised connect(hrPwPlot->_canvasPicker, SIGNAL(pointHover(QwtPlotCurve*, int)), hrPwPlot, SLOT(pointHover(QwtPlotCurve*, int))); connect(joinlineCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setJoinLineFromCheckBox())); connect(shadeZones, SIGNAL(stateChanged(int)), this, SLOT(setShadeZones())); + connect(fullplot, SIGNAL(stateChanged(int)), this, SLOT(showHidePlot())); connect(smoothEdit, SIGNAL(editingFinished()), this, SLOT(setSmoothingFromLineEdit())); connect(smoothSlider, SIGNAL(valueChanged(int)), this, SLOT(setSmoothingFromSlider())); connect(delayEdit, SIGNAL(editingFinished()), this, SLOT(setDelayFromLineEdit())); @@ -227,6 +234,13 @@ HrPwWindow::setShadeZones() } } +void +HrPwWindow::showHidePlot() +{ + if (fullplot->isChecked()) smallPlot->show(); + else smallPlot->hide(); +} + void HrPwWindow::setSmooth(int _smooth) { diff --git a/src/HrPwWindow.h b/src/HrPwWindow.h index 853444da6..edd71b9fc 100644 --- a/src/HrPwWindow.h +++ b/src/HrPwWindow.h @@ -41,11 +41,14 @@ class HrPwWindow : public GcChartWindow Q_PROPERTY(int shadeZones READ isShadeZones WRITE setShadeZones USER true) Q_PROPERTY(int joinLine READ isJoinLine WRITE setJoinLine USER true) + Q_PROPERTY(int fullplot READ showFullplot WRITE setFullplot USER true) int isJoinLine() const { return joinlineCheckBox->checkState(); } void setJoinLine(int x) { joinlineCheckBox->setCheckState(x ? Qt::Checked : Qt::Unchecked); } int isShadeZones() const { return shadeZones->checkState(); } void setShadeZones(int x) { shadeZones->setCheckState(x ? Qt::Checked : Qt::Unchecked); } + int showFullplot() const { return fullplot->checkState(); } + void setFullplot(int x) { fullplot->setCheckState(x ? Qt::Checked : Qt::Unchecked); } public: @@ -79,6 +82,7 @@ class HrPwWindow : public GcChartWindow void setrSmoothingFromSlider(); void setShadeZones(); void setSmooth(int); + void showHidePlot(); void setDelay(int); protected: @@ -90,6 +94,7 @@ class HrPwWindow : public GcChartWindow QCheckBox *joinlineCheckBox; QCheckBox *shadeZones; + QCheckBox *fullplot; QSlider *delaySlider; QLineEdit *delayEdit;