Skip to content

Commit

Permalink
make QWT support configurable
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@12707 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Jan 8, 2010
1 parent 987a9b6 commit 8d5ad0c
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindQWT.cmake
Expand Up @@ -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)
Expand Down
24 changes: 16 additions & 8 deletions src/app/qgisapp.cpp
Expand Up @@ -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 );
Expand Down Expand Up @@ -1322,7 +1323,9 @@ void QgisApp::createMenus()
mViewMenu->addMenu( mToolbarMenu );
mViewMenu->addAction( mActionToggleFullScreen );
}
#ifdef HAVE_QWT
mViewMenu->addAction( mActionGpsTool );
#endif

// Layers Menu

Expand Down Expand Up @@ -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
Expand All @@ -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>";
Expand Down
4 changes: 4 additions & 0 deletions src/app/qgisapp.h
Expand Up @@ -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; }
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 8d5ad0c

Please sign in to comment.