Skip to content
Permalink
Browse files

partial fix for #1743 : connection to proper QAction's triggered() si…

…gnal in all core plugins

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10967 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
borysiasty
borysiasty committed Jun 23, 2009
1 parent b406dd0 commit a273e3dc1c2109a368b6de2d69cbfdb0a3819e1e
@@ -59,7 +59,7 @@ def initGui(self):
"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
@@ -69,7 +69,7 @@ def initGui(self):
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

@@ -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
@@ -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 );
@@ -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 );
@@ -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 );
@@ -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
@@ -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 );
@@ -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

0 comments on commit a273e3d

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