[QGIS Commit] r12707 - in trunk/qgis: . cmake src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Jan 8 10:45:37 EST 2010
Author: jef
Date: 2010-01-08 10:45:36 -0500 (Fri, 08 Jan 2010)
New Revision: 12707
Modified:
trunk/qgis/CMakeLists.txt
trunk/qgis/cmake/FindQWT.cmake
trunk/qgis/src/app/qgisapp.cpp
trunk/qgis/src/app/qgisapp.h
Log:
make QWT support configurable
Modified: trunk/qgis/CMakeLists.txt
===================================================================
--- trunk/qgis/CMakeLists.txt 2010-01-08 15:45:04 UTC (rev 12706)
+++ trunk/qgis/CMakeLists.txt 2010-01-08 15:45:36 UTC (rev 12707)
@@ -52,6 +52,8 @@
SET (POSTGRESQL_PREFIX "" CACHE PATH "Path to POSTGRESQL base directory")
ENDIF (WITH_POSTGRESQL)
+SET (WITH_QWT TRUE CACHE BOOL "Determines whether QWT support should be included (currently used for GPS widget)")
+
SET (WITH_SPATIALITE TRUE CACHE BOOL "Determines whether SPATIALITE support should be built")
IF (WITH_SPATIALITE)
@@ -132,7 +134,6 @@
FIND_PACKAGE(GSL) # Georeferencer
FIND_PACKAGE(GEOS)
FIND_PACKAGE(GDAL)
-FIND_PACKAGE(QWT)
IF (NOT WITH_INTERNAL_SPATIALITE)
FIND_PACKAGE(Sqlite3)
@@ -148,6 +149,9 @@
IF (WITH_GRASS)
FIND_PACKAGE(GRASS) # GRASS plugin
ENDIF (WITH_GRASS)
+IF (WITH_QWT)
+ FIND_PACKAGE(QWT)
+ENDIF(WITH_QWT)
IF (WITH_SPATIALITE AND NOT WITH_INTERNAL_SPATIALITE)
FIND_PACKAGE(SPATIALITE)
Modified: trunk/qgis/cmake/FindQWT.cmake
===================================================================
--- trunk/qgis/cmake/FindQWT.cmake 2010-01-08 15:45:04 UTC (rev 12706)
+++ trunk/qgis/cmake/FindQWT.cmake 2010-01-08 15:45:36 UTC (rev 12707)
@@ -37,7 +37,7 @@
IF (QWT_FOUND)
IF (NOT QWT_FIND_QUIETLY)
- MESSAGE(STATUS "Found QWT : ${QWT_LIBRARY}")
+ MESSAGE(STATUS "Found QWT: ${QWT_LIBRARY}")
ENDIF (NOT QWT_FIND_QUIETLY)
ELSE (QWT_FOUND)
IF (QWT_FIND_REQUIRED)
Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp 2010-01-08 15:45:04 UTC (rev 12706)
+++ trunk/qgis/src/app/qgisapp.cpp 2010-01-08 15:45:36 UTC (rev 12707)
@@ -958,13 +958,14 @@
connect( mActionRemoveLayer, SIGNAL( triggered() ), this, SLOT( removeLayer() ) );
mActionRemoveLayer->setEnabled( false );
+#ifdef HAVE_QWT
mActionGpsTool = new QAction( getThemeIcon( "mActionGpsTool.png" ), tr( "Live GPS tracking" ), this );
shortcuts->registerAction( mActionGpsTool, tr( "", "Live GPS tracking" ) );
mActionGpsTool->setStatusTip( tr( "Show GPS tool" ) );
connect( mActionGpsTool, SIGNAL( triggered() ), this, SLOT( showGpsTool() ) );
mActionGpsTool->setEnabled( true );
+#endif
-
mActionLayerProperties = new QAction( tr( "Properties..." ), this );
shortcuts->registerAction( mActionLayerProperties );
mActionLayerProperties->setStatusTip( tr( "Set properties of the current layer" ) );
@@ -1322,7 +1323,9 @@
mViewMenu->addMenu( mToolbarMenu );
mViewMenu->addAction( mActionToggleFullScreen );
}
+#ifdef HAVE_QWT
mViewMenu->addAction( mActionGpsTool );
+#endif
// Layers Menu
@@ -2157,9 +2160,9 @@
.arg( QGis::QGIS_VERSION )
.arg( QGis::QGIS_SVN_VERSION );
#ifdef HAVE_POSTGRESQL
- versionString += tr( " This copy of QGIS has been built with PostgreSQL support." );
+ versionString += tr( "\nThis copy of QGIS has been built with PostgreSQL support." );
#else
- versionString += tr( " This copy of QGIS has been built without PostgreSQL support." );
+ versionString += tr( "\nThis copy of QGIS has been built without PostgreSQL support." );
#endif
#ifdef HAVE_SPATIALITE
@@ -2168,16 +2171,21 @@
versionString += tr( "\nThis copy of QGIS has been built without SpatiaLite support." );
#endif
+#ifdef HAVE_QWT
+ versionString += tr( "\nThis copy of QGIS has been built with QWT support (%1)." ).arg( QWT_VERSION_STR );
+#else
+ versionString += tr( "\nThis copy of QGIS has been built without QWT support." );
+#endif
+
+#ifdef QGISDEBUG
+ versionString += tr( "\nThis copy of QGIS writes debugging output." );
+#endif
+
versionString += tr( "\nThis binary was compiled against Qt %1,"
"and is currently running against Qt %2" )
.arg( QT_VERSION_STR )
.arg( qVersion() );
-#ifdef WIN32
- // special version stuff for windows (if required)
- // versionString += "\nThis is a Windows preview release - not for production use";
-#endif
-
abt->setVersion( versionString );
QString whatsNew = "<html><body>" ;
whatsNew += "<h2>" + tr( "Version" ) + " " + QString( QGis::QGIS_VERSION ) + "</h2>";
Modified: trunk/qgis/src/app/qgisapp.h
===================================================================
--- trunk/qgis/src/app/qgisapp.h 2010-01-08 15:45:04 UTC (rev 12706)
+++ trunk/qgis/src/app/qgisapp.h 2010-01-08 15:45:36 UTC (rev 12707)
@@ -275,7 +275,9 @@
QAction *actionLayerSaveAs() { return mActionLayerSaveAs; }
QAction *actionLayerSelectionSaveAs() { return mActionLayerSelectionSaveAs; }
QAction *actionRemoveLayer() { return mActionRemoveLayer; }
+#ifdef HAVE_QWT
QAction *actionGpsTool() { return mActionGpsTool; }
+#endif
QAction *actionLayerProperties() { return mActionLayerProperties; }
QAction *actionLayerSeparator2() { return mActionLayerSeparator2; }
QAction *actionAddToOverview() { return mActionAddToOverview; }
@@ -834,7 +836,9 @@
QAction *mActionLayerSaveAs;
QAction *mActionLayerSelectionSaveAs;
QAction *mActionRemoveLayer;
+#ifdef HAVE_QWT
QAction *mActionGpsTool;
+#endif
QAction *mActionLayerProperties;
QAction *mActionLayerSeparator2;
QAction *mActionAddToOverview;
More information about the QGIS-commit
mailing list