[QGIS Commit] r9258 - in trunk/qgis: python/gui src/app src/gui

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Sep 5 01:46:57 EDT 2008


Author: telwertowski
Date: 2008-09-05 01:46:56 -0400 (Fri, 05 Sep 2008)
New Revision: 9258

Modified:
   trunk/qgis/python/gui/qgisinterface.sip
   trunk/qgis/src/app/qgisappinterface.cpp
   trunk/qgis/src/app/qgisappinterface.h
   trunk/qgis/src/gui/qgisinterface.h
Log:
Add accessors for all menus, toolbars and actions to plugin interface so that plugins can insert actions at any position in any menu or toolbar.


Modified: trunk/qgis/python/gui/qgisinterface.sip
===================================================================
--- trunk/qgis/python/gui/qgisinterface.sip	2008-09-05 05:43:33 UTC (rev 9257)
+++ trunk/qgis/python/gui/qgisinterface.sip	2008-09-05 05:46:56 UTC (rev 9258)
@@ -56,10 +56,6 @@
     virtual void removeToolBarIcon(QAction *qAction) = 0;
     //! Add toolbar with specified name
     virtual QToolBar* addToolBar(QString name)=0 /Factory/;
-    /** Get the file toolbar - intended for use with plugins which
-    *   add a new file type handler.
-    */
-    virtual QToolBar * fileToolBar()=0;
 
     // TODO: is this deprecated in favour of QgsContextHelp?
     /** Open a url in the users browser. By default the QGIS doc directory is used
@@ -88,6 +84,133 @@
     /** refresh legend of a layer */
     virtual void refreshLegend( QgsMapLayer * layer )=0;
 
