Skip to content

Commit 0bd9990

Browse files
author
jef
committed
QWT now required
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14317 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 6a4b548 commit 0bd9990

File tree

6 files changed

+30
-76
lines changed

6 files changed

+30
-76
lines changed

CMakeLists.txt

+1-5
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ IF (WITH_POSTGRESQL)
5858
SET (POSTGRESQL_PREFIX "" CACHE PATH "Path to POSTGRESQL base directory")
5959
ENDIF (WITH_POSTGRESQL)
6060

61-
SET (WITH_QWT TRUE CACHE BOOL "Determines whether QWT support should be included (currently used for GPS widget)")
62-
6361
SET (WITH_SPATIALITE TRUE CACHE BOOL "Determines whether SPATIALITE support should be built")
6462

6563
IF (WITH_SPATIALITE)
@@ -137,6 +135,7 @@ FIND_PACKAGE(Expat) # GPS importer plugin
137135
FIND_PACKAGE(GSL) # Georeferencer
138136
FIND_PACKAGE(GEOS)
139137
FIND_PACKAGE(GDAL)
138+
FIND_PACKAGE(QWT REQUIRED)
140139

141140
IF (NOT WITH_INTERNAL_SPATIALITE)
142141
FIND_PACKAGE(Sqlite3)
@@ -149,9 +148,6 @@ ENDIF (NOT WITH_INTERNAL_SPATIALITE)
149148
IF (WITH_POSTGRESQL)
150149
FIND_PACKAGE(Postgres) # PostgreSQL provider, SPIT plugin
151150
ENDIF (WITH_POSTGRESQL)
152-
IF (WITH_QWT)
153-
FIND_PACKAGE(QWT)
154-
ENDIF(WITH_QWT)
155151

156152
IF (WITH_SPATIALITE AND NOT WITH_INTERNAL_SPATIALITE)
157153
FIND_PACKAGE(SPATIALITE)

INSTALL

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ for the existence of cmake and provides some clues to build QGIS.
185185
* GEOS >= 3.0
186186
* Sqlite3 >= 3.0.0
187187
* GDAL/OGR >= 1.4.x
188+
* Qwt >= 5.0
188189

189190
'''Optional dependencies:'''
190191
* for GRASS plugin - GRASS >= 6.0.0 (libraries compiled with exceptions support)
@@ -193,7 +194,6 @@ for the existence of cmake and provides some clues to build QGIS.
193194
* for gps plugin - expat >= 1.95
194195
* for mapserver export and PyQGIS - Python >= 2.3 (2.5+ preferred)
195196
* for PyQGIS - SIP >= 4.8, PyQt >= must match Qt version
196-
* for GPS tracking - Qwt >= 5.0
197197

198198
'''Recommended runtime deps:'''
199199
* for gps plugin - gpsbabel

doc/INSTALL.t2t

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ for the existence of cmake and provides some clues to build QGIS.
101101
* GEOS >= 3.0
102102
* Sqlite3 >= 3.0.0
103103
* GDAL/OGR >= 1.4.x
104+
* Qwt >= 5.0
104105

105106
'''Optional dependencies:'''
106107
* for GRASS plugin - GRASS >= 6.0.0 (libraries compiled with exceptions support)
@@ -109,7 +110,6 @@ for the existence of cmake and provides some clues to build QGIS.
109110
* for gps plugin - expat >= 1.95
110111
* for mapserver export and PyQGIS - Python >= 2.3 (2.5+ preferred)
111112
* for PyQGIS - SIP >= 4.8, PyQt >= must match Qt version
112-
* for GPS tracking - Qwt >= 5.0
113113

114114
'''Recommended runtime deps:'''
115115
* for gps plugin - gpsbabel

src/app/CMakeLists.txt

+26-39
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,22 @@ SET(QGIS_APP_SRCS
127127
attributetable/qgsattributetablefiltermodel.cpp
128128
attributetable/qgsattributetableidcolumnpair.cpp
129129
attributetable/qgsattributetabledelegate.cpp
130+
131+
gps/qgsgpsinformationwidget.cpp
132+
gps/qgsgpsmarker.cpp
133+
gps/qwtpolar/qwt_polar_canvas.cpp
134+
gps/qwtpolar/qwt_polar_curve.cpp
135+
gps/qwtpolar/qwt_polar_fitter.cpp
136+
gps/qwtpolar/qwt_polar_grid.cpp
137+
gps/qwtpolar/qwt_polar_itemdict.cpp
138+
gps/qwtpolar/qwt_polar_item.cpp
139+
gps/qwtpolar/qwt_polar_layout.cpp
140+
gps/qwtpolar/qwt_polar_magnifier.cpp
141+
gps/qwtpolar/qwt_polar_marker.cpp
142+
gps/qwtpolar/qwt_polar_panner.cpp
143+
gps/qwtpolar/qwt_polar_plot.cpp
144+
gps/qwtpolar/qwt_polar_point.cpp
145+
gps/qwtpolar/qwt_polar_spectrogram.cpp
130146
)
131147

132148

