Skip to content

Commit a168abc

Browse files
author
cfarmer
committedJan 27, 2009
Fixes error when manually specifying output coordinates
Modifies ui to increase control on output grid extents git-svn-id: http://svn.osgeo.org/qgis/trunk@10035 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 3ac5020 commit a168abc

File tree

3 files changed

+202
-267
lines changed

3 files changed

+202
-267
lines changed
 

‎python/plugins/ftools/tools/doVectorGrid.py

Lines changed: 48 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -42,52 +42,67 @@ def __init__(self, iface):
4242
self.setupUi(self)
4343
QObject.connect(self.toolOut, SIGNAL("clicked()"), self.outFile)
4444
QObject.connect(self.spnX, SIGNAL("valueChanged(double)"), self.offset)
45+
#QObject.connect(self.inShape, SIGNAL("currentIndexChanged(QString)"), self.updateInput)
46+
QObject.connect(self.btnUpdate, SIGNAL("clicked()"), self.updateInput)
4547
self.setWindowTitle("Vector grid")
46-
mapCanvas = self.iface.mapCanvas()
47-
for i in range(mapCanvas.layerCount()):
48-
layer = mapCanvas.layer(i)
49-
self.inShape.addItem(layer.name())
48+
self.xMin.setValidator(QDoubleValidator(self.xMin))
49+
self.xMax.setValidator(QDoubleValidator(self.xMax))
50+
self.yMin.setValidator(QDoubleValidator(self.yMin))
51+
self.yMax.setValidator(QDoubleValidator(self.yMax))
52+
layers = ftools_utils.getLayerNames(
53+
[ QGis.Point, QGis.Line, QGis.Polygon ] )
54+
for layer in layers:
55+
self.inShape.addItem( layer )
5056

5157
def offset(self, value):
5258
if self.chkLock.isChecked():
5359
self.spnY.setValue(value)
5460

