partial fix for #1743 : connection to proper QAction's triggered() signal in all core plugins

git-svn-id: http://svn.osgeo.org/qgis/trunk@10967 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
borysiasty 2009-06-23 12:03:18 +00:00
parent 94f444bcf7
commit 638608415b
9 changed files with 10 additions and 10 deletions

View File

@ -59,7 +59,7 @@ class MapServerExport:
"MapServer Export", self.iface.mainWindow())
#self.action.setWhatsThis("Configuration for Zoom To Point plugin")
# connect the action to the run method
QObject.connect(self.action, SIGNAL("activated()"), self.run)
QObject.connect(self.action, SIGNAL("triggered()"), self.run)
QObject.connect(self.iface, SIGNAL("currentThemeChanged ( QString )"), self.setCurrentTheme)
# Add toolbar button and menu item

View File

@ -69,7 +69,7 @@ class InstallerPlugin():
else: # old plugin API
nextAction = self.mainWindow().menuBar().actions()[4].menu().actions()[1]
self.mainWindow().menuBar().actions()[4].menu().insertAction(nextAction,self.action)
QObject.connect(self.action, SIGNAL("activated()"), self.run)
QObject.connect(self.action, SIGNAL("triggered()"), self.run)
QObject.connect(self.iface, SIGNAL("currentThemeChanged ( QString )"), self.setCurrentTheme)
self.statusLabel = None

View File

@ -80,7 +80,7 @@ void QgsCopyrightLabelPlugin::initGui()
setCurrentTheme( "" );
myQActionPointer->setWhatsThis( tr( "Creates a copyright label that is displayed on the map canvas." ) );
// Connect the action to the run
connect( myQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
connect( myQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
// This calls the renderer everytime the cnavas has drawn itself
connect( qGisInterface->mapCanvas(), SIGNAL( renderComplete( QPainter * ) ), this, SLOT( renderLabel( QPainter * ) ) );
//this resets this plugin up if a project is loaded

View File

@ -104,7 +104,7 @@ void QgsDelimitedTextPlugin::initGui()
"The file must have a header row containing the field names. "
"X and Y fields are required and must contain coordinates in decimal units." ) );
// Connect the action to the run
connect( myQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
connect( myQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
// Add the icon to the toolbar
qGisInterface->addToolBarIcon( myQActionPointer );
qGisInterface->addPluginToMenu( tr( "&Delimited text" ), myQActionPointer );

View File

@ -77,7 +77,7 @@ void dxf2shpConverter::initGui()
mQActionPointer->setWhatsThis( tr( "Converts DXF files in Shapefile format" ) );
// 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 );

View File

@ -93,8 +93,8 @@ void QgsGPSPlugin::initGui()
mQActionPointer->setWhatsThis( tr( "Creates a new GPX layer and displays it on the map canvas" ) );
mCreateGPXAction->setWhatsThis( tr( "Creates a new GPX layer and displays it on the map canvas" ) );
connect( mQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
connect( mCreateGPXAction, SIGNAL( activated() ), this, SLOT( createGPX() ) );
connect( mQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
connect( mCreateGPXAction, SIGNAL( triggered() ), this, SLOT( createGPX() ) );
mQGisInterface->fileToolBar()->addAction( mQActionPointer );
mQGisInterface->addPluginToMenu( tr( "&Gps" ), mQActionPointer );

View File

@ -96,7 +96,7 @@ void QgsNorthArrowPlugin::initGui()
setCurrentTheme( "" );
myQActionPointer->setWhatsThis( tr( "Creates a north arrow that is displayed on the map canvas" ) );
// Connect the action to the run
connect( myQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
connect( myQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
//render the arrow each time the map is rendered
connect( qGisInterface->mapCanvas(), SIGNAL( renderComplete( QPainter * ) ), this, SLOT( renderNorthArrow( QPainter * ) ) );
//this resets this plugin up if a project is loaded

View File

@ -78,7 +78,7 @@ void QuickPrintPlugin::initGui()
// Set the what's this text
mQActionPointer->setWhatsThis( tr( "Provides a way to quickly produce a map with minimal user input." ) );
// 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->addPluginToMenu( tr( "&Quick Print" ), mQActionPointer );

View File

@ -103,7 +103,7 @@ void QgsScaleBarPlugin::initGui()
setCurrentTheme( "" );
myQActionPointer->setWhatsThis( tr( "Creates a scale bar that is displayed on the map canvas" ) );
// Connect the action to the run
connect( myQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
connect( myQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
//render the scale bar each time the map is rendered
connect( qGisInterface->mapCanvas(), SIGNAL( renderComplete( QPainter * ) ), this, SLOT( renderScaleBar( QPainter * ) ) );
//this resets this plugin up if a project is loaded