@@ -97,8 +97,8 @@ def initGui( self ):
97
97
self .analysisMenu .addActions ( [ self .distMatrix , self .sumLines , self .pointsPoly ,
98
98
self .listUnique , self .compStats , self .nearestNeigh , self .meanCoords , self .intLines ] )
99
99
100
- self .samplingMenu = QMenu ( QCoreApplication .translate ( "fTools" , "&Sampling Tools" ) )
101
- self .samplingMenu .setIcon ( QIcon ( self .getThemeIcon ( "sampling.png" ) ) )
100
+ self .researchMenu = QMenu ( QCoreApplication .translate ( "fTools" , "&Research Tools" ) )
101
+ self .researchMenu .setIcon ( QIcon ( self .getThemeIcon ( "sampling.png" ) ) )
102
102
self .randSel = QAction ( QIcon ( self .getThemeIcon ( "random_selection.png" ) ),
103
103
QCoreApplication .translate ( "fTools" , "Random selection" ),self .iface .mainWindow () )
104
104
self .randSub = QAction ( QIcon ( self .getThemeIcon ( "sub_selection.png" ) ),
@@ -111,8 +111,10 @@ def initGui( self ):
111
111
QCoreApplication .translate ( "fTools" , "Vector grid" ), self .iface .mainWindow () )
112
112
self .selectLocation = QAction ( QIcon ( self .getThemeIcon ( "select_location.png" ) ),
113
113
QCoreApplication .translate ( "fTools" , "Select by location" ), self .iface .mainWindow () )
114
- self .samplingMenu .addActions ( [ self .randSel , self .randSub , self .randPoints ,
115
- self .regPoints , self .vectGrid , self .selectLocation ] )
114
+ self .layerExtent = QAction ( QIcon ( self .getThemeIcon ( "layer_extent.png" ) ),
115
+ QCoreApplication .translate ( "fTools" , "Polygon from layer extent" ), self .iface .mainWindow () )
116
+ self .researchMenu .addActions ( [ self .randSel , self .randSub , self .randPoints ,
117
+ self .regPoints , self .vectGrid , self .selectLocation , self .layerExtent ] )
116
118
117
119
self .geoMenu = QMenu ( QCoreApplication .translate ( "fTools" , "&Geoprocessing Tools" ) )
118
120
self .geoMenu .setIcon ( QIcon ( self .getThemeIcon ( "geoprocessing.png" ) ) )
@@ -143,6 +145,8 @@ def initGui( self ):
143
145
QCoreApplication .translate ( "fTools" , "Check geometry validity" ),self .iface .mainWindow () )
144
146
self .centroids = QAction ( QIcon ( self .getThemeIcon ( "centroids.png" ) ),
145
147
QCoreApplication .translate ( "fTools" , "Polygon centroids" ),self .iface .mainWindow () )
148
+ self .delaunay = QAction ( QIcon ( self .getThemeIcon ( "delaunay.png" ) ),
149
+ QCoreApplication .translate ( "fTools" , "Delaunay triangulation" ),self .iface .mainWindow () )
146
150
self .extNodes = QAction ( QIcon ( self .getThemeIcon ( "extract_nodes.png" ) ),
147
151
QCoreApplication .translate ( "fTools" , "Extract nodes" ),self .iface .mainWindow () )
148
152
self .simplify = QAction ( QIcon ( self .getThemeIcon ( "simplify.png" ) ),
@@ -153,8 +157,8 @@ def initGui( self ):
153
157
QCoreApplication .translate ( "fTools" , "Singleparts to multipart" ),self .iface .mainWindow () )
154
158
self .polysToLines = QAction ( QIcon ( self .getThemeIcon ( "to_lines.png" ) ),
155
159
QCoreApplication .translate ( "fTools" , "Polygons to lines" ),self .iface .mainWindow () )
156
- self .conversionMenu .addActions ( [ self .checkGeom , self .compGeo , self .centroids , self .simplify ,
157
- self .multiToSingle , self .singleToMulti , self .polysToLines , self .extNodes ] )
160
+ self .conversionMenu .addActions ( [ self .checkGeom , self .compGeo , self .centroids , self .delaunay ,
161
+ self .simplify , self . multiToSingle , self .singleToMulti , self .polysToLines , self .extNodes ] )
158
162
159
163
self .dataManageMenu = QMenu ( QCoreApplication .translate ( "fTools" , "&Data Management Tools" ) )
160
164
self .dataManageMenu .setIcon ( QIcon ( self .getThemeIcon ( "management.png" ) ) )
@@ -170,21 +174,21 @@ def initGui( self ):
170
174
QCoreApplication .translate ( "fTools" , "Split vector layer" ), self .iface .mainWindow () )
171
175
self .dataManageMenu .addActions ( [ self .project , self .define , self .joinAttr , self .spatJoin , self .splitVect ] )
172
176
173
- self .ftools_about = QAction ( QIcon ( self .getThemeIcon ( "ftools_logo.png" ) ),
174
- QCoreApplication .translate ( "fTools" , "About fTools" ), self .iface .mainWindow () )
177
+ self .ftools_aboot = QAction ( QIcon ( self .getThemeIcon ( "ftools_logo.png" ) ),
178
+ QCoreApplication .translate ( "fTools" , "fTools About " ), self .iface .mainWindow () )
175
179
176
180
self .menu .addMenu ( self .analysisMenu )
177
- self .menu .addMenu ( self .samplingMenu )
181
+ self .menu .addMenu ( self .researchMenu )
178
182
self .menu .addMenu ( self .geoMenu )
179
183
self .menu .addMenu ( self .conversionMenu )
180
184
self .menu .addMenu ( self .dataManageMenu )
181
185
self .menu .addSeparator ()
182
- self .menu .addAction ( self .ftools_about )
186
+ self .menu .addAction ( self .ftools_aboot )
183
187
184
188
menuBar = self .iface .mainWindow ().menuBar ()
185
189
actions = menuBar .actions ()
186
- helpAction = actions [ len ( actions ) - 1 ]
187
- menuBar .insertMenu ( helpAction , self .menu )
190
+ lastAction = actions [ len ( actions ) - 1 ]
191
+ menuBar .insertMenu ( lastAction , self .menu )
188
192
189
193
QObject .connect ( self .distMatrix , SIGNAL ("triggered()" ), self .dodistMatrix )
190
194
QObject .connect ( self .sumLines , SIGNAL ("triggered()" ), self .dosumLines )
@@ -201,6 +205,7 @@ def initGui( self ):
201
205
QObject .connect ( self .regPoints , SIGNAL ("triggered()" ), self .doregPoints )
202
206
QObject .connect ( self .vectGrid , SIGNAL ("triggered()" ), self .dovectGrid )
203
207
QObject .connect ( self .selectLocation , SIGNAL ("triggered()" ), self .doselectLocation )
208
+ QObject .connect ( self .layerExtent , SIGNAL ("triggered()" ), self .doextent )
204
209
205
210
QObject .connect ( self .minConvex , SIGNAL ("triggered()" ), self .dominConvex )
206
211
QObject .connect ( self .intersect , SIGNAL ("triggered()" ), self .dointersect )
@@ -216,6 +221,7 @@ def initGui( self ):
216
221
QObject .connect ( self .checkGeom , SIGNAL ("triggered()" ), self .docheckGeom )
217
222
QObject .connect ( self .simplify , SIGNAL ("triggered()" ), self .dosimplify )
218
223
QObject .connect ( self .centroids , SIGNAL ("triggered()" ), self .docentroids )
224
+ QObject .connect ( self .delaunay , SIGNAL ("triggered()" ), self .dodelaunay )
219
225
QObject .connect ( self .polysToLines , SIGNAL ("triggered()" ), self .dopolysToLines )
220
226
QObject .connect ( self .compGeo , SIGNAL ("triggered()" ), self .docompGeo )
221
227
QObject .connect ( self .extNodes , SIGNAL ("triggered()" ), self .doextNodes )
@@ -226,7 +232,7 @@ def initGui( self ):
226
232
QObject .connect ( self .spatJoin , SIGNAL ("triggered()" ), self .dospatJoin )
227
233
QObject .connect ( self .splitVect , SIGNAL ("triggered()" ), self .dosplitVect )
228
234
229
- QObject .connect ( self .ftools_about , SIGNAL ("triggered()" ), self .doabout )
235
+ QObject .connect ( self .ftools_aboot , SIGNAL ("triggered()" ), self .doaboot )
230
236
231
237
def unload ( self ):
232
238
pass
@@ -302,6 +308,14 @@ def dodistMatrix( self ):
302
308
def docentroids ( self ):
303
309
d = doGeometry .GeometryDialog ( self .iface , 7 )
304
310
d .exec_ ()
311
+
312
+ def dodelaunay ( self ):
313
+ d = doGeometry .GeometryDialog ( self .iface , 8 )
314
+ d .exec_ ()
315
+
316
+ def doextent ( self ):
317
+ d = doGeometry .GeometryDialog ( self .iface , 9 )
318
+ d .exec_ ()
305
319
306
320
def dosumLines (self ):
307
321
d = doSumLines .Dialog (self .iface )
@@ -371,6 +385,6 @@ def dospatJoin( self ):
371
385
d = doSpatialJoin .Dialog ( self .iface )
372
386
d .exec_ ()
373
387
374
- def doabout ( self ):
388
+ def doaboot ( self ):
375
389
d = doAbout .Dialog ( self .iface )
376
390
d .exec_ ()
0 commit comments