mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Remove the old way that plugins used to create menu entries. This may
cause some plugins that we don't know about to fail to compile, but the change required is trivial, and can be gleaned from any of the plugins that come as part of qgis. git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4135 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
4364fd66f5
commit
f478da7137
@ -92,23 +92,7 @@ QString QgisIface::activeLayerSource()
|
||||
{
|
||||
return qgis->activeLayerSource();
|
||||
}
|
||||
/*
|
||||
int QgisIface::oldAddMenu(QString menuText, QPopupMenu * menu)
|
||||
{
|
||||
QMenuBar *mainMenu = qgis->menuBar();
|
||||
// get the index of the help menu
|
||||
#ifdef QGISDEBUG
|
||||
std::cout << "Menu item count is : " << mainMenu->count() << std::endl;
|
||||
#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);
|
||||
}
|
||||
QPopupMenu* QgisIface::getPluginMenu(QString menuName)
|
||||
{
|
||||
return qgis->getPluginMenu(menuName);
|
||||
|
@ -58,8 +58,6 @@ class QgisIface : public QgisInterface{
|
||||
QgsMapLayer *activeLayer();
|
||||
//! Get source of the active layer
|
||||
QString activeLayerSource();
|
||||
//! Add a menu to the main menu bar of the application, positioned to the left of Help
|
||||
int addMenu(QString menuText, QPopupMenu *menu);
|
||||
|
||||
QPopupMenu* getPluginMenu(QString menuName);
|
||||
|
||||
|
@ -70,8 +70,6 @@ class QgisInterface : public QWidget{
|
||||
|
||||
//! Get pointer to the active layer (layer selected in the legend)
|
||||
virtual QgsMapLayer *activeLayer()=0;
|
||||
//! add a menu item to the main menu, postioned to the left of the Help menu
|
||||
virtual int addMenu(QString menuText, QPopupMenu *menu) =0;
|
||||
//! Add an icon to the plugins toolbar
|
||||
virtual int addToolBarIcon(QAction *qAction) =0;
|
||||
//! Remove an action (icon) from the plugin toolbar
|
||||
|
Loading…
x
Reference in New Issue
Block a user