Skip to content

Commit 748ff8b

Browse files
committed
missing python plugins menu/actions objectName
1 parent 5a31481 commit 748ff8b

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

python/plugins/GdalTools/GdalTools.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,100 +124,120 @@ def initGui( self ):
124124

125125
# projections menu (Warp (Reproject), Assign projection)
126126
self.projectionsMenu = QMenu( QCoreApplication.translate( "GdalTools", "Projections" ), self.iface.mainWindow() )
127+
self.projectionsMenu.setObjectName("projectionsMenu")
127128

128129
self.warp = QAction( QIcon(":/icons/warp.png"), QCoreApplication.translate( "GdalTools", "Warp (Reproject)" ), self.iface.mainWindow() )
130+
self.warp.setObjectName("warp")
129131
self.warp.setStatusTip( QCoreApplication.translate( "GdalTools", "Warp an image into a new coordinate system") )
130132
QObject.connect( self.warp, SIGNAL( "triggered()" ), self.doWarp )
131133

132134
self.projection = QAction( QIcon( ":icons/projection-add.png" ), QCoreApplication.translate( "GdalTools", "Assign projection" ), self.iface.mainWindow() )
135+
self.projection.setObjectName("projection")
133136
self.projection.setStatusTip( QCoreApplication.translate( "GdalTools", "Add projection info to the raster" ) )
134137
QObject.connect( self.projection, SIGNAL( "triggered()" ), self.doProjection )
135138

136139
self.extractProj = QAction( QIcon( ":icons/projection-export.png" ), QCoreApplication.translate( "GdalTools", "Extract projection" ), self.iface.mainWindow() )
140+
self.extractProj.setObjectName("extractProj")
137141
self.extractProj.setStatusTip( QCoreApplication.translate( "GdalTools", "Extract projection information from raster(s)" ) )
138142
QObject.connect( self.extractProj, SIGNAL( "triggered()" ), self.doExtractProj )
139143

140144
self.projectionsMenu.addActions( [ self.warp, self.projection, self.extractProj ] )
141145

142146
# conversion menu (Rasterize (Vector to raster), Polygonize (Raster to vector), Translate, RGB to PCT, PCT to RGB)
143147
self.conversionMenu = QMenu( QCoreApplication.translate( "GdalTools", "Conversion" ), self.iface.mainWindow() )
148+
self.conversionMenu.setObjectName("conversionMenu")
144149

145150
if self.GdalVersionNum >= 1300:
146151
self.rasterize = QAction( QIcon(":/icons/rasterize.png"), QCoreApplication.translate( "GdalTools", "Rasterize (Vector to raster)" ), self.iface.mainWindow() )
152+
self.rasterize.setObjectName("rasterize")
147153
self.rasterize.setStatusTip( QCoreApplication.translate( "GdalTools", "Burns vector geometries into a raster") )
148154
QObject.connect( self.rasterize, SIGNAL( "triggered()" ), self.doRasterize )
149155
self.conversionMenu.addAction( self.rasterize )
150156

151157
if self.GdalVersionNum >= 1600:
152158
self.polygonize = QAction( QIcon(":/icons/polygonize.png"), QCoreApplication.translate( "GdalTools", "Polygonize (Raster to vector)" ), self.iface.mainWindow() )
159+
self.polygonize.setObjectName("polygonize")
153160
self.polygonize.setStatusTip( QCoreApplication.translate( "GdalTools", "Produces a polygon feature layer from a raster") )
154161
QObject.connect( self.polygonize, SIGNAL( "triggered()" ), self.doPolygonize )
155162
self.conversionMenu.addAction( self.polygonize )
156163

157164
self.translate = QAction( QIcon(":/icons/translate.png"), QCoreApplication.translate( "GdalTools", "Translate (Convert format)" ), self.iface.mainWindow() )
165+
self.translate.setObjectName("translate")
158166
self.translate.setStatusTip( QCoreApplication.translate( "GdalTools", "Converts raster data between different formats") )
159167
QObject.connect( self.translate, SIGNAL( "triggered()" ), self.doTranslate )
160168

161169
self.paletted = QAction( QIcon( ":icons/24-to-8-bits.png" ), QCoreApplication.translate( "GdalTools", "RGB to PCT" ), self.iface.mainWindow() )
170+
self.paletted.setObjectName("paletted")
162171
self.paletted.setStatusTip( QCoreApplication.translate( "GdalTools", "Convert a 24bit RGB image to 8bit paletted" ) )
163172
QObject.connect( self.paletted, SIGNAL( "triggered()" ), self.doPaletted )
164173

