Skip to content
Permalink
Browse files
Replace deprecated activated() calls to qaction with triggered() - re…
…moves COMPAT warning on console

git-svn-id: http://svn.osgeo.org/qgis/trunk@8053 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Jan 26, 2008
1 parent 080c5fc commit 592b3a2b4347fa4cb0de18660ab7dd758207f687
@@ -19,3 +19,4 @@ ENDIF (GRASS_FOUND)
INSTALL(FILES qgisplugin.h qgsrendererplugin.h DESTINATION ${QGIS_INCLUDE_DIR})

SUBDIRS (quick_print)

@@ -79,15 +79,15 @@ void QgsPgGeoprocessing::initGui()
bufferAction->setWhatsThis(tr("Create a buffer for a PostgreSQL layer. " +
tr("A new layer is created in the database with the buffered features.")));
// Connect the action to the buffer slot
connect(bufferAction, SIGNAL(activated()), this, SLOT(buffer()));
connect(bufferAction, SIGNAL(triggered()), this, SLOT(buffer()));

// Add the icon to the toolbar
qI->addToolBarIcon(bufferAction);
qI->addPluginMenu(tr("&Geoprocessing"), bufferAction);

}

// Slot called when the buffer menu item is activated
// Slot called when the buffer menu item is triggered
void QgsPgGeoprocessing::buffer()
{
// need to get a pointer to the current layer
@@ -91,7 +91,7 @@ void QgsGeorefPlugin::initGui()
mQActionPointer = new QAction(QIcon(":/icon.png"), tr("&Georeferencer"), this);

// Connect the action to the run
connect(mQActionPointer, SIGNAL(activated()), this, SLOT(run()));
connect(mQActionPointer, SIGNAL(triggered()), this, SLOT(run()));

// Add to the toolbar & menu
mQGisIface->addToolBarIcon(mQActionPointer);
@@ -104,7 +104,7 @@ void QgsGeorefPlugin::help()
//implement me!
}

// Slot called when the buffer menu item is activated
// Slot called when the buffer menu item is triggered
void QgsGeorefPlugin::run()
{
QgsGeorefPluginGui *myPluginGui=new QgsGeorefPluginGui(mQGisIface, QgsGeorefPluginGui::findMainWindow());
@@ -184,16 +184,16 @@ void QgsGrassPlugin::initGui()
mEditAction->setWhatsThis(tr("Edit the currently selected GRASS vector layer."));

// Connect the action
connect(mAddVectorAction, SIGNAL(activated()), this, SLOT(addVector()));
connect(mAddRasterAction, SIGNAL(activated()), this, SLOT(addRaster()));
connect(mOpenToolsAction, SIGNAL(activated()), this, SLOT(openTools()));
connect(mEditAction, SIGNAL(activated()), this, SLOT(edit()));
connect(mNewVectorAction, SIGNAL(activated()), this, SLOT(newVector()));
connect(mAddVectorAction, SIGNAL(triggered()), this, SLOT(addVector()));
connect(mAddRasterAction, SIGNAL(triggered()), this, SLOT(addRaster()));
connect(mOpenToolsAction, SIGNAL(triggered()), this, SLOT(openTools()));
connect(mEditAction, SIGNAL(triggered()), this, SLOT(edit()));
connect(mNewVectorAction, SIGNAL(triggered()), this, SLOT(newVector()));
connect(mRegionAction, SIGNAL(toggled(bool)), this, SLOT(switchRegion(bool)));
connect(mEditRegionAction, SIGNAL(activated()), this, SLOT(changeRegion()));
connect(mOpenMapsetAction, SIGNAL(activated()), this, SLOT(openMapset()));
connect(mNewMapsetAction, SIGNAL(activated()), this, SLOT(newMapset()));
connect(mCloseMapsetAction, SIGNAL(activated()), this, SLOT(closeMapset()));
connect(mEditRegionAction, SIGNAL(triggered()), this, SLOT(changeRegion()));
connect(mOpenMapsetAction, SIGNAL(triggered()), this, SLOT(openMapset()));
connect(mNewMapsetAction, SIGNAL(triggered()), this, SLOT(newMapset()));
connect(mCloseMapsetAction, SIGNAL(triggered()), this, SLOT(closeMapset()));

// Add actions to a GRASS plugin menu
qGisInterface->addPluginMenu(tr("&GRASS"), mOpenMapsetAction);
@@ -293,7 +293,7 @@ void QgsGrassPlugin::saveMapset()
QgsGrass::getDefaultMapset() );
}

