@@ -124,100 +124,120 @@ def initGui( self ):
124
124
125
125
# projections menu (Warp (Reproject), Assign projection)
126
126
self .projectionsMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Projections" ), self .iface .mainWindow () )
127
+ self .projectionsMenu .setObjectName ("projectionsMenu" )
127
128
128
129
self .warp = QAction ( QIcon (":/icons/warp.png" ), QCoreApplication .translate ( "GdalTools" , "Warp (Reproject)" ), self .iface .mainWindow () )
130
+ self .warp .setObjectName ("warp" )
129
131
self .warp .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Warp an image into a new coordinate system" ) )
130
132
QObject .connect ( self .warp , SIGNAL ( "triggered()" ), self .doWarp )
131
133
132
134
self .projection = QAction ( QIcon ( ":icons/projection-add.png" ), QCoreApplication .translate ( "GdalTools" , "Assign projection" ), self .iface .mainWindow () )
135
+ self .projection .setObjectName ("projection" )
133
136
self .projection .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Add projection info to the raster" ) )
134
137
QObject .connect ( self .projection , SIGNAL ( "triggered()" ), self .doProjection )
135
138
136
139
self .extractProj = QAction ( QIcon ( ":icons/projection-export.png" ), QCoreApplication .translate ( "GdalTools" , "Extract projection" ), self .iface .mainWindow () )
140
+ self .extractProj .setObjectName ("extractProj" )
137
141
self .extractProj .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Extract projection information from raster(s)" ) )
138
142
QObject .connect ( self .extractProj , SIGNAL ( "triggered()" ), self .doExtractProj )
139
143
140
144
self .projectionsMenu .addActions ( [ self .warp , self .projection , self .extractProj ] )
141
145
142
146
# conversion menu (Rasterize (Vector to raster), Polygonize (Raster to vector), Translate, RGB to PCT, PCT to RGB)
143
147
self .conversionMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Conversion" ), self .iface .mainWindow () )
148
+ self .conversionMenu .setObjectName ("conversionMenu" )
144
149
145
150
if self .GdalVersionNum >= 1300 :
146
151
self .rasterize = QAction ( QIcon (":/icons/rasterize.png" ), QCoreApplication .translate ( "GdalTools" , "Rasterize (Vector to raster)" ), self .iface .mainWindow () )
152
+ self .rasterize .setObjectName ("rasterize" )
147
153
self .rasterize .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Burns vector geometries into a raster" ) )
148
154
QObject .connect ( self .rasterize , SIGNAL ( "triggered()" ), self .doRasterize )
149
155
self .conversionMenu .addAction ( self .rasterize )
150
156
151
157
if self .GdalVersionNum >= 1600 :
152
158
self .polygonize = QAction ( QIcon (":/icons/polygonize.png" ), QCoreApplication .translate ( "GdalTools" , "Polygonize (Raster to vector)" ), self .iface .mainWindow () )
159
+ self .polygonize .setObjectName ("polygonize" )
153
160
self .polygonize .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Produces a polygon feature layer from a raster" ) )
154
161
QObject .connect ( self .polygonize , SIGNAL ( "triggered()" ), self .doPolygonize )
155
162
self .conversionMenu .addAction ( self .polygonize )
156
163
157
164
self .translate = QAction ( QIcon (":/icons/translate.png" ), QCoreApplication .translate ( "GdalTools" , "Translate (Convert format)" ), self .iface .mainWindow () )
165
+ self .translate .setObjectName ("translate" )
158
166
self .translate .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Converts raster data between different formats" ) )
159
167
QObject .connect ( self .translate , SIGNAL ( "triggered()" ), self .doTranslate )
160
168
161
169
self .paletted = QAction ( QIcon ( ":icons/24-to-8-bits.png" ), QCoreApplication .translate ( "GdalTools" , "RGB to PCT" ), self .iface .mainWindow () )
170
+ self .paletted .setObjectName ("paletted" )
162
171
self .paletted .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Convert a 24bit RGB image to 8bit paletted" ) )
163
172
QObject .connect ( self .paletted , SIGNAL ( "triggered()" ), self .doPaletted )
164
173
165
174
self .rgb = QAction ( QIcon ( ":icons/8-to-24-bits.png" ), QCoreApplication .translate ( "GdalTools" , "PCT to RGB" ), self .iface .mainWindow () )
175
+ self .rgb .setObjectName ("rgb" )
166
176
self .rgb .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Convert an 8bit paletted image to 24bit RGB" ) )
167
177
QObject .connect ( self .rgb , SIGNAL ( "triggered()" ), self .doRGB )
168
178
169
179
self .conversionMenu .addActions ( [ self .translate , self .paletted , self .rgb ] )
170
180
171
181
# extraction menu (Clipper, Contour)
172
182
self .extractionMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Extraction" ), self .iface .mainWindow () )
183
+ self .extractionMenu .setObjectName ("extractionMenu" )
173
184
174
185
if self .GdalVersionNum >= 1600 :
175
186
self .contour = QAction ( QIcon (":/icons/contour.png" ), QCoreApplication .translate ( "GdalTools" , "Contour" ), self .iface .mainWindow () )
187
+ self .contour .setObjectName ("contour" )
176
188
self .contour .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Builds vector contour lines from a DEM" ) )
177
189
QObject .connect ( self .contour , SIGNAL ( "triggered()" ), self .doContour )
178
190
self .extractionMenu .addAction ( self .contour )
179
191
180
192
self .clipper = QAction ( QIcon ( ":icons/raster-clip.png" ), QCoreApplication .translate ( "GdalTools" , "Clipper" ), self .iface .mainWindow () )
193
+ self .clipper .setObjectName ("clipper" )
181
194
#self.clipper.setStatusTip( QCoreApplication.translate( "GdalTools", "Converts raster data between different formats") )
182
195
QObject .connect ( self .clipper , SIGNAL ( "triggered()" ), self .doClipper )
183
196
184
197
self .extractionMenu .addActions ( [ self .clipper ] )
185
198
186
199
# analysis menu (DEM (Terrain model), Grid (Interpolation), Near black, Proximity (Raster distance), Sieve)
187
200
self .analysisMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Analysis" ), self .iface .mainWindow () )
201
+ self .analysisMenu .setObjectName ("analysisMenu" )
188
202
189
203
if self .GdalVersionNum >= 1600 :
190
204
self .sieve = QAction ( QIcon (":/icons/sieve.png" ), QCoreApplication .translate ( "GdalTools" , "Sieve" ), self .iface .mainWindow () )
205
+ self .sieve .setObjectName ("sieve" )
191
206
self .sieve .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Removes small raster polygons" ) )
192
207
QObject .connect ( self .sieve , SIGNAL ( "triggered()" ), self .doSieve )
193
208
self .analysisMenu .addAction ( self .sieve )
194
209
195
210
if self .GdalVersionNum >= 1500 :
196
211
self .nearBlack = QAction ( QIcon (":/icons/nearblack.png" ), QCoreApplication .translate ( "GdalTools" , "Near black" ), self .iface .mainWindow () )
212
+ self .nearBlack .setObjectName ("nearBlack" )
197
213
self .nearBlack .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Convert nearly black/white borders to exact value" ) )
198
214
QObject .connect ( self .nearBlack , SIGNAL ( "triggered()" ), self .doNearBlack )
199
215
self .analysisMenu .addAction ( self .nearBlack )
200
216
201
217
if self .GdalVersionNum >= 1700 :
202
218
self .fillNodata = QAction ( QIcon (":/icons/fillnodata.png" ), QCoreApplication .translate ( "GdalTools" , "Fill nodata" ), self .iface .mainWindow () )
219
+ self .fillNodata .setObjectName ("fillNodata" )
203
220
self .fillNodata .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Fill raster regions by interpolation from edges" ) )
204
221
QObject .connect ( self .fillNodata , SIGNAL ( "triggered()" ), self .doFillNodata )
205
222
self .analysisMenu .addAction ( self .fillNodata )
206
223
207
224
if self .GdalVersionNum >= 1600 :
208
225
self .proximity = QAction ( QIcon (":/icons/proximity.png" ), QCoreApplication .translate ( "GdalTools" , "Proximity (Raster distance)" ), self .iface .mainWindow () )
226
+ self .proximity .setObjectName ("proximity" )
209
227
self .proximity .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Produces a raster proximity map" ) )
210
228
QObject .connect ( self .proximity , SIGNAL ( "triggered()" ), self .doProximity )
211
229
self .analysisMenu .addAction ( self .proximity )
212
230
213
231
if self .GdalVersionNum >= 1500 :
214
232
self .grid = QAction ( QIcon (":/icons/grid.png" ), QCoreApplication .translate ( "GdalTools" , "Grid (Interpolation)" ), self .iface .mainWindow () )
233
+ self .grid .setObjectName ("grid" )
215
234
self .grid .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Create raster from the scattered data" ) )
216
235
QObject .connect ( self .grid , SIGNAL ( "triggered()" ), self .doGrid )
217
236
self .analysisMenu .addAction ( self .grid )
218
237
219
238
if self .GdalVersionNum >= 1700 :
220
239
self .dem = QAction ( QIcon ( ":icons/dem.png" ), QCoreApplication .translate ( "GdalTools" , "DEM (Terrain models)" ), self .iface .mainWindow () )
240
+ self .dem .setObjectName ("dem" )
221
241
self .dem .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Tool to analyze and visualize DEMs" ) )
222
242
QObject .connect ( self .dem , SIGNAL ( "triggered()" ), self .doDEM )
223
243
self .analysisMenu .addAction ( self .dem )
@@ -226,26 +246,32 @@ def initGui( self ):
226
246
227
247
# miscellaneous menu (Build overviews (Pyramids), Tile index, Information, Merge, Build Virtual Raster (Catalog))
228
248
self .miscellaneousMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Miscellaneous" ), self .iface .mainWindow () )
249
+ self .miscellaneousMenu .setObjectName ("miscellaneousMenu" )
229
250
230
251
if self .GdalVersionNum >= 1600 :
231
252
self .buildVRT = QAction ( QIcon (":/icons/vrt.png" ), QCoreApplication .translate ( "GdalTools" , "Build Virtual Raster (Catalog)" ), self .iface .mainWindow () )
253
+ self .buildVRT .setObjectName ("buildVRT" )
232
254
self .buildVRT .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Builds a VRT from a list of datasets" ) )
233
255
QObject .connect ( self .buildVRT , SIGNAL ( "triggered()" ), self .doBuildVRT )
234
256
self .miscellaneousMenu .addAction ( self .buildVRT )
235
257
236
258
self .merge = QAction ( QIcon (":/icons/merge.png" ), QCoreApplication .translate ( "GdalTools" , "Merge" ), self .iface .mainWindow () )
259
+ self .merge .setObjectName ("merge" )
237
260
self .merge .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Build a quick mosaic from a set of images" ) )
238
261
QObject .connect ( self .merge , SIGNAL ( "triggered()" ), self .doMerge )
239
262
240
263
self .info = QAction ( QIcon ( ":/icons/raster-info.png" ), QCoreApplication .translate ( "GdalTools" , "Information" ), self .iface .mainWindow () )
264
+ self .info .setObjectName ("info" )
241
265
self .info .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Lists information about raster dataset" ) )
242
266
QObject .connect ( self .info , SIGNAL ("triggered()" ), self .doInfo )
243
267
244
268
self .overview = QAction ( QIcon ( ":icons/raster-overview.png" ), QCoreApplication .translate ( "GdalTools" , "Build overviews (Pyramids)" ), self .iface .mainWindow () )
269
+ self .overview .setObjectName ("overview" )
245
270
self .overview .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Builds or rebuilds overview images" ) )
246
271
QObject .connect ( self .overview , SIGNAL ( "triggered()" ), self .doOverview )
247
272
248
273
self .tileindex = QAction ( QIcon ( ":icons/tiles.png" ), QCoreApplication .translate ( "GdalTools" , "Tile index" ), self .iface .mainWindow () )
274
+ self .tileindex .setObjectName ("tileindex" )
249
275
self .tileindex .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Build a shapefile as a raster tileindex" ) )
250
276
QObject .connect ( self .tileindex , SIGNAL ( "triggered()" ), self .doTileIndex )
251
277
@@ -261,6 +287,7 @@ def initGui( self ):
261
287
self .menu .addMenu ( self .miscellaneousMenu )
262
288
263
289
self .settings = QAction ( QCoreApplication .translate ( "GdalTools" , "GdalTools settings" ), self .iface .mainWindow () )
290
+ self .settings .setObjectName ("settings" )
264
291
self .settings .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Various settings for Gdal Tools" ) )
265
292
QObject .connect ( self .settings , SIGNAL ( "triggered()" ), self .doSettings )
266
293
self .menu .addAction ( self .settings )
0 commit comments