165174
self.rgb = QAction( QIcon( ":icons/8-to-24-bits.png" ), QCoreApplication.translate( "GdalTools", "PCT to RGB" ), self.iface.mainWindow() )
175+
self.rgb.setObjectName("rgb")
166176
self.rgb.setStatusTip( QCoreApplication.translate( "GdalTools", "Convert an 8bit paletted image to 24bit RGB" ) )
167177
QObject.connect( self.rgb, SIGNAL( "triggered()" ), self.doRGB )
168178

169179
self.conversionMenu.addActions( [ self.translate, self.paletted, self.rgb ] )
170180

171181
# extraction menu (Clipper, Contour)
172182
self.extractionMenu = QMenu( QCoreApplication.translate( "GdalTools", "Extraction" ), self.iface.mainWindow() )
183+
self.extractionMenu.setObjectName("extractionMenu")
173184

174185
if self.GdalVersionNum >= 1600:
175186
self.contour = QAction( QIcon(":/icons/contour.png"), QCoreApplication.translate( "GdalTools", "Contour" ), self.iface.mainWindow() )
187+
self.contour.setObjectName("contour")
176188
self.contour.setStatusTip( QCoreApplication.translate( "GdalTools", "Builds vector contour lines from a DEM") )
177189
QObject.connect( self.contour, SIGNAL( "triggered()" ), self.doContour )
178190
self.extractionMenu.addAction( self.contour )
179191

180192
self.clipper = QAction( QIcon( ":icons/raster-clip.png" ), QCoreApplication.translate( "GdalTools", "Clipper" ), self.iface.mainWindow() )
193+
self.clipper.setObjectName("clipper")
181194
#self.clipper.setStatusTip( QCoreApplication.translate( "GdalTools", "Converts raster data between different formats") )
182195
QObject.connect( self.clipper, SIGNAL( "triggered()" ), self.doClipper )
183196

184197
self.extractionMenu.addActions( [ self.clipper ] )
185198

186199
# analysis menu (DEM (Terrain model), Grid (Interpolation), Near black, Proximity (Raster distance), Sieve)
187200
self.analysisMenu = QMenu( QCoreApplication.translate( "GdalTools", "Analysis" ), self.iface.mainWindow() )
201+
self.analysisMenu.setObjectName("analysisMenu")
188202

189203
if self.GdalVersionNum >= 1600:
190204
self.sieve = QAction( QIcon(":/icons/sieve.png"), QCoreApplication.translate( "GdalTools", "Sieve" ), self.iface.mainWindow() )
205+
self.sieve.setObjectName("sieve")
191206
self.sieve.setStatusTip( QCoreApplication.translate( "GdalTools", "Removes small raster polygons") )
192207
QObject.connect( self.sieve, SIGNAL( "triggered()" ), self.doSieve )
193208
self.analysisMenu.addAction( self.sieve )
194209

195210
if self.GdalVersionNum >= 1500:
196211
self.nearBlack = QAction( QIcon(":/icons/nearblack.png"), QCoreApplication.translate( "GdalTools", "Near black" ), self.iface.mainWindow() )
212+
self.nearBlack.setObjectName("nearBlack")
197213
self.nearBlack.setStatusTip( QCoreApplication.translate( "GdalTools", "Convert nearly black/white borders to exact value") )
198214
QObject.connect( self.nearBlack, SIGNAL( "triggered()" ), self.doNearBlack )
199215
self.analysisMenu.addAction( self.nearBlack )
200216

201217
if self.GdalVersionNum >= 1700:
202218
self.fillNodata = QAction( QIcon(":/icons/fillnodata.png"), QCoreApplication.translate( "GdalTools", "Fill nodata" ), self.iface.mainWindow() )
219+
self.fillNodata.setObjectName("fillNodata")
203220
self.fillNodata.setStatusTip( QCoreApplication.translate( "GdalTools", "Fill raster regions by interpolation from edges") )
204221
QObject.connect( self.fillNodata, SIGNAL( "triggered()" ), self.doFillNodata )
205222
self.analysisMenu.addAction( self.fillNodata )
206223

207224
if self.GdalVersionNum >= 1600:
208225
self.proximity = QAction( QIcon(":/icons/proximity.png"), QCoreApplication.translate( "GdalTools", "Proximity (Raster distance)" ), self.iface.mainWindow() )
226+
self.proximity.setObjectName("proximity")
209227
self.proximity.setStatusTip( QCoreApplication.translate( "GdalTools", "Produces a raster proximity map") )
210228
QObject.connect( self.proximity, SIGNAL( "triggered()" ), self.doProximity )
211229
self.analysisMenu.addAction( self.proximity )
212230

213231
if self.GdalVersionNum >= 1500:
214232
self.grid = QAction( QIcon(":/icons/grid.png"), QCoreApplication.translate( "GdalTools", "Grid (Interpolation)" ), self.iface.mainWindow() )
233+
self.grid.setObjectName("grid")
215234
self.grid.setStatusTip( QCoreApplication.translate( "GdalTools", "Create raster from the scattered data") )
216235
QObject.connect( self.grid, SIGNAL( "triggered()" ), self.doGrid )
217236
self.analysisMenu.addAction( self.grid )
218237

