mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
Plugin menus now install under the top-level Plugin menu in the menu bar.
Menus are not sorted but appear in the order they are loaded. This will be refined in a later version. git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@1253 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
115eb6d3f2
commit
6d59b6e91c
@ -282,6 +282,9 @@ QgisApp::QgisApp(QWidget * parent, const char *name, WFlags fl):QgisAppBase(pare
|
||||
// add the whats this toolbar button
|
||||
//TODO Fix this ToolBar pointer to be named consistently
|
||||
QWhatsThis::whatsThisButton(helpToolbar);
|
||||
// add the empty plugin menu
|
||||
pluginMenu = new QPopupMenu(this);
|
||||
menuBar()->insertItem("&Plugins", pluginMenu, -1, menuBar()->count() - 1);
|
||||
// create the layer popup menu
|
||||
mapCursor = 0;
|
||||
// create the interfce
|
||||
@ -2299,7 +2302,7 @@ void QgisApp::socketConnectionClosed()
|
||||
{
|
||||
// show more info
|
||||
QgsMessageViewer *mv = new QgsMessageViewer(this);
|
||||
mv->setCaption(tr("QGIS - Changes in CVS"));
|
||||
mv->setCaption(tr("QGIS - Changes in CVS Since Last Release"));
|
||||
mv->setMessage(parts[2]);
|
||||
mv->exec();
|
||||
}
|
||||
@ -2573,3 +2576,8 @@ void QgisApp::populateMenuMaps()
|
||||
mMenuMapById[menuId] = menubar->text(menuId);
|
||||
}while(menuId != -1);
|
||||
}
|
||||
int QgisApp::addPluginMenu(QString menuText, QPopupMenu *menu)
|
||||
{
|
||||
pluginMenu->insertItem(menuText, menu);
|
||||
}
|
||||
|
||||
|
@ -198,6 +198,8 @@ private:
|
||||
void actionPluginManager_activated();
|
||||
//! plugin loader
|
||||
void loadPlugin(QString name, QString description, QString fullPath);
|
||||
//! Add a plugin menu to the main Plugins menu
|
||||
int addPluginMenu(QString menuText, QPopupMenu *menu);
|
||||
//! Save window state
|
||||
void saveWindowState();
|
||||
//! Restore the window and toolbar state
|
||||
@ -246,6 +248,8 @@ private:
|
||||
private:
|
||||
//! Popup menu
|
||||
QPopupMenu * popMenu;
|
||||
//! Top level plugin menu
|
||||
QPopupMenu *pluginMenu;
|
||||
//! Legend list view control
|
||||
QgsLegendView *legendView;
|
||||
//! Map canvas
|
||||
|
@ -66,8 +66,8 @@ QString QgisIface::activeLayerSource()
|
||||
{
|
||||
return qgis->activeLayerSource();
|
||||
}
|
||||
|
||||
int QgisIface::addMenu(QString menuText, QPopupMenu * menu)
|
||||
/*
|
||||
int QgisIface::oldAddMenu(QString menuText, QPopupMenu * menu)
|
||||
{
|
||||
QMenuBar *mainMenu = qgis->menuBar();
|
||||
// get the index of the help menu
|
||||
@ -76,7 +76,13 @@ int QgisIface::addMenu(QString menuText, QPopupMenu * menu)
|
||||
#endif
|
||||
return mainMenu->insertItem(menuText, menu, -1, mainMenu->count() - 1);
|
||||
}
|
||||
*/
|
||||
|
||||
int QgisIface::addMenu(QString menuText, QPopupMenu * menu)
|
||||
{
|
||||
// add the menu to the master Plugins menu
|
||||
return qgis->addPluginMenu(menuText, menu);
|
||||
}
|
||||
void QgisIface::openURL(QString url, bool useQgisDocDirectory)
|
||||
{
|
||||
qgis->openURL(url, useQgisDocDirectory);
|
||||
|
Loading…
x
Reference in New Issue
Block a user