// Slot called when the "Add GRASS vector layer" menu item is activated
// Slot called when the "Add GRASS vector layer" menu item is triggered
void QgsGrassPlugin::addVector()
{
#ifdef QGISDEBUG
@@ -375,7 +375,7 @@ void QgsGrassPlugin::addVector()
}
}

// Slot called when the "Add GRASS raster layer" menu item is activated
// Slot called when the "Add GRASS raster layer" menu item is triggered
void QgsGrassPlugin::addRaster()
{
#ifdef QGISDEBUG
@@ -39,7 +39,7 @@ void MapLayerTest::initGui(){
menuId = menu->insertItem( "&PluginMenu", mapLayerPluginMenu );
//QAction *zoomPreviousAction = new QAction( "Zoom Previous",QIconSet(icon_matrix), "&Zoom Previous", CTRL+Key_S, qgisMainWindow, "zoomFull" );

// connect( zoomPreviousAction, SIGNAL( activated() ) , this, SLOT( zoomPrevious() ) );
// connect( zoomPreviousAction, SIGNAL( triggered() ) , this, SLOT( zoomPrevious() ) );

}
void MapLayerTest::unload(){
@@ -74,7 +74,7 @@ void [pluginname]::initGui()
// Set the what's this text
mQActionPointer->setWhatsThis(tr("Replace this with a short description of the what the plugin does"));
// Connect the action to the run
connect(mQActionPointer, SIGNAL(activated()), this, SLOT(run()));
connect(mQActionPointer, SIGNAL(triggered()), this, SLOT(run()));
// Add the icon to the toolbar
mQGisIface->addToolBarIcon(mQActionPointer);
mQGisIface->addPluginMenu(tr("&[menuname]"), mQActionPointer);
@@ -86,7 +86,7 @@ void [pluginname]::help()
//implement me!
}

// Slot called when the menu item is activated
// Slot called when the menu item is triggered
// If you created more menu items / toolbar buttons in initiGui, you should
// create a separate handler for each action - this single run() method will
// not be enough
@@ -69,14 +69,14 @@ void QgsSpitPlugin::initGui()
spitAction->setWhatsThis(tr("Import shapefiles into a PostGIS-enabled PostgreSQL database. "
"The schema and field names can be customized on import"));
// Connect the action to the spit slot
connect(spitAction, SIGNAL(activated()), this, SLOT(spit()));
connect(spitAction, SIGNAL(triggered()), this, SLOT(spit()));
// Add the icon to the toolbar and to the plugin menu
qI->addToolBarIcon(spitAction);
qI->addPluginMenu(tr("&Spit"), spitAction);

}

// Slot called when the shapefile to postgres menu item is activated
// Slot called when the shapefile to postgres menu item is triggered
void QgsSpitPlugin::spit()
{
QgsSpit *spitDlg = new QgsSpit(qgisMainWindow, Qt::Window);
@@ -46,7 +46,7 @@ void QgsWFSPlugin::initGui()
if(mIface)
{
mWfsDialogAction = new QAction(QIcon(mIconAddWfsLayer), tr("&Add WFS layer"), 0);
QObject::connect(mWfsDialogAction, SIGNAL(activated()), this, SLOT(showSourceDialog()));
QObject::connect(mWfsDialogAction, SIGNAL(triggered()), this, SLOT(showSourceDialog()));
mIface->addToolBarIcon(mWfsDialogAction);
mIface->addPluginMenu(tr("&Add WFS layer"), mWfsDialogAction);
}

0 comments on commit 592b3a2

Please sign in to comment.