Skip to content

Commit 144ca8d

Browse files
committedJan 1, 2016
Fix test for QWT_POLAR
1 parent 0df4cbe commit 144ca8d

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed
 

‎src/app/gps/qgsgpsinformationwidget.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#include <qwt_plot.h>
4949
#include <qwt_plot_grid.h>
5050

51-
#if (WITH_QWTPOLAR)
51+
#ifdef WITH_QWTPOLAR
5252
// QWT Polar plot add on
5353
#include <qwt_symbol.h>
5454
#include <qwt_polar_grid.h>
@@ -79,7 +79,7 @@ QgsGPSInformationWidget::QgsGPSInformationWidget( QgsMapCanvas * thepCanvas, QWi
7979
mpRubberBand = nullptr;
8080
populateDevices();
8181
QWidget * mpHistogramWidget = mStackedWidget->widget( 1 );
82-
#if (!WITH_QWTPOLAR)
82+
#ifndef WITH_QWTPOLAR
8383
mBtnSatellites->setVisible( false );
8484
#endif
8585
//
@@ -115,7 +115,7 @@ QgsGPSInformationWidget::QgsGPSInformationWidget( QgsMapCanvas * thepCanvas, QWi
115115
//
116116
// Set up the polar graph for satellite pos
117117
//
118-
#if (WITH_QWTPOLAR)
118+
#ifdef WITH_QWTPOLAR
119119
QWidget * mpPolarWidget = mStackedWidget->widget( 2 );
120120
mpSatellitesWidget = new QwtPolarPlot( /*QwtText( tr( "Satellite View" ), QwtText::PlainText ),*/ mpPolarWidget ); // possible title for graph removed for now as it is too large in small windows
121121
mpSatellitesWidget->setAutoReplot( false ); // plot on demand (after all data has been handled)
@@ -256,7 +256,7 @@ QgsGPSInformationWidget::~QgsGPSInformationWidget()
256256
delete mpMapMarker;
257257
delete mpRubberBand;
258258

259-
#if (WITH_QWTPOLAR)
259+
#ifdef WITH_QWTPOLAR
260260
delete mpSatellitesGrid;
261261
#endif
262262

@@ -541,7 +541,7 @@ void QgsGPSInformationWidget::displayGPSInformation( const QgsGPSInformation& in
541541
{
542542
mpPlot->setAxisScale( QwtPlot::xBottom, 0, info.satellitesInView.size() );
543543
} //signal
544-
#if (WITH_QWTPOLAR)
544+
#ifdef WITH_QWTPOLAR
545545
if ( mStackedWidget->currentIndex() == 2 && info.satInfoComplete ) //satellites
546546
{
547547
while ( !mMarkerList.isEmpty() )
@@ -589,7 +589,7 @@ void QgsGPSInformationWidget::displayGPSInformation( const QgsGPSInformation& in
589589
// Add a marker to the polar plot
590590
if ( currentInfo.id > 0 ) // don't show satellite if id=0 (no satellite indication)
591591
{
592-
#if (WITH_QWTPOLAR)
592+
#ifdef WITH_QWTPOLAR
593593
QwtPolarMarker *mypMarker = new QwtPolarMarker();
594594
#if (QWT_POLAR_VERSION<0x010000)
595595
mypMarker->setPosition( QwtPolarPoint( currentInfo.azimuth, currentInfo.elevation ) );
@@ -605,7 +605,7 @@ void QgsGPSInformationWidget::displayGPSInformation( const QgsGPSInformation& in
605605
{
606606
myColor = Qt::black; //strong signal
607607
}
608-
#if (WITH_QWTPOLAR)
608+
#ifdef WITH_QWTPOLAR
609609
#if (QWT_POLAR_VERSION<0x010000)
610610
mypMarker->setSymbol( QwtSymbol( QwtSymbol::Ellipse,
611611
symbolBrush, QPen( myColor ), markerSize ) );
@@ -635,7 +635,7 @@ void QgsGPSInformationWidget::displayGPSInformation( const QgsGPSInformation& in
635635
#endif
636636
mpPlot->replot();
637637
} //signal
638-
#if (WITH_QWTPOLAR)
638+
#ifdef WITH_QWTPOLAR
639639
if ( mStackedWidget->currentIndex() == 2 && info.satInfoComplete ) //satellites
640640
{
641641
mpSatellitesWidget->replot();

‎src/app/gps/qgsgpsinformationwidget.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <qgsgpsmarker.h>
2424
#include <qgsmaptoolcapture.h>
2525
#include <qwt_plot_curve.h>
26-
#if (WITH_QWTPOLAR)
26+
#ifdef WITH_QWTPOLAR
2727
#include <qwt_polar_plot.h>
2828
#include <qwt_polar_grid.h>
2929
#include <qwt_polar_marker.h>
@@ -88,7 +88,7 @@ class QgsGPSInformationWidget: public QWidget, private Ui::QgsGPSInformationWidg
8888
QgsGpsMarker * mpMapMarker;
8989
QwtPlot * mpPlot;
9090
QwtPlotCurve * mpCurve;
91-
#if (WITH_QWTPOLAR)
91+
#ifdef WITH_QWTPOLAR
9292
QwtPolarPlot * mpSatellitesWidget;
9393
QwtPolarGrid *mpSatellitesGrid;
9494
QList< QwtPolarMarker * > mMarkerList;

0 commit comments

Comments
 (0)
Please sign in to comment.