Skip to content
Permalink
Browse files
- Reorganise digitising icons as discussed on mailing list
 - Added fullscreen toggle to view menu
 - moved add all / remove all layers to / from overview to menu only to 
   free up some tool bar clutter
      


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8105 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Feb 5, 2008
1 parent cc69fbb commit 11cf17d7e0615a61ab3c07d0850174ece9c80940
Showing with 29 additions and 4 deletions.
  1. +24 −4 src/app/qgisapp.cpp
  2. +5 −0 src/app/qgisapp.h
@@ -401,6 +401,8 @@ static void customSrsValidation_(QgsSpatialRefSys* srs)
mSplash->showMessage(tr("QGIS Ready!"), Qt::AlignHCenter | Qt::AlignBottom);

mMapTipsVisible = false;
mFullScreenMode = false;
showNormal();
qApp->processEvents();
} // QgisApp ctor

@@ -552,6 +554,12 @@ void QgisApp::createActions()
mActionRemoveAllFromOverview->setShortcut(tr("-","Remove all layers from overview map"));
mActionRemoveAllFromOverview->setStatusTip(tr("Remove all layers from overview map"));
connect(mActionRemoveAllFromOverview, SIGNAL(triggered()), this, SLOT(removeAllFromOverview()));
//
mActionToggleFullScreen = new QAction(QIcon(myIconPath+"/mActionToggleFullScreen.png"), tr("Toggle full screen mode"), this);
mActionToggleFullScreen->setShortcut(tr("Ctrl-F","Toggle fullscreen mode"));
mActionToggleFullScreen->setStatusTip(tr("Toggle fullscreen mode"));
connect(mActionToggleFullScreen, SIGNAL(triggered()), this, SLOT(toggleFullScreen()));

//
mActionShowAllLayers= new QAction(QIcon(myIconPath+"/mActionShowAllLayers.png"), tr("Show All Layers"), this);
mActionShowAllLayers->setShortcut(tr("S","Show all layers"));
@@ -897,6 +905,7 @@ void QgisApp::createMenus()
mViewMenu->addAction(mActionZoomToLayer);
mViewMenu->addAction(mActionZoomLast);
mViewMenu->addAction(mActionDraw);
mViewMenu->addAction(mActionToggleFullScreen);
mViewMenu->addSeparator();
mViewMenu->addAction(mActionShowBookmarks);
mViewMenu->addAction(mActionNewBookmark);
@@ -994,8 +1003,6 @@ void QgisApp::createToolBars()
mLayerToolBar->addAction(mActionNewVectorLayer);
mLayerToolBar->addAction(mActionRemoveLayer);
mLayerToolBar->addAction(mActionInOverview);
mLayerToolBar->addAction(mActionAddAllToOverview);
mLayerToolBar->addAction(mActionRemoveAllFromOverview);
mLayerToolBar->addAction(mActionShowAllLayers);
mLayerToolBar->addAction(mActionHideAllLayers);
//
@@ -1014,14 +1021,14 @@ void QgisApp::createToolBars()
mDigitizeToolBar->addAction(mActionCapturePoint);
mDigitizeToolBar->addAction(mActionCaptureLine);
mDigitizeToolBar->addAction(mActionCapturePolygon);
mDigitizeToolBar->addAction(mActionAddRing);
mDigitizeToolBar->addAction(mActionAddIsland);
mDigitizeToolBar->addAction(mActionMoveFeature);
mDigitizeToolBar->addAction(mActionSplitFeatures);
mDigitizeToolBar->addAction(mActionDeleteSelected);
mDigitizeToolBar->addAction(mActionAddVertex);
mDigitizeToolBar->addAction(mActionDeleteVertex);
mDigitizeToolBar->addAction(mActionMoveVertex);
mDigitizeToolBar->addAction(mActionAddRing);
mDigitizeToolBar->addAction(mActionAddIsland);
mDigitizeToolBar->addAction(mActionEditCut);
mDigitizeToolBar->addAction(mActionEditCopy);
mDigitizeToolBar->addAction(mActionEditPaste);
@@ -3207,6 +3214,19 @@ void QgisApp::removeAllFromOverview()
QgsProject::instance()->dirty(true);
}

void QgisApp::toggleFullScreen()
{
if (true == mFullScreenMode)
{
showNormal();
mFullScreenMode = false;
}
else
{
showFullScreen();
mFullScreenMode = true;
}
}

//reimplements method from base (gui) class
void QgisApp::hideAllLayers()
@@ -377,6 +377,8 @@ public slots:
//! Show the map tip
void showMapTip();

//! Toggle full screen mode
void toggleFullScreen();
signals:
/** emitted when a key is pressed and we want non widget sublasses to be able
to pick up on this (e.g. maplayer) */
@@ -520,6 +522,7 @@ public slots:
QAction *mActionDraw;
QAction *mActionShowAllToolbars;
QAction *mActionHideAllToolbars;
QAction *mActionToggleFullScreen;
#ifdef HAVE_PYTHON
QAction *mActionShowPythonDialog;
#endif
@@ -652,6 +655,8 @@ public slots:
// Flag to indicate if maptips are on or off
bool mMapTipsVisible;

//!flag to indicat wehter we are in fullscreen mode or not
bool mFullScreenMode;
#ifdef HAVE_PYTHON
QgsPythonDialog* mPythonConsole;
#endif

0 comments on commit 11cf17d

Please sign in to comment.