@@ -231,40 +247,13 @@ SET (QGIS_APP_MOC_HDRS
231247
attributetable/qgsattributetabledialog.h
232248
attributetable/qgsattributetabledelegate.h
233249

250+
gps/qgsgpsinformationwidget.h
251+
gps/qwtpolar/qwt_polar_canvas.h
252+
gps/qwtpolar/qwt_polar_magnifier.h
253+
gps/qwtpolar/qwt_polar_panner.h
254+
gps/qwtpolar/qwt_polar_plot.h
234255
)
235256

236-
IF( QWT_FOUND )
237-
ADD_DEFINITIONS(-DHAVE_QWT)
238-
239-
SET(QGIS_APP_SRCS
240-
${QGIS_APP_SRCS}
241-
gps/qgsgpsinformationwidget.cpp
242-
gps/qgsgpsmarker.cpp
243-
gps/qwtpolar/qwt_polar_canvas.cpp
244-
gps/qwtpolar/qwt_polar_curve.cpp
245-
gps/qwtpolar/qwt_polar_fitter.cpp
246-
gps/qwtpolar/qwt_polar_grid.cpp
247-
gps/qwtpolar/qwt_polar_itemdict.cpp
248-
gps/qwtpolar/qwt_polar_item.cpp
249-
gps/qwtpolar/qwt_polar_layout.cpp
250-
gps/qwtpolar/qwt_polar_magnifier.cpp
251-
gps/qwtpolar/qwt_polar_marker.cpp
252-
gps/qwtpolar/qwt_polar_panner.cpp
253-
gps/qwtpolar/qwt_polar_plot.cpp
254-
gps/qwtpolar/qwt_polar_point.cpp
255-
gps/qwtpolar/qwt_polar_spectrogram.cpp
256-
)
257-
258-
SET (QGIS_APP_MOC_HDRS
259-
${QGIS_APP_MOC_HDRS}
260-
gps/qgsgpsinformationwidget.h
261-
gps/qwtpolar/qwt_polar_canvas.h
262-
gps/qwtpolar/qwt_polar_magnifier.h
263-
gps/qwtpolar/qwt_polar_panner.h
264-
gps/qwtpolar/qwt_polar_plot.h
265-
)
266-
ENDIF( QWT_FOUND )
267-
268257
IF (POSTGRES_FOUND)
269258
IF(HAVE_PGCONFIG)
270259
ADD_DEFINITIONS(-DHAVE_PGCONFIG=1)
@@ -388,13 +377,11 @@ TARGET_LINK_LIBRARIES(qgis
388377
qgis_gui
389378
)
390379

391-
IF( QWT_FOUND )
392-
IF( WIN32 )
393-
ADD_DEFINITIONS(-DQWT_DLL)
394-
ENDIF( WIN32 )
395-
INCLUDE_DIRECTORIES(${QWT_INCLUDE_DIR})
396-
TARGET_LINK_LIBRARIES(qgis ${QWT_LIBRARY})
397-
ENDIF( QWT_FOUND )
380+
IF( WIN32 )
381+
ADD_DEFINITIONS(-DQWT_DLL)
382+
ENDIF( WIN32 )
383+
INCLUDE_DIRECTORIES(${QWT_INCLUDE_DIR})
384+
TARGET_LINK_LIBRARIES(qgis ${QWT_LIBRARY})
398385

399386
IF(NOT WITH_INTERNAL_SPATIALITE)
400387
TARGET_LINK_LIBRARIES(qgis ${SQLITE_LIBRARY})

src/app/qgisapp.cpp

+1-20
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,7 @@
160160
#include "qgstilescalewidget.h"
161161
#include "qgsquerybuilder.h"
162162
#include "qgsattributeaction.h"
163-
164-
#ifdef HAVE_QWT
165163
#include "qgsgpsinformationwidget.h"
166-
#endif
167164

168165
//
169166
// Gdal/Ogr includes
@@ -372,9 +369,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
372369
#ifdef Q_OS_WIN
373370
, mSkipNextContextMenuEvent( 0 )
374371
#endif
375-
#ifdef HAVE_QWT
376372
, mpGpsWidget( NULL )
377-
#endif
378373
{
379374
if ( smInstance )
380375
{
@@ -643,13 +638,11 @@ void QgisApp::readSettings()
643638
{
644639
showTileScale();
645640
}
646-
#if HAVE_QWT
647641
// Restore state of GPS Tracker
648642
if ( settings.value( "/gps/widgetEnabled", false ).toBool() )
649643
{
650644
showGpsTool();
651645
}
652-
#endif
653646
}
654647

655648

@@ -1084,13 +1077,11 @@ void QgisApp::createActions()
10841077
connect( mActionTileScale, SIGNAL( triggered() ), this, SLOT( showTileScale() ) );
10851078
mActionTileScale->setEnabled( true );
10861079

1087-
#ifdef HAVE_QWT
10881080
mActionGpsTool = new QAction( getThemeIcon( "mActionGpsTool.png" ), tr( "Live GPS tracking" ), this );
10891081
shortcuts->registerAction( mActionGpsTool, tr( "", "Live GPS tracking" ) );
10901082
mActionGpsTool->setStatusTip( tr( "Show GPS tool" ) );
10911083
connect( mActionGpsTool, SIGNAL( triggered() ), this, SLOT( showGpsTool() ) );
10921084
mActionGpsTool->setEnabled( true );
1093-
#endif
10941085

10951086
mActionLayerProperties = new QAction( tr( "Properties..." ), this );
10961087
shortcuts->registerAction( mActionLayerProperties );
@@ -1501,9 +1492,7 @@ void QgisApp::createMenus()
15011492

15021493
mViewMenu->addAction( mActionTileScale );
15031494

1504-
#ifdef HAVE_QWT
15051495
mViewMenu->addAction( mActionGpsTool );
1506-
#endif
15071496

15081497
// Layers Menu
15091498

@@ -2426,7 +2415,6 @@ void QgisApp::saveWindowState()
24262415
settings.setValue( "/UI/tileScaleEnabled", false );
24272416
}
24282417

