commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 04/08: qtgui: fixed issue with QWT 6 and 6.


From: git
Subject: [Commit-gnuradio] [gnuradio] 04/08: qtgui: fixed issue with QWT 6 and 6.1 changes.
Date: Wed, 1 Apr 2015 13:00:35 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch master
in repository gnuradio.

commit 67e700425b1362c3146cbb38412aedef7face026
Author: Tom Rondeau <address@hidden>
Date:   Tue Mar 31 18:36:19 2015 -0700

    qtgui: fixed issue with QWT 6 and 6.1 changes.
---
 gr-qtgui/lib/timedisplayform.cc | 68 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/gr-qtgui/lib/timedisplayform.cc b/gr-qtgui/lib/timedisplayform.cc
index 4370d55..9a30b30 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]