diff --git a/src/AllPlot.cpp b/src/AllPlot.cpp index 5c7763211..2af41181b 100644 --- a/src/AllPlot.cpp +++ b/src/AllPlot.cpp @@ -6471,8 +6471,8 @@ AllPlot::pointHover(QwtPlotCurve *curve, int index) //replot(); } - // we have intervals selected so no need to mouse over - if (context->athlete->intervalWidget->selectedItems().count()) return; + // we don't want hoveing or we have intervals selected so no need to mouse over + if (!window->showHover->isChecked() || context->athlete->intervalWidget->selectedItems().count()) return; if (!context->isCompareIntervals && rideItem && rideItem->ride()) { diff --git a/src/AllPlotWindow.cpp b/src/AllPlotWindow.cpp index 661eeca59..b31b1721b 100644 --- a/src/AllPlotWindow.cpp +++ b/src/AllPlotWindow.cpp @@ -179,10 +179,14 @@ AllPlotWindow::AllPlotWindow(Context *context) : showFull->setCheckState(Qt::Checked); guiControls->addRow(new QLabel(""), showFull); - showInterval = new QCheckBox(tr("Intervals"), this); + showInterval = new QCheckBox(tr("Interval Navigator"), this); showInterval->setCheckState(Qt::Checked); guiControls->addRow(new QLabel(""), showInterval); + showHover = new QCheckBox(tr("Hover intervals"), this); + showHover->setCheckState(Qt::Checked); + guiControls->addRow(new QLabel(""), showHover); + showHelp = new QCheckBox(tr("Overlay"), this); showHelp->setCheckState(Qt::Unchecked); guiControls->addRow(new QLabel(""), showHelp); @@ -2107,6 +2111,12 @@ AllPlotWindow::hideSelection() } } +void +AllPlotWindow::setHovering(int value) +{ + showHover->setChecked(value); +} + void AllPlotWindow::setShowPower(int value) { diff --git a/src/AllPlotWindow.h b/src/AllPlotWindow.h index d9c648efc..327896aa7 100644 --- a/src/AllPlotWindow.h +++ b/src/AllPlotWindow.h @@ -61,6 +61,7 @@ class AllPlotWindow : public GcChartWindow Q_PROPERTY(int showGrid READ isShowGrid WRITE setShowGrid USER true) Q_PROPERTY(int showFull READ isShowFull WRITE setShowFull USER true) Q_PROPERTY(int showInterval READ isShowInterval WRITE setShowInterval USER true) + Q_PROPERTY(int hovering READ isHovering WRITE setHovering USER true) Q_PROPERTY(int showHelp READ isShowHelp WRITE setShowHelp USER true) Q_PROPERTY(int showATISS READ isShowATISS WRITE setShowATISS USER true) Q_PROPERTY(int showANTISS READ isShowANTISS WRITE setShowANTISS USER true) @@ -118,6 +119,7 @@ class AllPlotWindow : public GcChartWindow // get properties - the setters are below bool isStacked() const { return showStack->isChecked(); } + bool isHovering() const { return showHover->isChecked(); } bool isBySeries() const { return showBySeries->isChecked(); } int _stackWidth() const { return stackWidth; } int isShowGrid() const { return showGrid->checkState(); } @@ -180,6 +182,7 @@ class AllPlotWindow : public GcChartWindow void setrSmoothingFromLineEdit(); void setStackWidth(int x); void setShowNP(int state); + void setHovering(int state); void setShowATISS(int state); void setShowANTISS(int state); void setShowXP(int state); @@ -293,6 +296,7 @@ class AllPlotWindow : public GcChartWindow // Common controls QGridLayout *controlsLayout; QCheckBox *showStack; + QCheckBox *showHover; QCheckBox *showBySeries; QCheckBox *showGrid; QCheckBox *showFull;