219238
if self.GdalVersionNum >= 1700:
220239
self.dem = QAction( QIcon( ":icons/dem.png" ), QCoreApplication.translate( "GdalTools", "DEM (Terrain models)" ), self.iface.mainWindow() )
240+
self.dem.setObjectName("dem")
221241
self.dem.setStatusTip( QCoreApplication.translate( "GdalTools", "Tool to analyze and visualize DEMs" ) )
222242
QObject.connect( self.dem, SIGNAL( "triggered()" ), self.doDEM )
223243
self.analysisMenu.addAction( self.dem )
@@ -226,26 +246,32 @@ def initGui( self ):
226246

227247
# miscellaneous menu (Build overviews (Pyramids), Tile index, Information, Merge, Build Virtual Raster (Catalog))
228248
self.miscellaneousMenu = QMenu( QCoreApplication.translate( "GdalTools", "Miscellaneous" ), self.iface.mainWindow() )
249+
self.miscellaneousMenu.setObjectName("miscellaneousMenu")
229250

230251
if self.GdalVersionNum >= 1600:
231252
self.buildVRT = QAction( QIcon(":/icons/vrt.png"), QCoreApplication.translate( "GdalTools", "Build Virtual Raster (Catalog)" ), self.iface.mainWindow() )
253+
self.buildVRT.setObjectName("buildVRT")
232254
self.buildVRT.setStatusTip( QCoreApplication.translate( "GdalTools", "Builds a VRT from a list of datasets") )
233255
QObject.connect( self.buildVRT, SIGNAL( "triggered()" ), self.doBuildVRT )
234256
self.miscellaneousMenu.addAction( self.buildVRT )
235257

236258
self.merge = QAction( QIcon(":/icons/merge.png"), QCoreApplication.translate( "GdalTools", "Merge" ), self.iface.mainWindow() )
259+
self.merge.setObjectName("merge")
237260
self.merge.setStatusTip( QCoreApplication.translate( "GdalTools", "Build a quick mosaic from a set of images") )
238261
QObject.connect( self.merge, SIGNAL( "triggered()" ), self.doMerge )
239262

240263
self.info = QAction( QIcon( ":/icons/raster-info.png" ), QCoreApplication.translate( "GdalTools", "Information" ), self.iface.mainWindow() )
264+
self.info.setObjectName("info")
241265
self.info.setStatusTip( QCoreApplication.translate( "GdalTools", "Lists information about raster dataset" ) )
242266
QObject.connect( self.info, SIGNAL("triggered()"), self.doInfo )
243267

244268
self.overview = QAction( QIcon( ":icons/raster-overview.png" ), QCoreApplication.translate( "GdalTools", "Build overviews (Pyramids)" ), self.iface.mainWindow() )
269+
self.overview.setObjectName("overview")
245270
self.overview.setStatusTip( QCoreApplication.translate( "GdalTools", "Builds or rebuilds overview images" ) )
246271
QObject.connect( self.overview, SIGNAL( "triggered()" ), self.doOverview )
247272

248273
self.tileindex = QAction( QIcon( ":icons/tiles.png" ), QCoreApplication.translate( "GdalTools", "Tile index" ), self.iface.mainWindow() )
274+
self.tileindex.setObjectName("tileindex")
249275
self.tileindex.setStatusTip( QCoreApplication.translate( "GdalTools", "Build a shapefile as a raster tileindex" ) )
250276
QObject.connect( self.tileindex, SIGNAL( "triggered()" ), self.doTileIndex )
251277

@@ -261,6 +287,7 @@ def initGui( self ):
261287
self.menu.addMenu( self.miscellaneousMenu )
262288

263289
self.settings = QAction( QCoreApplication.translate( "GdalTools", "GdalTools settings" ), self.iface.mainWindow() )
290+
self.settings.setObjectName("settings")
264291
self.settings.setStatusTip( QCoreApplication.translate( "GdalTools", "Various settings for Gdal Tools" ) )
265292
QObject.connect( self.settings, SIGNAL( "triggered()" ), self.doSettings )
266293
self.menu.addAction( self.settings )

python/plugins/db_manager/db_manager_plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def __init__(self, iface):
3535

3636
def initGui(self):
3737
self.action = QAction( QIcon(":/db_manager/icon"), QApplication.translate("DBManagerPlugin","DB Manager"), self.iface.mainWindow() )
38+
self.action.setObjectName("dbManager")
3839
QObject.connect( self.action, SIGNAL( "triggered()" ), self.run )
3940
# Add toolbar button and menu item
4041
if hasattr( self.iface, 'addDatabaseToolBarIcon' ):

0 commit comments

Comments
 (0)