diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2015-04-01 05:50:26 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2015-04-01 05:50:26 -0700 |
commit | 7fe6115297c9d5d1d9220dc23bab96aa88b2b72d (patch) | |
tree | cf617001176b8d83c7b31c6fad27d472d8ba3a03 | |
parent | 89387b68fed369268aab57794b7a3fee2f9c66ac (diff) | |
parent | 67e700425b1362c3146cbb38412aedef7face026 (diff) |
Merge remote-tracking branch 'tom/qtgui/timedisplayform_qwt_fix'
-rw-r--r-- | gr-qtgui/lib/timedisplayform.cc | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/gr-qtgui/lib/timedisplayform.cc b/gr-qtgui/lib/timedisplayform.cc index 4370d5530a..9a30b30bfe 100644 --- a/gr-qtgui/lib/timedisplayform.cc +++ b/gr-qtgui/lib/timedisplayform.cc @@ -513,37 +513,73 @@ TimeDisplayForm::getTriggerTagKey() const void TimeDisplayForm::notifyYAxisPlus() { +#if QWT_VERSION < 0x060100 QwtScaleDiv *ax = getPlot()->axisScaleDiv(QwtPlot::yLeft); double range = ax->upperBound() - ax->lowerBound(); double step = range/20.0; getPlot()->setYaxis(ax->lowerBound()+step, ax->upperBound()+step); + +#else + + QwtScaleDiv ax = getPlot()->axisScaleDiv(QwtPlot::yLeft); + double range = ax.upperBound() - ax.lowerBound(); + double step = range/20.0; + getPlot()->setYaxis(ax.lowerBound()+step, ax.upperBound()+step); +#endif } void TimeDisplayForm::notifyYAxisMinus() { +#if QWT_VERSION < 0x060100 QwtScaleDiv *ax = getPlot()->axisScaleDiv(QwtPlot::yLeft); double range = ax->upperBound() - ax->lowerBound(); double step = range/20.0; getPlot()->setYaxis(ax->lowerBound()-step, ax->upperBound()-step); + +#else + + QwtScaleDiv ax = getPlot()->axisScaleDiv(QwtPlot::yLeft); + double range = ax.upperBound() - ax.lowerBound(); + double step = range/20.0; + getPlot()->setYaxis(ax.lowerBound()-step, ax.upperBound()-step); +#endif } void TimeDisplayForm::notifyYRangePlus() { +#if QWT_VERSION < 0x060100 QwtScaleDiv *ax = getPlot()->axisScaleDiv(QwtPlot::yLeft); double range = ax->upperBound() - ax->lowerBound(); double step = range/20.0; getPlot()->setYaxis(ax->lowerBound()-step, ax->upperBound()+step); + +#else + + QwtScaleDiv ax = getPlot()->axisScaleDiv(QwtPlot::yLeft); + double range = ax.upperBound() - ax.lowerBound(); + double step = range/20.0; + getPlot()->setYaxis(ax.lowerBound()-step, ax.upperBound()+step); +#endif } void TimeDisplayForm::notifyYRangeMinus() { +#if QWT_VERSION < 0x060100 QwtScaleDiv *ax = getPlot()->axisScaleDiv(QwtPlot::yLeft); double range = ax->upperBound() - ax->lowerBound(); double step = range/20.0; getPlot()->setYaxis(ax->lowerBound()+step, ax->upperBound()-step); + +#else + + QwtScaleDiv ax = getPlot()->axisScaleDiv(QwtPlot::yLeft); + double range = ax.upperBound() - ax.lowerBound(); + double step = range/20.0; + getPlot()->setYaxis(ax.lowerBound()+step, ax.upperBound()-step); +#endif } @@ -595,8 +631,16 @@ TimeDisplayForm::notifyTriggerSlope(const QString &slope) void TimeDisplayForm::notifyTriggerLevelPlus() { +#if QWT_VERSION < 0x060100 QwtScaleDiv *ax = getPlot()->axisScaleDiv(QwtPlot::yLeft); double range = ax->upperBound() - ax->lowerBound(); + +#else + + QwtScaleDiv ax = getPlot()->axisScaleDiv(QwtPlot::yLeft); + double range = ax.upperBound() - ax.lowerBound(); +#endif + double step = range/20.0; emit signalTriggerLevel(getTriggerLevel() + step); } @@ -604,8 +648,16 @@ TimeDisplayForm::notifyTriggerLevelPlus() void TimeDisplayForm::notifyTriggerLevelMinus() { +#if QWT_VERSION < 0x060100 QwtScaleDiv *ax = getPlot()->axisScaleDiv(QwtPlot::yLeft); double range = ax->upperBound() - ax->lowerBound(); + +#else + + QwtScaleDiv ax = getPlot()->axisScaleDiv(QwtPlot::yLeft); + double range = ax.upperBound() - ax.lowerBound(); +#endif + double step = range/20.0; emit signalTriggerLevel(getTriggerLevel() - step); } @@ -613,8 +665,16 @@ TimeDisplayForm::notifyTriggerLevelMinus() void TimeDisplayForm::notifyTriggerDelayPlus() { +#if QWT_VERSION < 0x060100 QwtScaleDiv *ax = getPlot()->axisScaleDiv(QwtPlot::xBottom); double range = ax->upperBound() - ax->lowerBound(); + +#else + + QwtScaleDiv ax = getPlot()->axisScaleDiv(QwtPlot::xBottom); + double range = ax.upperBound() - ax.lowerBound(); +#endif + double step = range/20.0; double trig = getTriggerDelay() + step / d_current_units; emit signalTriggerDelay(trig); @@ -623,8 +683,16 @@ TimeDisplayForm::notifyTriggerDelayPlus() void TimeDisplayForm::notifyTriggerDelayMinus() { +#if QWT_VERSION < 0x060100 QwtScaleDiv *ax = getPlot()->axisScaleDiv(QwtPlot::xBottom); double range = ax->upperBound() - ax->lowerBound(); + +#else + + QwtScaleDiv ax = getPlot()->axisScaleDiv(QwtPlot::xBottom); + double range = ax.upperBound() - ax.lowerBound(); +#endif + double step = range/20.0; double trig = getTriggerDelay() - step / d_current_units; if(trig < 0) |