summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gr-qtgui/lib/timedisplayform.cc68
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)