61+
def updateInput( self ):
62+
mLayerName = self.inShape.currentText()
63+
if not mLayerName == "":
64+
mLayer = self.getMapLayerByName( unicode( mLayerName ) )
65+
self.inLayer = mLayer
66+
boundBox = mLayer.extent()
67+
self.updateExtents( boundBox )
68+
69+
def updateExtents( self, boundBox ):
70+
self.xMin.setText( unicode( boundBox.xMinimum() ) )
71+
self.yMin.setText( unicode( boundBox.yMinimum() ) )
72+
self.xMax.setText( unicode( boundBox.xMaximum() ) )
73+
self.yMax.setText( unicode( boundBox.yMaximum() ) )
74+
5575
def accept(self):
56-
if not self.rdoCoordinates.isChecked() and self.inShape.currentText() == "":
57-
QMessageBox.information(self, "Generate Vector Grid", "Please specify input layer")
58-
elif self.rdoCoordinates.isChecked() and (self.xMin.text() == "" or self.xMax.text() == "" or self.yMin.text() == "" or self.yMax.text() == ""):
59-
QMessageBox.information(self, "Generate Vector Grid", "Please properly specify extent coordinates")
76+
if self.xMin.text() == "" or self.xMax.text() == "" or self.yMin.text() == "" or self.yMax.text() == "":
77+
QMessageBox.information(self, "Vector grid", "Please specify valid extent coordinates")
6078
elif self.outShape.text() == "":
61-
QMessageBox.information(self, "Generate Vector Grid", "Please specify output shapefile")
79+
QMessageBox.information(self, "Vector grid", "Please specify output shapefile")
6280
else:
63-
inName = self.inShape.currentText()
64-
outPath = self.outShape.text()
65-
self.outShape.clear()
66-
if outPath.contains("\\"):
67-
outName = outPath.right((outPath.length() - outPath.lastIndexOf("\\")) - 1)
68-
else:
69-
outName = outPath.right((outPath.length() - outPath.lastIndexOf("/")) - 1)
70-
if outName.endsWith(".shp"):
71-
outName = outName.left(outName.length() - 4)
72-
if self.rdoBoundary.isChecked():
73-
mLayer = self.getMapLayerByName(unicode(inName))
74-
boundBox = mLayer.extent()
75-
else:
76-
boundBox = QgsRect(float(self.xMin.text()), float(self.yMin.text()), float(self.xMax.text()), float(self.yMax.text()))
81+
try:
82+
boundBox = QgsRectangle(
83+
float( self.xMin.text() ),
84+
float( self.yMin.text() ),
85+
float( self.xMax.text() ),
86+
float( self.yMax.text() ) )
87+
except:
88+
QMessageBox.information(self, "Vector grid", "Invalid extent coordinates entered")
7789
xSpace = self.spnX.value()
7890
ySpace = self.spnY.value()
7991
if self.rdoPolygons.isChecked(): polygon = True
8092
else: polygon = False
81-
self.compute(boundBox, outPath, xSpace, ySpace, polygon, self.progressBar)
82-
addToTOC = QMessageBox.question(self, "Generate Vector Grid", "Created output Shapefile:\n" + outPath
83-
+ "\nNote: Layer has no associated coordinate system, please use the Projection Management Tool to specify spatial reference system."
84-
+ "\n\nWould you like to add the new layer to the TOC?", QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
93+
self.outShape.clear()
94+
self.compute( boundBox, xSpace, ySpace, polygon )
95+
addToTOC = QMessageBox.question(self,
96+
"Generate Vector Grid", "Created output Shapefile:\n" + outPath
97+
+ "\nNote: Layer has no associated coordinate system, please use "
98+
+ "the Projection Management Tool to specify spatial reference system."
99+
+ "\n\nWould you like to add the new layer to the TOC?",
100+
QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
85101
if addToTOC == QMessageBox.Yes:
86-
self.vlayer = QgsVectorLayer(outPath, unicode(outName), "ogr")
87-
QgsMapLayerRegistry.instance().addMapLayer(self.vlayer)
88-
self.progressBar.setValue(0)
102+
ftools_utils.addShapeToCanvas( self.shapefileName )
103+
self.progressBar.setValue( 0 )
89104

90-
def compute(self, bound, outPath, xOffset, yOffset, polygon, progressBar):
105+
def compute( self, bound, xOffset, yOffset, polygon ):
91106
if polygon:
92107
fields = {0:QgsField("ID", QVariant.Int), 1:QgsField("XMIN", QVariant.Double), 2:QgsField("XMAX", QVariant.Double),
93108
3:QgsField("YMIN", QVariant.Double), 4:QgsField("YMAX", QVariant.Double)}
@@ -108,7 +123,7 @@ def compute(self, bound, outPath, xOffset, yOffset, polygon, progressBar):
108123
outFeat = QgsFeature()
109124
outGeom = QgsGeometry()
110125
idVar = 0
111-
progressBar.setRange(0,0)
126+
self.progressBar.setRange( 0, 0 )
112127
if not polygon:
113128
y = bound.yMaximum()
114129
while y >= bound.yMinimum():
@@ -153,7 +168,7 @@ def compute(self, bound, outPath, xOffset, yOffset, polygon, progressBar):
153168
idVar = idVar + 1
154169
x = x + xOffset
155170
y = y - yOffset
156-
progressBar.setRange(0,100)
171+
self.progressBar.setRange( 0, 100 )
157172
del writer
158173

159174
def outFile(self):

‎python/plugins/ftools/tools/frmVectorGrid.py

Lines changed: 39 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Form implementation generated from reading ui file 'frmVectorGrid.ui'
44
#
5-
# Created: Mon Nov 10 00:06:05 2008
5+
# Created: Tue Jan 27 23:10:42 2009
66
# by: PyQt4 UI code generator 4.3.3
77
#
88
# WARNING! All changes made in this file will be lost!
@@ -13,7 +13,7 @@ class Ui_Dialog(object):
1313
def setupUi(self, Dialog):
1414
Dialog.setObjectName("Dialog")
1515
Dialog.setWindowModality(QtCore.Qt.NonModal)
16-
Dialog.resize(QtCore.QSize(QtCore.QRect(0,0,374,483).size()).expandedTo(Dialog.minimumSizeHint()))
16+
Dialog.resize(QtCore.QSize(QtCore.QRect(0,0,369,459).size()).expandedTo(Dialog.minimumSizeHint()))
1717
Dialog.setSizeGripEnabled(True)
1818

1919
self.gridlayout = QtGui.QGridLayout(Dialog)
@@ -25,70 +25,76 @@ def setupUi(self, Dialog):
2525
self.gridlayout1 = QtGui.QGridLayout(self.groupBox)
2626
self.gridlayout1.setObjectName("gridlayout1")
2727

28-
self.rdoBoundary = QtGui.QRadioButton(self.groupBox)
29-
self.rdoBoundary.setChecked(True)
30-
self.rdoBoundary.setObjectName("rdoBoundary")
31-
self.gridlayout1.addWidget(self.rdoBoundary,0,0,1,2)
28+
spacerItem = QtGui.QSpacerItem(80,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum)
29+
self.gridlayout1.addItem(spacerItem,1,0,1,1)
3230

33-
self.inShape = QtGui.QComboBox(self.groupBox)
34-
self.inShape.setObjectName("inShape")
35-
self.gridlayout1.addWidget(self.inShape,1,0,1,2)
31+
self.btnUpdate = QtGui.QToolButton(self.groupBox)
32+
self.btnUpdate.setMinimumSize(QtCore.QSize(0,30))
33+
self.btnUpdate.setObjectName("btnUpdate")
34+
self.gridlayout1.addWidget(self.btnUpdate,1,1,1,2)
3635

37-
self.rdoCoordinates = QtGui.QRadioButton(self.groupBox)
38-
self.rdoCoordinates.setObjectName("rdoCoordinates")
39-
self.gridlayout1.addWidget(self.rdoCoordinates,2,0,1,2)
36+
spacerItem1 = QtGui.QSpacerItem(79,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum)
37+
self.gridlayout1.addItem(spacerItem1,1,3,1,1)
4038

4139
self.hboxlayout = QtGui.QHBoxLayout()
4240
self.hboxlayout.setObjectName("hboxlayout")
4341

4442
self.label = QtGui.QLabel(self.groupBox)
45-
self.label.setEnabled(False)
43+
self.label.setEnabled(True)
4644
self.label.setObjectName("label")
4745
self.hboxlayout.addWidget(self.label)
4846

4947
self.xMin = QtGui.QLineEdit(self.groupBox)
48+
self.xMin.setEnabled(True)
5049
self.xMin.setObjectName("xMin")
5150
self.hboxlayout.addWidget(self.xMin)
52-
self.gridlayout1.addLayout(self.hboxlayout,3,0,1,1)
51+
self.gridlayout1.addLayout(self.hboxlayout,2,0,1,2)
5352

5453
self.hboxlayout1 = QtGui.QHBoxLayout()
5554
self.hboxlayout1.setObjectName("hboxlayout1")
5655

5756
self.label_4 = QtGui.QLabel(self.groupBox)
58-
self.label_4.setEnabled(False)
57+
self.label_4.setEnabled(True)
5958
self.label_4.setObjectName("label_4")
6059
self.hboxlayout1.addWidget(self.label_4)
6160

6261
self.yMin = QtGui.QLineEdit(self.groupBox)
62+
self.yMin.setEnabled(True)
6363
self.yMin.setObjectName("yMin")
6464
self.hboxlayout1.addWidget(self.yMin)
65-
self.gridlayout1.addLayout(self.hboxlayout1,3,1,1,1)
65+
self.gridlayout1.addLayout(self.hboxlayout1,2,2,1,2)
6666

6767
self.hboxlayout2 = QtGui.QHBoxLayout()
6868
self.hboxlayout2.setObjectName("hboxlayout2")
6969

7070
self.label_3 = QtGui.QLabel(self.groupBox)
71-
self.label_3.setEnabled(False)
71+
self.label_3.setEnabled(True)
7272
self.label_3.setObjectName("label_3")
7373
self.hboxlayout2.addWidget(self.label_3)
7474

7575
self.xMax = QtGui.QLineEdit(self.groupBox)
76+
self.xMax.setEnabled(True)
7677
self.xMax.setObjectName("xMax")
7778
self.hboxlayout2.addWidget(self.xMax)
78-
self.gridlayout1.addLayout(self.hboxlayout2,4,0,1,1)
79+
self.gridlayout1.addLayout(self.hboxlayout2,3,0,1,2)
7980

8081
self.hboxlayout3 = QtGui.QHBoxLayout()
8182
self.hboxlayout3.setObjectName("hboxlayout3")
8283

8384
self.label_5 = QtGui.QLabel(self.groupBox)
84-
self.label_5.setEnabled(False)
85+
self.label_5.setEnabled(True)
8586
self.label_5.setObjectName("label_5")
8687
self.hboxlayout3.addWidget(self.label_5)
8788

8889
self.yMax = QtGui.QLineEdit(self.groupBox)
90+
self.yMax.setEnabled(True)
8991
self.yMax.setObjectName("yMax")
9092
self.hboxlayout3.addWidget(self.yMax)
91-
self.gridlayout1.addLayout(self.hboxlayout3,4,1,1,1)
93+
self.gridlayout1.addLayout(self.hboxlayout3,3,2,1,2)
94+
95+
self.inShape = QtGui.QComboBox(self.groupBox)
96+
self.inShape.setObjectName("inShape")
97+
self.gridlayout1.addWidget(self.inShape,0,0,1,4)
9298
self.gridlayout.addWidget(self.groupBox,0,0,1,2)
9399

94100
self.gridBox = QtGui.QGroupBox(Dialog)
@@ -97,8 +103,8 @@ def setupUi(self, Dialog):
97103
self.gridlayout2 = QtGui.QGridLayout(self.gridBox)
98104
self.gridlayout2.setObjectName("gridlayout2")
99105

100-
spacerItem = QtGui.QSpacerItem(40,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum)
101-
self.gridlayout2.addItem(spacerItem,0,0,1,1)
106+
spacerItem2 = QtGui.QSpacerItem(40,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum)
107+
self.gridlayout2.addItem(spacerItem2,0,0,1,1)
102108

103109
self.label_7 = QtGui.QLabel(self.gridBox)
104110
self.label_7.setObjectName("label_7")
@@ -107,7 +113,7 @@ def setupUi(self, Dialog):
107113
self.spnX = QtGui.QDoubleSpinBox(self.gridBox)
108114
self.spnX.setDecimals(4)
109115
self.spnX.setMinimum(0.0001)
110-
self.spnX.setMaximum(9999.0)
116+
self.spnX.setMaximum(999999999.0)
111117
self.spnX.setSingleStep(0.0001)
112118
self.spnX.setObjectName("spnX")
113119
self.gridlayout2.addWidget(self.spnX,0,2,1,1)
@@ -117,11 +123,11 @@ def setupUi(self, Dialog):
117123
self.chkLock.setObjectName("chkLock")
118124
self.gridlayout2.addWidget(self.chkLock,0,3,2,1)
119125

120-
spacerItem1 = QtGui.QSpacerItem(40,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum)
121-
self.gridlayout2.addItem(spacerItem1,0,4,1,1)
126+
spacerItem3 = QtGui.QSpacerItem(40,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum)
127+
self.gridlayout2.addItem(spacerItem3,0,4,1,1)
122128

123-
spacerItem2 = QtGui.QSpacerItem(40,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum)
124-
self.gridlayout2.addItem(spacerItem2,1,0,1,1)
129+
spacerItem4 = QtGui.QSpacerItem(40,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum)
130+
self.gridlayout2.addItem(spacerItem4,1,0,1,1)
125131

126132
self.label_8 = QtGui.QLabel(self.gridBox)
127133
self.label_8.setEnabled(False)
@@ -132,7 +138,7 @@ def setupUi(self, Dialog):
132138
self.spnY.setEnabled(False)
133139
self.spnY.setDecimals(4)
134140
self.spnY.setMinimum(0.0001)
135-
self.spnY.setMaximum(9999.0)
141+
self.spnY.setMaximum(999999999.0)
136142
self.spnY.setSingleStep(0.0001)
137143
self.spnY.setObjectName("spnY")
138144
self.gridlayout2.addWidget(self.spnY,1,2,1,1)
@@ -186,24 +192,14 @@ def setupUi(self, Dialog):
186192
self.retranslateUi(Dialog)
187193
QtCore.QObject.connect(self.buttonBox_2,QtCore.SIGNAL("accepted()"),Dialog.accept)
188194
QtCore.QObject.connect(self.buttonBox_2,QtCore.SIGNAL("rejected()"),Dialog.close)
189-
QtCore.QObject.connect(self.rdoBoundary,QtCore.SIGNAL("toggled(bool)"),self.inShape.setEnabled)
190-
QtCore.QObject.connect(self.rdoCoordinates,QtCore.SIGNAL("toggled(bool)"),self.xMin.setEnabled)
191-
QtCore.QObject.connect(self.rdoCoordinates,QtCore.SIGNAL("toggled(bool)"),self.xMax.setEnabled)
192-
QtCore.QObject.connect(self.rdoCoordinates,QtCore.SIGNAL("toggled(bool)"),self.yMin.setEnabled)
193-
QtCore.QObject.connect(self.rdoCoordinates,QtCore.SIGNAL("toggled(bool)"),self.yMax.setEnabled)
194-
QtCore.QObject.connect(self.rdoCoordinates,QtCore.SIGNAL("toggled(bool)"),self.label.setEnabled)
195-
QtCore.QObject.connect(self.rdoCoordinates,QtCore.SIGNAL("toggled(bool)"),self.label_3.setEnabled)
196-
QtCore.QObject.connect(self.rdoCoordinates,QtCore.SIGNAL("toggled(bool)"),self.label_4.setEnabled)
197-
QtCore.QObject.connect(self.rdoCoordinates,QtCore.SIGNAL("toggled(bool)"),self.label_5.setEnabled)
198195
QtCore.QObject.connect(self.chkLock,QtCore.SIGNAL("clicked(bool)"),self.spnY.setDisabled)
199196
QtCore.QObject.connect(self.chkLock,QtCore.SIGNAL("toggled(bool)"),self.label_8.setDisabled)
200197
QtCore.QMetaObject.connectSlotsByName(Dialog)
201198

202199
def retranslateUi(self, Dialog):
203200
Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "Generate Regular Points", None, QtGui.QApplication.UnicodeUTF8))
204-
self.groupBox.setTitle(QtGui.QApplication.translate("Dialog", "Grid Extent", None, QtGui.QApplication.UnicodeUTF8))
205-
self.rdoBoundary.setText(QtGui.QApplication.translate("Dialog", "Input Boundary Layer", None, QtGui.QApplication.UnicodeUTF8))
206-
self.rdoCoordinates.setText(QtGui.QApplication.translate("Dialog", "Input Coordinates", None, QtGui.QApplication.UnicodeUTF8))
201+
self.groupBox.setTitle(QtGui.QApplication.translate("Dialog", "Grid extent", None, QtGui.QApplication.UnicodeUTF8))
202+
self.btnUpdate.setText(QtGui.QApplication.translate("Dialog", "Update extents from layer", None, QtGui.QApplication.UnicodeUTF8))
207203
self.label.setText(QtGui.QApplication.translate("Dialog", "X Min", None, QtGui.QApplication.UnicodeUTF8))
208204
self.label_4.setText(QtGui.QApplication.translate("Dialog", "Y Min", None, QtGui.QApplication.UnicodeUTF8))
209205
self.label_3.setText(QtGui.QApplication.translate("Dialog", "X Max", None, QtGui.QApplication.UnicodeUTF8))
@@ -212,8 +208,8 @@ def retranslateUi(self, Dialog):
212208
self.label_7.setText(QtGui.QApplication.translate("Dialog", "X", None, QtGui.QApplication.UnicodeUTF8))
213209
self.chkLock.setText(QtGui.QApplication.translate("Dialog", "Lock 1:1 ratio", None, QtGui.QApplication.UnicodeUTF8))
214210
self.label_8.setText(QtGui.QApplication.translate("Dialog", "Y", None, QtGui.QApplication.UnicodeUTF8))
215-
self.rdoPolygons.setText(QtGui.QApplication.translate("Dialog", "Output as polygons", None, QtGui.QApplication.UnicodeUTF8))
216-
self.rdoLines.setText(QtGui.QApplication.translate("Dialog", "Output as lines", None, QtGui.QApplication.UnicodeUTF8))
217-
self.label_2.setText(QtGui.QApplication.translate("Dialog", "Output Shapefile", None, QtGui.QApplication.UnicodeUTF8))
211+
self.rdoPolygons.setText(QtGui.QApplication.translate("Dialog", "Output grid as polygons", None, QtGui.QApplication.UnicodeUTF8))
212+
self.rdoLines.setText(QtGui.QApplication.translate("Dialog", "Output grid as lines", None, QtGui.QApplication.UnicodeUTF8))
213+
self.label_2.setText(QtGui.QApplication.translate("Dialog", "Output shapefile", None, QtGui.QApplication.UnicodeUTF8))
218214
self.toolOut.setText(QtGui.QApplication.translate("Dialog", "Browse", None, QtGui.QApplication.UnicodeUTF8))
219215