+    /** Add window to Window menu. The action title is the window title
+     * and the action should raise, unminimize and activate the window. */
+    virtual void addWindow( QAction *action ) = 0;
+    /** Remove window from Window menu. Calling this is necessary only for
+     * windows which are hidden rather than deleted when closed. */
+    virtual void removeWindow( QAction *action ) = 0;
+
+    /** Accessors for inserting items into menus and toolbars.
+     * An item can be inserted before any existing action.
+     */
+
+    //! Menus
+    virtual QMenu *fileMenu() = 0;
+    virtual QMenu *editMenu() = 0;
+    virtual QMenu *viewMenu() = 0;
+    virtual QMenu *layerMenu() = 0;
+    virtual QMenu *settingsMenu() = 0;
+    virtual QMenu *pluginMenu() = 0;
+    virtual QMenu *firstRightStandardMenu() = 0;
+    virtual QMenu *windowMenu() = 0;
+    virtual QMenu *helpMenu() = 0;
+
+    //! ToolBars
+    virtual QToolBar *fileToolBar() = 0;
+    virtual QToolBar *layerToolBar() = 0;
+    virtual QToolBar *mapNavToolToolBar() = 0;
+    virtual QToolBar *digitizeToolBar() = 0;
+    virtual QToolBar *attributesToolBar() = 0;
+    virtual QToolBar *pluginToolBar() = 0;
+    virtual QToolBar *helpToolBar() = 0;
+
+    //! File menu actions
+    virtual QAction *actionNewProject() = 0;
+    virtual QAction *actionOpenProject() = 0;
+    virtual QAction *actionFileSeparator1() = 0;
+    virtual QAction *actionSaveProject() = 0;
+    virtual QAction *actionSaveProjectAs() = 0;
+    virtual QAction *actionSaveMapAsImage() = 0;
+    virtual QAction *actionFileSeparator2() = 0;
+    virtual QAction *actionProjectProperties() = 0;
+    virtual QAction *actionFileSeparator3() = 0;
+    virtual QAction *actionPrintComposer() = 0;
+    virtual QAction *actionFileSeparator4() = 0;
+    virtual QAction *actionExit() = 0;
+
+    //! Edit menu actions
+    virtual QAction *actionCutFeatures() = 0;
+    virtual QAction *actionCopyFeatures() = 0;
+    virtual QAction *actionPasteFeatures() = 0;
+    virtual QAction *actionEditSeparator1() = 0;
+    virtual QAction *actionCapturePoint() = 0;
+    virtual QAction *actionCaptureLine() = 0;
+    virtual QAction *actionCapturePologon() = 0;
+    virtual QAction *actionDeleteSelected() = 0;
+    virtual QAction *actionMoveFeature() = 0;
+    virtual QAction *actionSplitFeatures() = 0;
+    virtual QAction *actionAddVertex() = 0;
+    virtual QAction *actionDelerteVertex() = 0;
+    virtual QAction *actioMoveVertex() = 0;
+    virtual QAction *actionAddRing() = 0;
+    virtual QAction *actionAddIsland() = 0;
+    virtual QAction *actionEditSeparator2() = 0;
+
+    //! View menu actions
+    virtual QAction *actionPan() = 0;
+    virtual QAction *actionZoomIn() = 0;
+    virtual QAction *actionZoomOut() = 0;
+    virtual QAction *actionSelect() = 0;
+    virtual QAction *actionIdentify() = 0;
+    virtual QAction *actionMeasure() = 0;
+    virtual QAction *actionMeasureArea() = 0;
+    virtual QAction *actionViewSeparator1() = 0;
+    virtual QAction *actionZoomFullExtent() = 0;
+    virtual QAction *actionZoomToLayer() = 0;
+    virtual QAction *actionZoomToSelected() = 0;
+    virtual QAction *actionZoomLast() = 0;
+    virtual QAction *actionZoomActualSize() = 0;
+    virtual QAction *actionViewSeparator2() = 0;
+    virtual QAction *actionMapTips() = 0;
+    virtual QAction *actionNewBookmark() = 0;
+    virtual QAction *actionShowBookmarks() = 0;
+    virtual QAction *actionDraw() = 0;
+    virtual QAction *actionViewSeparator3() = 0;
+
+    //! Layer menu actions
+    virtual QAction *actionNewVectorLayer() = 0;
+    virtual QAction *actionAddOgrLayer() = 0;
+    virtual QAction *actionAddRasterLayer() = 0;
+    virtual QAction *actionAddPgLayer() = 0;
+    virtual QAction *actionAddWmsLayer() = 0;
+    virtual QAction *actionLayerSeparator1() = 0;
+    virtual QAction *actionOpenTable() = 0;
+    virtual QAction *actionToggleEditing() = 0;
+    virtual QAction *actionLayerSaveAs() = 0;
+    virtual QAction *actionLayerSelectionSaveAs() = 0;
+    virtual QAction *actionRemoveLayer() = 0;
+    virtual QAction *actionLayerProperties() = 0;
+    virtual QAction *actionLayerSeparator2() = 0;
+    virtual QAction *actionAddToOverview() = 0;
+    virtual QAction *actionAddAllToOverview() = 0;
+    virtual QAction *actionRemoveAllFromOverview() = 0;
+    virtual QAction *actionLayerSeparator3() = 0;
+    virtual QAction *actionHideAllLayers() = 0;
+    virtual QAction *actionShowAllLayers() = 0;
+
+    //! Plugin menu actions
+    virtual QAction *actionManagePlugins() = 0;
+    virtual QAction *actionPluginSeparator1() = 0;
+    virtual QAction *actionPluginListSeparator() = 0;
+    virtual QAction *actionPluginSeparator2() = 0;
+    virtual QAction *actionPluginPythonSeparator() = 0;
+    virtual QAction *actionShowPythonDialog() = 0;
+
+    //! Settings menu actions
+    virtual QAction *actionToggleFullScreen() = 0;
+    virtual QAction *actionSettingsSeparator1() = 0;
+    virtual QAction *actionOptions() = 0;
+    virtual QAction *actionCustomProjection() = 0;
+
+    //! Help menu actions
+    virtual QAction *actionHelpContents() = 0;
+    virtual QAction *actionHelpSeparator1() = 0;
+    virtual QAction *actionQgisHomePage() = 0;
+    virtual QAction *actionCheckQgisVersion() = 0;
+    virtual QAction *actionHelpSeparator2() = 0;
+    virtual QAction *actionAbout() = 0;
+
   signals:
     /** Emited whenever current (selected) layer changes.
      *  The pointer to layer can be null if no layer is selected

Modified: trunk/qgis/src/app/qgisappinterface.cpp
===================================================================
--- trunk/qgis/src/app/qgisappinterface.cpp	2008-09-05 05:43:33 UTC (rev 9257)
+++ trunk/qgis/src/app/qgisappinterface.cpp	2008-09-05 05:46:56 UTC (rev 9258)
@@ -122,10 +122,7 @@
 {
   return qgis->addToolBar( name );
 }
-QToolBar * QgisAppInterface::fileToolBar()
-{
-  return qgis->fileToolBar();
-}
+
 void QgisAppInterface::openURL( QString url, bool useQgisDocDirectory )
 {
   qgis->openURL( url, useQgisDocDirectory );
@@ -153,3 +150,122 @@
     qgis->legend()->refreshLayerSymbology( l->getLayerID() );
   }
 }
+
+void QgisAppInterface::addWindow( QAction *action ) { qgis->addWindow( action ); }
+void QgisAppInterface::removeWindow( QAction *action ) { qgis->removeWindow( action ); }
+
+//! Menus
+QMenu *QgisAppInterface::fileMenu() { return qgis->fileMenu(); }
+QMenu *QgisAppInterface::editMenu() { return qgis->editMenu(); }
+QMenu *QgisAppInterface::viewMenu() { return qgis->viewMenu(); }
+QMenu *QgisAppInterface::layerMenu() { return qgis->layerMenu(); }
+QMenu *QgisAppInterface::settingsMenu() { return qgis->settingsMenu(); }
+QMenu *QgisAppInterface::pluginMenu() { return qgis->pluginMenu(); }
+QMenu *QgisAppInterface::firstRightStandardMenu() { return qgis->firstRightStandardMenu(); }
+QMenu *QgisAppInterface::windowMenu() { return qgis->windowMenu(); }
+QMenu *QgisAppInterface::helpMenu() { return qgis->helpMenu(); }
+
+//! ToolBars
+QToolBar *QgisAppInterface::fileToolBar() { return qgis->fileToolBar(); }
+QToolBar *QgisAppInterface::layerToolBar() { return qgis->layerToolBar(); }
+QToolBar *QgisAppInterface::mapNavToolToolBar() { return qgis->mapNavToolToolBar(); }
+QToolBar *QgisAppInterface::digitizeToolBar() { return qgis->digitizeToolBar(); }
+QToolBar *QgisAppInterface::attributesToolBar() { return qgis->attributesToolBar(); }
+QToolBar *QgisAppInterface::pluginToolBar() { return qgis->pluginToolBar(); }
+QToolBar *QgisAppInterface::helpToolBar() { return qgis->helpToolBar(); }
+
+//! File menu actions
+QAction *QgisAppInterface::actionNewProject() { return qgis->actionNewProject(); }
+QAction *QgisAppInterface::actionOpenProject() { return qgis->actionOpenProject(); }
+QAction *QgisAppInterface::actionFileSeparator1() { return qgis->actionFileSeparator1(); }
+QAction *QgisAppInterface::actionSaveProject() { return qgis->actionSaveProject(); }
+QAction *QgisAppInterface::actionSaveProjectAs() { return qgis->actionSaveProjectAs(); }
+QAction *QgisAppInterface::actionSaveMapAsImage() { return qgis->actionSaveMapAsImage(); }
+QAction *QgisAppInterface::actionFileSeparator2() { return qgis->actionFileSeparator2(); }
+QAction *QgisAppInterface::actionProjectProperties() { return qgis->actionProjectProperties(); }
+QAction *QgisAppInterface::actionFileSeparator3() { return qgis->actionFileSeparator3(); }
+QAction *QgisAppInterface::actionPrintComposer() { return qgis->actionPrintComposer(); }
+QAction *QgisAppInterface::actionFileSeparator4() { return qgis->actionFileSeparator4(); }
+QAction *QgisAppInterface::actionExit() { return qgis->actionExit(); }
+
+//! Edit menu actions
+QAction *QgisAppInterface::actionCutFeatures() { return qgis->actionCutFeatures(); }
+QAction *QgisAppInterface::actionCopyFeatures() { return qgis->actionCopyFeatures(); }
+QAction *QgisAppInterface::actionPasteFeatures() { return qgis->actionPasteFeatures(); }
+QAction *QgisAppInterface::actionEditSeparator1() { return qgis->actionEditSeparator1(); }
+QAction *QgisAppInterface::actionCapturePoint() { return qgis->actionCapturePoint(); }
+QAction *QgisAppInterface::actionCaptureLine() { return qgis->actionCaptureLine(); }
+QAction *QgisAppInterface::actionCapturePologon() { return qgis->actionCapturePologon(); }
+QAction *QgisAppInterface::actionDeleteSelected() { return qgis->actionDeleteSelected(); }
+QAction *QgisAppInterface::actionMoveFeature() { return qgis->actionMoveFeature(); }
+QAction *QgisAppInterface::actionSplitFeatures() { return qgis->actionSplitFeatures(); }
+QAction *QgisAppInterface::actionAddVertex() { return qgis->actionAddVertex(); }
+QAction *QgisAppInterface::actionDelerteVertex() { return qgis->actionDelerteVertex(); }
+QAction *QgisAppInterface::actioMoveVertex() { return qgis->actioMoveVertex(); }
+QAction *QgisAppInterface::actionAddRing() { return qgis->actionAddRing(); }
+QAction *QgisAppInterface::actionAddIsland() { return qgis->actionAddIsland(); }
+QAction *QgisAppInterface::actionEditSeparator2() { return qgis->actionEditSeparator2(); }
+
+//! View menu actions
+QAction *QgisAppInterface::actionPan() { return qgis->actionPan(); }
+QAction *QgisAppInterface::actionZoomIn() { return qgis->actionZoomIn(); }
+QAction *QgisAppInterface::actionZoomOut() { return qgis->actionZoomOut(); }
+QAction *QgisAppInterface::actionSelect() { return qgis->actionSelect(); }
+QAction *QgisAppInterface::actionIdentify() { return qgis->actionIdentify(); }
+QAction *QgisAppInterface::actionMeasure() { return qgis->actionMeasure(); }
+QAction *QgisAppInterface::actionMeasureArea() { return qgis->actionMeasureArea(); }
+QAction *QgisAppInterface::actionViewSeparator1() { return qgis->actionViewSeparator1(); }
+QAction *QgisAppInterface::actionZoomFullExtent() { return qgis->actionZoomFullExtent(); }
+QAction *QgisAppInterface::actionZoomToLayer() { return qgis->actionZoomToLayer(); }
+QAction *QgisAppInterface::actionZoomToSelected() { return qgis->actionZoomToSelected(); }
+QAction *QgisAppInterface::actionZoomLast() { return qgis->actionZoomLast(); }
+QAction *QgisAppInterface::actionZoomActualSize() { return qgis->actionZoomActualSize(); }
+QAction *QgisAppInterface::actionViewSeparator2() { return qgis->actionViewSeparator2(); }
+QAction *QgisAppInterface::actionMapTips() { return qgis->actionMapTips(); }
+QAction *QgisAppInterface::actionNewBookmark() { return qgis->actionNewBookmark(); }
+QAction *QgisAppInterface::actionShowBookmarks() { return qgis->actionShowBookmarks(); }
+QAction *QgisAppInterface::actionDraw() { return qgis->actionDraw(); }
+QAction *QgisAppInterface::actionViewSeparator3() { return qgis->actionViewSeparator3(); }
+
+//! Layer menu actions
+QAction *QgisAppInterface::actionNewVectorLayer() { return qgis->actionNewVectorLayer(); }
+QAction *QgisAppInterface::actionAddOgrLayer() { return qgis->actionAddOgrLayer(); }
+QAction *QgisAppInterface::actionAddRasterLayer() { return qgis->actionAddRasterLayer(); }
+QAction *QgisAppInterface::actionAddPgLayer() { return qgis->actionAddPgLayer(); }
+QAction *QgisAppInterface::actionAddWmsLayer() { return qgis->actionAddWmsLayer(); }
+QAction *QgisAppInterface::actionLayerSeparator1() { return qgis->actionLayerSeparator1(); }
+QAction *QgisAppInterface::actionOpenTable() { return qgis->actionOpenTable(); }
+QAction *QgisAppInterface::actionToggleEditing() { return qgis->actionToggleEditing(); }
+QAction *QgisAppInterface::actionLayerSaveAs() { return qgis->actionLayerSaveAs(); }
+QAction *QgisAppInterface::actionLayerSelectionSaveAs() { return qgis->actionLayerSelectionSaveAs(); }
+QAction *QgisAppInterface::actionRemoveLayer() { return qgis->actionRemoveLayer(); }
+QAction *QgisAppInterface::actionLayerProperties() { return qgis->actionLayerProperties(); }
+QAction *QgisAppInterface::actionLayerSeparator2() { return qgis->actionLayerSeparator2(); }
+QAction *QgisAppInterface::actionAddToOverview() { return qgis->actionAddToOverview(); }
+QAction *QgisAppInterface::actionAddAllToOverview() { return qgis->actionAddAllToOverview(); }
+QAction *QgisAppInterface::actionRemoveAllFromOverview() { return qgis->actionRemoveAllFromOverview(); }
+QAction *QgisAppInterface::actionLayerSeparator3() { return qgis->actionLayerSeparator3(); }
+QAction *QgisAppInterface::actionHideAllLayers() { return qgis->actionHideAllLayers(); }
+QAction *QgisAppInterface::actionShowAllLayers() { return qgis->actionShowAllLayers(); }
+
+//! Plugin menu actions
+QAction *QgisAppInterface::actionManagePlugins() { return qgis->actionManagePlugins(); }
+QAction *QgisAppInterface::actionPluginSeparator1() { return qgis->actionPluginSeparator1(); }
+QAction *QgisAppInterface::actionPluginListSeparator() { return qgis->actionPluginListSeparator(); }
+QAction *QgisAppInterface::actionPluginSeparator2() { return qgis->actionPluginSeparator2(); }
+QAction *QgisAppInterface::actionPluginPythonSeparator() { return qgis->actionPluginPythonSeparator(); }
+QAction *QgisAppInterface::actionShowPythonDialog() { return qgis->actionShowPythonDialog(); }
+
+//! Settings menu actions
+QAction *QgisAppInterface::actionToggleFullScreen() { return qgis->actionToggleFullScreen(); }
+QAction *QgisAppInterface::actionSettingsSeparator1() { return qgis->actionSettingsSeparator1(); }
+QAction *QgisAppInterface::actionOptions() { return qgis->actionOptions(); }
+QAction *QgisAppInterface::actionCustomProjection() { return qgis->actionCustomProjection(); }
+
+//! Help menu actions
+QAction *QgisAppInterface::actionHelpContents() { return qgis->actionHelpContents(); }
+QAction *QgisAppInterface::actionHelpSeparator1() { return qgis->actionHelpSeparator1(); }
+QAction *QgisAppInterface::actionQgisHomePage() { return qgis->actionQgisHomePage(); }
+QAction *QgisAppInterface::actionCheckQgisVersion() { return qgis->actionCheckQgisVersion(); }
+QAction *QgisAppInterface::actionHelpSeparator2() { return qgis->actionHelpSeparator2(); }
+QAction *QgisAppInterface::actionAbout() { return qgis->actionAbout(); }

Modified: trunk/qgis/src/app/qgisappinterface.h
===================================================================
--- trunk/qgis/src/app/qgisappinterface.h	2008-09-05 05:43:33 UTC (rev 9257)
+++ trunk/qgis/src/app/qgisappinterface.h	2008-09-05 05:46:56 UTC (rev 9258)
@@ -72,10 +72,6 @@
     void removeToolBarIcon( QAction *qAction );
     //! Add toolbar with specified name
     QToolBar* addToolBar( QString name );
-    /** Get the file toolbar - intended for use with plugins which
-     *   add a new file type handler.
-     */
-    QToolBar * fileToolBar();
 
     /** Open a url in the users browser. By default the QGIS doc directory is used
      * as the base for the URL. To open a URL that is not relative to the installed
@@ -106,6 +102,133 @@
 
     virtual void refreshLegend( QgsMapLayer *l );
 
+    /** Add window to Window menu. The action title is the window title
+     * and the action should raise, unminimize and activate the window. */
+    virtual void addWindow( QAction *action );
+    /** Remove window from Window menu. Calling this is necessary only for
+     * windows which are hidden rather than deleted when closed. */
+    virtual void removeWindow( QAction *action );
+
+    /** Accessors for inserting items into menus and toolbars.
+     * An item can be inserted before any existing action.
+     */
+
+    //! Menus
+    virtual QMenu *fileMenu();
+    virtual QMenu *editMenu();
+    virtual QMenu *viewMenu();
+    virtual QMenu *layerMenu();
+    virtual QMenu *settingsMenu();
+    virtual QMenu *pluginMenu();
+    virtual QMenu *firstRightStandardMenu();
+    virtual QMenu *windowMenu();
+    virtual QMenu *helpMenu();
+
+    //! ToolBars
+    virtual QToolBar *fileToolBar();
+    virtual QToolBar *layerToolBar();
+    virtual QToolBar *mapNavToolToolBar();
+    virtual QToolBar *digitizeToolBar();
+    virtual QToolBar *attributesToolBar();
+    virtual QToolBar *pluginToolBar();
+    virtual QToolBar *helpToolBar();
+
+    //! File menu actions
+    virtual QAction *actionNewProject();
+    virtual QAction *actionOpenProject();
+    virtual QAction *actionFileSeparator1();
+    virtual QAction *actionSaveProject();
+    virtual QAction *actionSaveProjectAs();
+    virtual QAction *actionSaveMapAsImage();
+    virtual QAction *actionFileSeparator2();
+    virtual QAction *actionProjectProperties();
+    virtual QAction *actionFileSeparator3();
+    virtual QAction *actionPrintComposer();
+    virtual QAction *actionFileSeparator4();
+    virtual QAction *actionExit();
+
+    //! Edit menu actions
+    virtual QAction *actionCutFeatures();
+    virtual QAction *actionCopyFeatures();
+    virtual QAction *actionPasteFeatures();
+    virtual QAction *actionEditSeparator1();
+    virtual QAction *actionCapturePoint();
+    virtual QAction *actionCaptureLine();
+    virtual QAction *actionCapturePologon();
+    virtual QAction *actionDeleteSelected();
+    virtual QAction *actionMoveFeature();
+    virtual QAction *actionSplitFeatures();
+    virtual QAction *actionAddVertex();
+    virtual QAction *actionDelerteVertex();
+    virtual QAction *actioMoveVertex();
+    virtual QAction *actionAddRing();
+    virtual QAction *actionAddIsland();
+    virtual QAction *actionEditSeparator2();
+
+    //! View menu actions
+    virtual QAction *actionPan();
+    virtual QAction *actionZoomIn();
+    virtual QAction *actionZoomOut();
+    virtual QAction *actionSelect();
+    virtual QAction *actionIdentify();
+    virtual QAction *actionMeasure();
+    virtual QAction *actionMeasureArea();
+    virtual QAction *actionViewSeparator1();
+    virtual QAction *actionZoomFullExtent();
+    virtual QAction *actionZoomToLayer();
+    virtual QAction *actionZoomToSelected();
+    virtual QAction *actionZoomLast();
+    virtual QAction *actionZoomActualSize();
+    virtual QAction *actionViewSeparator2();
+    virtual QAction *actionMapTips();
+    virtual QAction *actionNewBookmark();
+    virtual QAction *actionShowBookmarks();
+    virtual QAction *actionDraw();
+    virtual QAction *actionViewSeparator3();
+
+    //! Layer menu actions
+    virtual QAction *actionNewVectorLayer();
+    virtual QAction *actionAddOgrLayer();
+    virtual QAction *actionAddRasterLayer();
+    virtual QAction *actionAddPgLayer();
+    virtual QAction *actionAddWmsLayer();
+    virtual QAction *actionLayerSeparator1();
+    virtual QAction *actionOpenTable();
+    virtual QAction *actionToggleEditing();
+    virtual QAction *actionLayerSaveAs();
+    virtual QAction *actionLayerSelectionSaveAs();
+    virtual QAction *actionRemoveLayer();
+    virtual QAction *actionLayerProperties();
+    virtual QAction *actionLayerSeparator2();
+    virtual QAction *actionAddToOverview();
+    virtual QAction *actionAddAllToOverview();
+    virtual QAction *actionRemoveAllFromOverview();
+    virtual QAction *actionLayerSeparator3();
+    virtual QAction *actionHideAllLayers();
+    virtual QAction *actionShowAllLayers();
+
+    //! Plugin menu actions
+    virtual QAction *actionManagePlugins();
+    virtual QAction *actionPluginSeparator1();
+    virtual QAction *actionPluginListSeparator();
+    virtual QAction *actionPluginSeparator2();
+    virtual QAction *actionPluginPythonSeparator();
+    virtual QAction *actionShowPythonDialog();
+
+    //! Settings menu actions
+    virtual QAction *actionToggleFullScreen();
+    virtual QAction *actionSettingsSeparator1();
+    virtual QAction *actionOptions();
+    virtual QAction *actionCustomProjection();
+
+    //! Help menu actions
+    virtual QAction *actionHelpContents();
+    virtual QAction *actionHelpSeparator1();
+    virtual QAction *actionQgisHomePage();
+    virtual QAction *actionCheckQgisVersion();
+    virtual QAction *actionHelpSeparator2();
+    virtual QAction *actionAbout();
+
   private:
 
     /// QgisInterface aren't copied