2429-
#if HAVE_QWT
24302418
// Persist state of GPS Tracker
24312419
if ( mpGpsWidget )
24322420
{
@@ -2437,7 +2425,6 @@ void QgisApp::saveWindowState()
24372425
{
24382426
settings.setValue( "/gps/widgetEnabled", false );
24392427
}
2440-
#endif
24412428

24422429
QgsPluginRegistry::instance()->unloadAll();
24432430
}
@@ -2497,11 +2484,7 @@ void QgisApp::about()
24972484
versionString += tr( "\nThis copy of QGIS has been built without SpatiaLite support." );
24982485
#endif
24992486

2500-
#ifdef HAVE_QWT
2501-
versionString += tr( "\nThis copy of QGIS has been built with QWT support (%1)." ).arg( QWT_VERSION_STR );
2502-
#else
2503-
versionString += tr( "\nThis copy of QGIS has been built without QWT support." );
2504-
#endif
2487+
versionString += tr( "\nThis copy of QGIS has been built with QWT %1." ).arg( QWT_VERSION_STR );
25052488

25062489
#ifdef QGISDEBUG
25072490
versionString += tr( "\nThis copy of QGIS writes debugging output." );
@@ -5021,7 +5004,6 @@ void QgisApp::removeLayer()
50215004

50225005
void QgisApp::showGpsTool()
50235006
{
5024-
#ifdef HAVE_QWT
50255007
if ( !mpGpsWidget )
50265008
{
50275009
mpGpsWidget = new QgsGPSInformationWidget( mMapCanvas );
@@ -5040,7 +5022,6 @@ void QgisApp::showGpsTool()
50405022
{
50415023
mpGpsDock->setVisible( mpGpsDock->isHidden() );
50425024
}
5043-
#endif
50445025
}
50455026

50465027
void QgisApp::showTileScale()

src/app/qgisapp.h

-10
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ class QNetworkReply;
6767
class QNetworkProxy;
6868
class QAuthenticator;
6969

70-
#ifdef HAVE_QWT
7170
class QgsGPSInformationWidget;
72-
#endif
7371

7472
#include <QMainWindow>
7573
#include <QToolBar>
@@ -285,9 +283,7 @@ class QgisApp : public QMainWindow
285283
QAction *actionLayerSelectionSaveAs() { return mActionLayerSelectionSaveAs; }
286284
QAction *actionRemoveLayer() { return mActionRemoveLayer; }
287285
QAction *actionTileScale() { return mActionTileScale; }
288-
#ifdef HAVE_QWT
289286
QAction *actionGpsTool() { return mActionGpsTool; }
290-
#endif
291287
QAction *actionLayerProperties() { return mActionLayerProperties; }
292288
QAction *actionLayerSubsetString() { return mActionLayerSubsetString; }
293289
QAction *actionLayerSeparator2() { return mActionLayerSeparator2; }
@@ -944,9 +940,7 @@ class QgisApp : public QMainWindow
944940
QAction *mActionLayerSelectionSaveAs;
945941
QAction *mActionRemoveLayer;
946942
QAction *mActionTileScale;
947-
#ifdef HAVE_QWT
948943
QAction *mActionGpsTool;
949-
#endif
950944
QAction *mActionLayerProperties;
951945
QAction *mActionLayerSubsetString;
952946
QAction *mActionLayerSeparator2;
@@ -1009,9 +1003,7 @@ class QgisApp : public QMainWindow
10091003
QDockWidget *mLegendDock;
10101004
QDockWidget *mOverviewDock;
10111005
QDockWidget *mpTileScaleDock;
1012-
#ifdef HAVE_QWT
10131006
QDockWidget *mpGpsDock;
1014-
#endif
10151007

10161008
#ifdef Q_WS_MAC
10171009
//! Window menu action to select this window
@@ -1172,10 +1164,8 @@ class QgisApp : public QMainWindow
11721164
int mSkipNextContextMenuEvent; // ugly hack
11731165
#endif
11741166

1175-
#ifdef HAVE_QWT
11761167
//! Persistent GPS toolbox
11771168
QgsGPSInformationWidget * mpGpsWidget;
1178-
#endif
11791169

11801170
QgsPalLabeling* mLBL;
11811171

0 commit comments

Comments
 (0)