Skip to content

Commit

Permalink
move "Add Layer..." buttons to submenu
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Sep 6, 2014
1 parent bd3f593 commit 62a2308
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 12 deletions.
3 changes: 3 additions & 0 deletions python/gui/qgisinterface.sip
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,9 @@ class QgisInterface : QObject
/** \note added in 2.0
*/
virtual QMenu *newLayerMenu() = 0;
/** \note added in 2.5
*/
virtual QMenu *addLayerMenu() = 0;
virtual QMenu *settingsMenu() = 0;
virtual QMenu *pluginMenu() = 0;
virtual QMenu *rasterMenu() = 0;
Expand Down
2 changes: 2 additions & 0 deletions src/app/qgisapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QMenu *layerMenu() { return mLayerMenu; }
//! @note added in 2.0
QMenu *newLayerMenu() { return mNewLayerMenu; }
//! @note added in 2.5
QMenu *addLayerMenu() { return mAddLayerMenu; }
QMenu *settingsMenu() { return mSettingsMenu; }
QMenu *pluginMenu() { return mPluginMenu; }
QMenu *databaseMenu() { return mDatabaseMenu; }
Expand Down
1 change: 1 addition & 0 deletions src/app/qgisappinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ QMenu *QgisAppInterface::editMenu() { return qgis->editMenu(); }
QMenu *QgisAppInterface::viewMenu() { return qgis->viewMenu(); }
QMenu *QgisAppInterface::layerMenu() { return qgis->layerMenu(); }
QMenu *QgisAppInterface::newLayerMenu() { return qgis->newLayerMenu(); }
QMenu *QgisAppInterface::addLayerMenu() { return qgis->addLayerMenu(); }
QMenu *QgisAppInterface::settingsMenu() { return qgis->settingsMenu(); }
QMenu *QgisAppInterface::pluginMenu() { return qgis->pluginMenu(); }
QMenu *QgisAppInterface::rasterMenu() { return qgis->rasterMenu(); }
Expand Down
2 changes: 2 additions & 0 deletions src/app/qgisappinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
virtual QMenu *layerMenu();
//! @note added in 2.0
virtual QMenu *newLayerMenu();
//! @note added in 2.5
virtual QMenu *addLayerMenu();
virtual QMenu *settingsMenu();
virtual QMenu *pluginMenu();
virtual QMenu *rasterMenu();
Expand Down
3 changes: 3 additions & 0 deletions src/gui/qgisinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ class GUI_EXPORT QgisInterface : public QObject
/** \note added in 2.0
*/
virtual QMenu *newLayerMenu() = 0;
/** \note added in 2.5
*/
virtual QMenu *addLayerMenu() = 0;
virtual QMenu *settingsMenu() = 0;
virtual QMenu *pluginMenu() = 0;
virtual QMenu *rasterMenu() = 0;
Expand Down
30 changes: 18 additions & 12 deletions src/ui/qgisapp.ui
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<x>0</x>
<y>0</y>
<width>1050</width>
<height>25</height>
<height>24</height>
</rect>
</property>
<widget class="QMenu" name="mProjectMenu">
Expand Down Expand Up @@ -132,20 +132,26 @@
<addaction name="mActionNewVectorLayer"/>
<addaction name="mActionNewSpatiaLiteLayer"/>
</widget>
<widget class="QMenu" name="mAddLayerMenu">
<property name="title">
<string>Add</string>
</property>
<addaction name="mActionAddOgrLayer"/>
<addaction name="mActionAddRasterLayer"/>
<addaction name="mActionAddPgLayer"/>
<addaction name="mActionAddSpatiaLiteLayer"/>
<addaction name="mActionAddMssqlLayer"/>
<addaction name="mActionAddOracleLayer"/>
<addaction name="mActionAddWmsLayer"/>
<addaction name="mActionAddLayerSeparator"/>
<addaction name="mActionAddWcsLayer"/>
<addaction name="mActionAddWfsLayer"/>
<addaction name="mActionAddDelimitedText"/>
</widget>
<addaction name="mNewLayerMenu"/>
<addaction name="mAddLayerMenu"/>
<addaction name="mActionEmbedLayers"/>
<addaction name="mActionAddLayerDefinition"/>
<addaction name="mActionAddOgrLayer"/>
<addaction name="mActionAddRasterLayer"/>
<addaction name="mActionAddPgLayer"/>
<addaction name="mActionAddSpatiaLiteLayer"/>
<addaction name="mActionAddMssqlLayer"/>
<addaction name="mActionAddOracleLayer"/>
<addaction name="mActionAddWmsLayer"/>
<addaction name="mActionAddLayerSeparator"/>
<addaction name="mActionAddWcsLayer"/>
<addaction name="mActionAddWfsLayer"/>
<addaction name="mActionAddDelimitedText"/>
<addaction name="separator"/>
<addaction name="mActionCopyStyle"/>
<addaction name="mActionPasteStyle"/>
Expand Down

0 comments on commit 62a2308

Please sign in to comment.