Modified: trunk/qgis/src/gui/qgisinterface.h
===================================================================
--- trunk/qgis/src/gui/qgisinterface.h	2008-09-05 05:43:33 UTC (rev 9257)
+++ trunk/qgis/src/gui/qgisinterface.h	2008-09-05 05:46:56 UTC (rev 9258)
@@ -90,10 +90,6 @@
     virtual void removeToolBarIcon( QAction *qAction ) = 0;
     //! Add toolbar with specified name
     virtual QToolBar * addToolBar( QString name ) = 0;
-    /** Get the file toolbar - intended for use with plugins which
-    *   add a new file type handler.
-    */
-    virtual QToolBar * fileToolBar() = 0;
     // TODO: is this deprecated in favour of QgsContextHelp?
     /** Open a url in the users browser. By default the QGIS doc directory is used
      * as the base for the URL. To open a URL that is not relative to the installed
@@ -121,6 +117,133 @@
     /** refresh the legend of a layer */
     virtual void refreshLegend( QgsMapLayer *l ) = 0;
 
+    /** Add window to Window menu. The action title is the window title
+     * and the action should raise, unminimize and activate the window. */
+    virtual void addWindow( QAction *action ) = 0;
+    /** Remove window from Window menu. Calling this is necessary only for
+     * windows which are hidden rather than deleted when closed. */
+    virtual void removeWindow( QAction *action ) = 0;
+
+    /** Accessors for inserting items into menus and toolbars.
+     * An item can be inserted before any existing action.
+     */
+
+    //! Menus
+    virtual QMenu *fileMenu() = 0;
+    virtual QMenu *editMenu() = 0;
+    virtual QMenu *viewMenu() = 0;
+    virtual QMenu *layerMenu() = 0;
+    virtual QMenu *settingsMenu() = 0;
+    virtual QMenu *pluginMenu() = 0;
+    virtual QMenu *firstRightStandardMenu() = 0;
+    virtual QMenu *windowMenu() = 0;
+    virtual QMenu *helpMenu() = 0;
+
+    //! ToolBars
+    virtual QToolBar *fileToolBar() = 0;
+    virtual QToolBar *layerToolBar() = 0;
+    virtual QToolBar *mapNavToolToolBar() = 0;
+    virtual QToolBar *digitizeToolBar() = 0;
+    virtual QToolBar *attributesToolBar() = 0;
+    virtual QToolBar *pluginToolBar() = 0;
+    virtual QToolBar *helpToolBar() = 0;
+
+    //! File menu actions
+    virtual QAction *actionNewProject() = 0;
+    virtual QAction *actionOpenProject() = 0;
+    virtual QAction *actionFileSeparator1() = 0;
+    virtual QAction *actionSaveProject() = 0;
+    virtual QAction *actionSaveProjectAs() = 0;
+    virtual QAction *actionSaveMapAsImage() = 0;
+    virtual QAction *actionFileSeparator2() = 0;
+    virtual QAction *actionProjectProperties() = 0;
+    virtual QAction *actionFileSeparator3() = 0;
+    virtual QAction *actionPrintComposer() = 0;
+    virtual QAction *actionFileSeparator4() = 0;
+    virtual QAction *actionExit() = 0;
+
+    //! Edit menu actions
+    virtual QAction *actionCutFeatures() = 0;
+    virtual QAction *actionCopyFeatures() = 0;
+    virtual QAction *actionPasteFeatures() = 0;
+    virtual QAction *actionEditSeparator1() = 0;
+    virtual QAction *actionCapturePoint() = 0;
+    virtual QAction *actionCaptureLine() = 0;
+    virtual QAction *actionCapturePologon() = 0;
+    virtual QAction *actionDeleteSelected() = 0;
+    virtual QAction *actionMoveFeature() = 0;
+    virtual QAction *actionSplitFeatures() = 0;
+    virtual QAction *actionAddVertex() = 0;
+    virtual QAction *actionDelerteVertex() = 0;
+    virtual QAction *actioMoveVertex() = 0;
+    virtual QAction *actionAddRing() = 0;
+    virtual QAction *actionAddIsland() = 0;
+    virtual QAction *actionEditSeparator2() = 0;
+
+    //! View menu actions
+    virtual QAction *actionPan() = 0;
+    virtual QAction *actionZoomIn() = 0;
+    virtual QAction *actionZoomOut() = 0;
+    virtual QAction *actionSelect() = 0;
+    virtual QAction *actionIdentify() = 0;
+    virtual QAction *actionMeasure() = 0;
+    virtual QAction *actionMeasureArea() = 0;
+    virtual QAction *actionViewSeparator1() = 0;
+    virtual QAction *actionZoomFullExtent() = 0;
+    virtual QAction *actionZoomToLayer() = 0;
+    virtual QAction *actionZoomToSelected() = 0;
+    virtual QAction *actionZoomLast() = 0;
+    virtual QAction *actionZoomActualSize() = 0;
+    virtual QAction *actionViewSeparator2() = 0;
+    virtual QAction *actionMapTips() = 0;
+    virtual QAction *actionNewBookmark() = 0;
+    virtual QAction *actionShowBookmarks() = 0;
+    virtual QAction *actionDraw() = 0;
+    virtual QAction *actionViewSeparator3() = 0;
+
+    //! Layer menu actions
+    virtual QAction *actionNewVectorLayer() = 0;
+    virtual QAction *actionAddOgrLayer() = 0;
+    virtual QAction *actionAddRasterLayer() = 0;
+    virtual QAction *actionAddPgLayer() = 0;
+    virtual QAction *actionAddWmsLayer() = 0;
+    virtual QAction *actionLayerSeparator1() = 0;
+    virtual QAction *actionOpenTable() = 0;
+    virtual QAction *actionToggleEditing() = 0;
+    virtual QAction *actionLayerSaveAs() = 0;
+    virtual QAction *actionLayerSelectionSaveAs() = 0;
+    virtual QAction *actionRemoveLayer() = 0;
+    virtual QAction *actionLayerProperties() = 0;
+    virtual QAction *actionLayerSeparator2() = 0;
+    virtual QAction *actionAddToOverview() = 0;
+    virtual QAction *actionAddAllToOverview() = 0;
+    virtual QAction *actionRemoveAllFromOverview() = 0;
+    virtual QAction *actionLayerSeparator3() = 0;
+    virtual QAction *actionHideAllLayers() = 0;
+    virtual QAction *actionShowAllLayers() = 0;
+
+    //! Plugin menu actions
+    virtual QAction *actionManagePlugins() = 0;
+    virtual QAction *actionPluginSeparator1() = 0;
+    virtual QAction *actionPluginListSeparator() = 0;
+    virtual QAction *actionPluginSeparator2() = 0;
+    virtual QAction *actionPluginPythonSeparator() = 0;
+    virtual QAction *actionShowPythonDialog() = 0;
+
+    //! Settings menu actions
+    virtual QAction *actionToggleFullScreen() = 0;
+    virtual QAction *actionSettingsSeparator1() = 0;
+    virtual QAction *actionOptions() = 0;
+    virtual QAction *actionCustomProjection() = 0;
+
+    //! Help menu actions
+    virtual QAction *actionHelpContents() = 0;
+    virtual QAction *actionHelpSeparator1() = 0;
+    virtual QAction *actionQgisHomePage() = 0;
+    virtual QAction *actionCheckQgisVersion() = 0;
+    virtual QAction *actionHelpSeparator2() = 0;
+    virtual QAction *actionAbout() = 0;
+
   signals:
     /** Emited whenever current (selected) layer changes.
      *  The pointer to layer can be null if no layer is selected



More information about the QGIS-commit mailing list