make QWT support configurable

git-svn-id: http://svn.osgeo.org/qgis/trunk@12707 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
jef 2010-01-08 15:45:36 +00:00
parent 987a9b6d75
commit 8d5ad0c200
4 changed files with 26 additions and 10 deletions

View File

@ -52,6 +52,8 @@ IF (WITH_POSTGRESQL)
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(Expat) # GPS importer plugin
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 @@ ENDIF (WITH_POSTGRESQL)
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)

View File

@ -37,7 +37,7 @@ ENDIF (QWT_INCLUDE_DIR AND QWT_LIBRARY)
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)

View File

@ -958,12 +958,13 @@ void QgisApp::createActions()
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 );
@ -1322,7 +1323,9 @@ void QgisApp::createMenus()
mViewMenu->addMenu( mToolbarMenu );
mViewMenu->addAction( mActionToggleFullScreen );
}
#ifdef HAVE_QWT
mViewMenu->addAction( mActionGpsTool );
#endif
// Layers Menu
@ -2157,9 +2160,9 @@ void QgisApp::about()
.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 @@ void QgisApp::about()
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>";

View File

@ -275,7 +275,9 @@ class QgisApp : public QMainWindow
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 @@ class QgisApp : public QMainWindow
QAction *mActionLayerSaveAs;
QAction *mActionLayerSelectionSaveAs;
QAction *mActionRemoveLayer;
#ifdef HAVE_QWT
QAction *mActionGpsTool;
#endif
QAction *mActionLayerProperties;
QAction *mActionLayerSeparator2;
QAction *mActionAddToOverview;