‎python/plugins/ftools/tools/frmVectorGrid.ui

Lines changed: 115 additions & 191 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<rect>
99
<x>0</x>
1010
<y>0</y>
11-
<width>374</width>
12-
<height>483</height>
11+
<width>369</width>
12+
<height>459</height>
1313
</rect>
1414
</property>
1515
<property name="windowTitle" >
@@ -18,101 +18,163 @@
1818
<property name="sizeGripEnabled" >
1919
<bool>true</bool>
2020
</property>
21-
<layout class="QGridLayout" name="gridLayout" >
21+
<layout class="QGridLayout" name="gridLayout_2" >
2222
<item row="0" column="0" colspan="2" >
2323
<widget class="QGroupBox" name="groupBox" >
2424
<property name="title" >
25-
<string>Grid Extent</string>
25+
<string>Grid extent</string>
2626
</property>
27-
<layout class="QGridLayout" >
28-
<item row="0" column="0" colspan="2" >
29-
<widget class="QRadioButton" name="rdoBoundary" >
30-
<property name="text" >
31-
<string>Input Boundary Layer</string>
27+
<layout class="QGridLayout" name="gridLayout" >
28+
<item row="1" column="0" >
29+
<spacer name="horizontalSpacer" >
30+
<property name="orientation" >
31+
<enum>Qt::Horizontal</enum>
3232
</property>
33-
<property name="checked" >
34-
<bool>true</bool>
33+
<property name="sizeHint" stdset="0" >
34+
<size>
35+
<width>80</width>
36+
<height>20</height>
37+
</size>
3538
</property>
36-
</widget>
37-
</item>
38-
<item row="1" column="0" colspan="2" >
39-
<widget class="QComboBox" name="inShape" />
39+
</spacer>
4040
</item>
41-
<item row="2" column="0" colspan="2" >
42-
<widget class="QRadioButton" name="rdoCoordinates" >
41+
<item row="1" column="1" colspan="2" >
42+
<widget class="QToolButton" name="btnUpdate" >
43+
<property name="minimumSize" >
44+
<size>
45+
<width>0</width>
46+
<height>30</height>
47+
</size>
48+
</property>
4349
<property name="text" >
44-
<string>Input Coordinates</string>
50+
<string>Update extents from layer</string>
4551
</property>
4652
</widget>
4753
</item>
48-
<item row="3" column="0" >
54+
<item row="1" column="3" >
55+
<spacer name="horizontalSpacer_2" >
56+
<property name="orientation" >
57+
<enum>Qt::Horizontal</enum>
58+
</property>
59+
<property name="sizeHint" stdset="0" >
60+
<size>
61+
<width>79</width>
62+
<height>20</height>
63+
</size>
64+
</property>
65+
</spacer>
66+
</item>
67+
<item row="2" column="0" colspan="2" >
4968
<layout class="QHBoxLayout" >
5069
<item>
5170
<widget class="QLabel" name="label" >
5271
<property name="enabled" >
53-
<bool>false</bool>
72+
<bool>true</bool>
5473
</property>
5574
<property name="text" >
5675
<string>X Min</string>
5776
</property>
5877
</widget>
5978
</item>
6079
<item>
61-
<widget class="QLineEdit" name="xMin" />
80+
<widget class="QLineEdit" name="xMin" >
81+
<property name="enabled" >
82+
<bool>true</bool>
83+
</property>
84+
<property name="inputMask" >
85+
<string/>
86+
</property>
87+
<property name="text" >
88+
<string/>
89+
</property>
90+
</widget>
6291
</item>
6392
</layout>
6493
</item>
65-
<item row="3" column="1" >
94+
<item row="2" column="2" colspan="2" >
6695
<layout class="QHBoxLayout" >
6796
<item>
6897
<widget class="QLabel" name="label_4" >
6998
<property name="enabled" >
70-
<bool>false</bool>
99+
<bool>true</bool>
71100
</property>
72101
<property name="text" >
73102
<string>Y Min</string>
74103
</property>
75104
</widget>
76105
</item>
77106
<item>
78-
<widget class="QLineEdit" name="yMin" />
107+
<widget class="QLineEdit" name="yMin" >
108+
<property name="enabled" >
109+
<bool>true</bool>
110+
</property>
111+
<property name="inputMask" >
112+
<string/>
113+
</property>
114+
<property name="text" >
115+
<string/>
116+
</property>
117+
</widget>
79118
</item>
80119
</layout>
81120
</item>
82-
<item row="4" column="0" >
121+
<item row="3" column="0" colspan="2" >
83122
<layout class="QHBoxLayout" >
84123
<item>
85124
<widget class="QLabel" name="label_3" >
86125
<property name="enabled" >
87-
<bool>false</bool>
126+
<bool>true</bool>
88127
</property>
89128
<property name="text" >
90129
<string>X Max</string>
91130
</property>
92131
</widget>
93132
</item>
94133
<item>
95-
<widget class="QLineEdit" name="xMax" />
134+
<widget class="QLineEdit" name="xMax" >
135+
<property name="enabled" >
136+
<bool>true</bool>
137+
</property>
138+
<property name="inputMask" >
139+
<string/>
140+
</property>
141+
<property name="text" >
142+
<string/>
143+
</property>
144+
</widget>
96145
</item>
97146
</layout>
98147
</item>
99-
<item row="4" column="1" >
148+
<item row="3" column="2" colspan="2" >
100149
<layout class="QHBoxLayout" >
101150
<item>
102151
<widget class="QLabel" name="label_5" >
103152
<property name="enabled" >
104-
<bool>false</bool>
153+
<bool>true</bool>
105154
</property>
106155
<property name="text" >
107156
<string>Y Max</string>
108157
</property>
109158
</widget>
110159
</item>
111160
<item>
112-
<widget class="QLineEdit" name="yMax" />
161+
<widget class="QLineEdit" name="yMax" >
162+
<property name="enabled" >
163+
<bool>true</bool>
164+
</property>
165+
<property name="inputMask" >
166+
<string/>
167+
</property>
168+
<property name="text" >
169+
<string/>
170+
</property>
171+
</widget>
113172
</item>
114173
</layout>
115174
</item>
175+
<item row="0" column="0" colspan="4" >
176+
<widget class="QComboBox" name="inShape" />
177+
</item>
116178
</layout>
117179
</widget>
118180
</item>
@@ -151,7 +213,7 @@
151213
<double>0.000100000000000</double>
152214
</property>
153215
<property name="maximum" >
154-
<double>9999.000000000000000</double>
216+
<double>999999999.000000000000000</double>
155217
</property>
156218
<property name="singleStep" >
157219
<double>0.000100000000000</double>
@@ -216,7 +278,7 @@
216278
<double>0.000100000000000</double>
217279
</property>
218280
<property name="maximum" >
219-
<double>9999.000000000000000</double>
281+
<double>999999999.000000000000000</double>
220282
</property>
221283
<property name="singleStep" >
222284
<double>0.000100000000000</double>
@@ -226,7 +288,7 @@
226288
<item row="2" column="0" colspan="3" >
227289
<widget class="QRadioButton" name="rdoPolygons" >
228290
<property name="text" >
229-
<string>Output as polygons</string>
291+
<string>Output grid as polygons</string>
230292
</property>
231293
<property name="checked" >
232294
<bool>true</bool>
@@ -236,7 +298,7 @@
236298
<item row="3" column="0" colspan="3" >
237299
<widget class="QRadioButton" name="rdoLines" >
238300
<property name="text" >
239-
<string>Output as lines</string>
301+
<string>Output grid as lines</string>
240302
</property>
241303
</widget>
242304
</item>
@@ -252,7 +314,7 @@
252314
</sizepolicy>
253315
</property>
254316
<property name="text" >
255-
<string>Output Shapefile</string>
317+
<string>Output shapefile</string>
256318
</property>
257319
</widget>
258320
</item>
@@ -298,6 +360,12 @@
298360
</widget>
299361
</item>
300362
</layout>
363+
<zorder>groupBox</zorder>
364+
<zorder>gridBox</zorder>
365+
<zorder>label_2</zorder>
366+
<zorder>progressBar</zorder>
367+
<zorder>buttonBox_2</zorder>
368+
<zorder>inShape</zorder>
301369
</widget>
302370
<resources/>
303371
<connections>
@@ -308,8 +376,8 @@
308376
<slot>accept()</slot>
309377
<hints>
310378
<hint type="sourcelabel" >
311-
<x>142</x>
312-
<y>444</y>
379+
<x>330</x>
380+
<y>449</y>
313381
</hint>
314382
<hint type="destinationlabel" >
315383
<x>215</x>
@@ -324,172 +392,28 @@
324392
<slot>close()</slot>
325393
<hints>
326394
<hint type="sourcelabel" >
327-
<x>68</x>
328-
<y>444</y>
395+
<x>256</x>
396+
<y>449</y>
329397
</hint>
330398
<hint type="destinationlabel" >
331399
<x>132</x>
332400
<y>239</y>
333401
</hint>
334402
</hints>
335403
</connection>
336-
<connection>
337-
<sender>rdoBoundary</sender>
338-
<signal>toggled(bool)</signal>
339-
<receiver>inShape</receiver>
340-
<slot>setEnabled(bool)</slot>
341-
<hints>
342-
<hint type="sourcelabel" >
343-
<x>125</x>
344-
<y>59</y>
345-
</hint>
346-
<hint type="destinationlabel" >
347-
<x>123</x>
348-
<y>89</y>
349-
</hint>
350-
</hints>
351-
</connection>
352-
<connection>
353-
<sender>rdoCoordinates</sender>
354-
<signal>toggled(bool)</signal>
355-
<receiver>xMin</receiver>
356-
<slot>setEnabled(bool)</slot>
357-
<hints>
358-
<hint type="sourcelabel" >
359-
<x>57</x>
360-
<y>120</y>
361-
</hint>
362-
<hint type="destinationlabel" >
363-
<x>118</x>
364-
<y>151</y>
365-
</hint>
366-
</hints>
367-
</connection>
368-
<connection>
369-
<sender>rdoCoordinates</sender>
370-
<signal>toggled(bool)</signal>
371-
<receiver>xMax</receiver>
372-
<slot>setEnabled(bool)</slot>
373-
<hints>
374-
<hint type="sourcelabel" >
375-
<x>39</x>
376-
<y>120</y>
377-
</hint>
378-
<hint type="destinationlabel" >
379-
<x>132</x>
380-
<y>183</y>
381-
</hint>
382-
</hints>
383-
</connection>
384-
<connection>
385-
<sender>rdoCoordinates</sender>
386-
<signal>toggled(bool)</signal>
387-
<receiver>yMin</receiver>
388-
<slot>setEnabled(bool)</slot>
389-
<hints>
390-
<hint type="sourcelabel" >
391-
<x>102</x>
392-
<y>120</y>
393-
</hint>
394-
<hint type="destinationlabel" >
395-
<x>351</x>
396-
<y>151</y>
397-
</hint>
398-
</hints>
399-
</connection>
400-
<connection>
401-
<sender>rdoCoordinates</sender>
402-
<signal>toggled(bool)</signal>
403-
<receiver>yMax</receiver>
404-
<slot>setEnabled(bool)</slot>
405-
<hints>
406-
<hint type="sourcelabel" >
407-
<x>78</x>
408-
<y>120</y>
409-
</hint>
410-
<hint type="destinationlabel" >
411-
<x>351</x>
412-
<y>183</y>
413-
</hint>
414-
</hints>
415-
</connection>
416-
<connection>
417-
<sender>rdoCoordinates</sender>
418-
<signal>toggled(bool)</signal>
419-
<receiver>label</receiver>
420-
<slot>setEnabled(bool)</slot>
421-
<hints>
422-
<hint type="sourcelabel" >
423-
<x>26</x>
424-
<y>115</y>
425-
</hint>
426-
<hint type="destinationlabel" >
427-
<x>34</x>
428-
<y>143</y>
429-
</hint>
430-
</hints>
431-
</connection>
432-
<connection>
433-
<sender>rdoCoordinates</sender>
434-
<signal>toggled(bool)</signal>
435-
<receiver>label_3</receiver>
436-
<slot>setEnabled(bool)</slot>
437-
<hints>
438-
<hint type="sourcelabel" >
439-
<x>155</x>
440-
<y>111</y>
441-
</hint>
442-
<hint type="destinationlabel" >
443-
<x>52</x>
444-
<y>170</y>
445-
</hint>
446-
</hints>
447-
</connection>
448-
<connection>
449-
<sender>rdoCoordinates</sender>
450-
<signal>toggled(bool)</signal>
451-
<receiver>label_4</receiver>
452-
<slot>setEnabled(bool)</slot>
453-
<hints>
454-
<hint type="sourcelabel" >
455-
<x>222</x>
456-
<y>108</y>
457-
</hint>
458-
<hint type="destinationlabel" >
459-
<x>213</x>
460-
<y>136</y>
461-
</hint>
462-
</hints>
463-
</connection>
464-
<connection>
465-
<sender>rdoCoordinates</sender>
466-
<signal>toggled(bool)</signal>
467-
<receiver>label_5</receiver>
468-
<slot>setEnabled(bool)</slot>
469-
<hints>
470-
<hint type="sourcelabel" >
471-
<x>257</x>
472-
<y>119</y>
473-
</hint>
474-
<hint type="destinationlabel" >
475-
<x>210</x>
476-
<y>174</y>
477-
</hint>
478-
</hints>
479-
</connection>
480404
<connection>
481405
<sender>chkLock</sender>
482406
<signal>clicked(bool)</signal>
483407
<receiver>spnY</receiver>
484408
<slot>setDisabled(bool)</slot>
485409
<hints>
486410
<hint type="sourcelabel" >
487-
<x>264</x>
488-
<y>268</y>
411+
<x>279</x>
412+
<y>244</y>
489413
</hint>
490414
<hint type="destinationlabel" >
491-
<x>158</x>
492-
<y>272</y>
415+
<x>164</x>
416+
<y>280</y>
493417
</hint>
494418
</hints>
495419
</connection>
@@ -500,12 +424,12 @@
500424
<slot>setDisabled(bool)</slot>
501425
<hints>
502426
<hint type="sourcelabel" >
503-
<x>248</x>
504-
<y>256</y>
427+
<x>302</x>
428+
<y>261</y>
505429
</hint>
506430
<hint type="destinationlabel" >
507-
<x>90</x>
508-
<y>275</y>
431+
<x>73</x>
432+
<y>280</y>
509433
</hint>
510434
</hints>
511435
</connection>

0 commit comments

Comments
 (0)
Please sign in to comment.