HrPwPlot: Show/Hide fullplot

.. since it doesn't add much now its lost shading.
This commit is contained in:
Mark Liversedge
2013-02-11 16:46:15 +00:00
parent abb6ae82d4
commit 2a094c8fe9
2 changed files with 19 additions and 0 deletions

View File

@@ -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)
{

View File

@@ -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;