Skip to content
Permalink
Browse files

Replaced addAddLayer with insertAddLayerAction

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15463 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux
timlinux committed Mar 13, 2011
1 parent dc7538b commit 68ffc9cef3de9d1b4850ed4a75e09d5c20bcc17a
@@ -98,7 +98,7 @@ class QgisInterface : QObject
/** Add "add layer" action to the layer menu
* @note added in 1.7
*/
virtual void addAddLayer( QAction* action )=0;
virtual void insertAddLayerAction( QAction* action )=0;

/** Remove "add layer" action from the layer menu
* @note added in 1.7
@@ -5299,7 +5299,7 @@ QMenu* QgisApp::getDatabaseMenu( QString menuName )
return menu;
}

void QgisApp::addAddLayer( QAction *action )
void QgisApp::insertAddLayerAction( QAction *action )
{
mLayerMenu->insertAction( mActionAddLayerSeparator, action );
}
@@ -520,7 +520,7 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
//! Remove the action to the submenu with the given name under the Database menu
void removePluginDatabaseMenu( QString name, QAction* action );
//! Add "add layer" action to layer menu
void addAddLayer( QAction* action );
void insertAddLayerAction( QAction* action );
//! Remove "add layer" action to layer menu
void removeAddLayer( QAction* action );
//! Add an icon to the plugin toolbar
@@ -140,9 +140,9 @@ void QgisAppInterface::addPluginToMenu( QString name, QAction* action )
qgis->addPluginToMenu( name, action );
}

void QgisAppInterface::addAddLayer( QAction *action )
void QgisAppInterface::insertAddLayerAction( QAction *action )
{
qgis->addAddLayer( action );
qgis->insertAddLayerAction( action );
}

void QgisAppInterface::removeAddLayer( QAction *action )
@@ -118,7 +118,7 @@ class QgisAppInterface : public QgisInterface
void removePluginDatabaseMenu( QString name, QAction* action );

/** Add "add layer" action to the layer menu */
void addAddLayer( QAction *action );
void insertAddLayerAction( QAction *action );
/** remove "add layer" action from the layer menu */
void removeAddLayer( QAction *action );

@@ -139,7 +139,7 @@ class GUI_EXPORT QgisInterface : public QObject
/** Add "add layer" action to layer menu
* @note added in 1.7
*/
virtual void addAddLayer( QAction *action ) = 0;
virtual void insertAddLayerAction( QAction *action ) = 0;

/** Remove "add layer" action from layer menu
* @note added in 1.7
@@ -109,7 +109,7 @@ void QgsDelimitedTextPlugin::initGui()
connect( myQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
// Add the icon to the toolbar
qGisInterface->addToolBarIcon( myQActionPointer );
qGisInterface->addAddLayer( myQActionPointer );
qGisInterface->insertAddLayerAction( myQActionPointer );
// this is called when the icon theme is changed
connect( qGisInterface, SIGNAL( currentThemeChanged( QString ) ), this, SLOT( setCurrentTheme( QString ) ) );

@@ -61,7 +61,7 @@ void QgsOraclePlugin::initGui()
connect( mQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
// Add the icon to the toolbar
mQGisIface->addToolBarIcon( mQActionPointer );
mQGisIface->addAddLayer( mQActionPointer );
mQGisIface->insertAddLayerAction( mQActionPointer );

}
//method defined in interface
@@ -86,7 +86,7 @@ void SqlAnywhere::initGui()
// mQGisIface->addToolBarIcon( mActionAddSqlAnywhereLayer );

// Also add to Layer menu
mQGisIface->addAddLayer( mActionAddSqlAnywhereLayer );
mQGisIface->insertAddLayerAction( mActionAddSqlAnywhereLayer );
}

//method defined in interface
@@ -54,7 +54,7 @@ void QgsWFSPlugin::initGui()
setCurrentTheme( "" );
QObject::connect( mWfsDialogAction, SIGNAL( triggered() ), this, SLOT( showSourceDialog() ) );
mIface->layerToolBar()->addAction( mWfsDialogAction );
mIface->addAddLayer( mWfsDialogAction );
mIface->insertAddLayerAction( mWfsDialogAction );
// this is called when the icon theme is changed
connect( mIface, SIGNAL( currentThemeChanged( QString ) ), this, SLOT( setCurrentTheme( QString ) ) );
}

0 comments on commit 68ffc9c

Please sign in to comment.
You can’t perform that action at this time.