[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)
- [Commit-gnuradio] [gnuradio] branch master updated (6168622 -> 7fe6115), git, 2015/04/01
- [Commit-gnuradio] [gnuradio] 01/08: blocks: add blocks_stream_align to support acquiring alignment to TSB from an unaligned TSB stream, git, 2015/04/01
- [Commit-gnuradio] [gnuradio] 04/08: qtgui: fixed issue with QWT 6 and 6.1 changes.,
git <=
- [Commit-gnuradio] [gnuradio] 05/08: Merge branch 'maint', git, 2015/04/01
- [Commit-gnuradio] [gnuradio] 03/08: modtool: update manifest based on CGRAN meeting, git, 2015/04/01
- [Commit-gnuradio] [gnuradio] 08/08: Merge remote-tracking branch 'tom/qtgui/timedisplayform_qwt_fix', git, 2015/04/01
- [Commit-gnuradio] [gnuradio] 02/08: blocks: fix tagged_stream_align min/max output items, git, 2015/04/01
- [Commit-gnuradio] [gnuradio] 06/08: Merge remote-tracking branch 'osh/tsb_align', git, 2015/04/01
- [Commit-gnuradio] [gnuradio] 07/08: Merge remote-tracking branch 'nwest/cgran_meeting', git, 2015/04/01