-
Notifications
You must be signed in to change notification settings - Fork 0
/
osm_data_dialog_base.py
288 lines (280 loc) · 18.2 KB
/
osm_data_dialog_base.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'osm_data_dialog_base.ui'
#
# Created by: PyQt4 UI code generator 4.11.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_OSMDataDialogBase(object):
def setupUi(self, OSMDataDialogBase):
OSMDataDialogBase.setObjectName(_fromUtf8("OSMDataDialogBase"))
OSMDataDialogBase.resize(659, 805)
self.scrollArea = QtGui.QScrollArea(OSMDataDialogBase)
self.scrollArea.setGeometry(QtCore.QRect(10, 10, 626, 787))
self.scrollArea.setFrameShape(QtGui.QFrame.NoFrame)
self.scrollArea.setFrameShadow(QtGui.QFrame.Plain)
self.scrollArea.setWidgetResizable(True)
self.scrollArea.setObjectName(_fromUtf8("scrollArea"))
self.scrollAreaWidgetContents = QtGui.QWidget()
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 626, 787))
self.scrollAreaWidgetContents.setObjectName(_fromUtf8("scrollAreaWidgetContents"))
self.verticalLayout = QtGui.QVBoxLayout(self.scrollAreaWidgetContents)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.horizontalLayout_4 = QtGui.QHBoxLayout()
self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4"))
self.pushButton_mapFeatures = QtGui.QPushButton(self.scrollAreaWidgetContents)
self.pushButton_mapFeatures.setObjectName(_fromUtf8("pushButton_mapFeatures"))
self.horizontalLayout_4.addWidget(self.pushButton_mapFeatures)
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout_4.addItem(spacerItem)
self.buttonBox = QtGui.QDialogButtonBox(self.scrollAreaWidgetContents)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Reset)
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
self.horizontalLayout_4.addWidget(self.buttonBox)
self.verticalLayout.addLayout(self.horizontalLayout_4)
self.formLayout = QtGui.QFormLayout()
self.formLayout.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow)
self.formLayout.setObjectName(_fromUtf8("formLayout"))
self.label = QtGui.QLabel(self.scrollAreaWidgetContents)
self.label.setObjectName(_fromUtf8("label"))
self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.label)
self.comboBox_key = QtGui.QComboBox(self.scrollAreaWidgetContents)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.comboBox_key.sizePolicy().hasHeightForWidth())
self.comboBox_key.setSizePolicy(sizePolicy)
self.comboBox_key.setEditable(True)
self.comboBox_key.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
self.comboBox_key.setObjectName(_fromUtf8("comboBox_key"))
self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.comboBox_key)
self.comboBox_value = QtGui.QComboBox(self.scrollAreaWidgetContents)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.comboBox_value.sizePolicy().hasHeightForWidth())
self.comboBox_value.setSizePolicy(sizePolicy)
self.comboBox_value.setEditable(True)
self.comboBox_value.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
self.comboBox_value.setObjectName(_fromUtf8("comboBox_value"))
self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.comboBox_value)
self.radioButton_place = QtGui.QRadioButton(self.scrollAreaWidgetContents)
self.radioButton_place.setText(_fromUtf8(""))
self.radioButton_place.setChecked(True)
self.radioButton_place.setObjectName(_fromUtf8("radioButton_place"))
self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.radioButton_place)
self.horizontalLayout_8 = QtGui.QHBoxLayout()
self.horizontalLayout_8.setObjectName(_fromUtf8("horizontalLayout_8"))
self.comboBox_in_around = QtGui.QComboBox(self.scrollAreaWidgetContents)
self.comboBox_in_around.setObjectName(_fromUtf8("comboBox_in_around"))
self.horizontalLayout_8.addWidget(self.comboBox_in_around)
self.lineEdit_nominatim = QtGui.QLineEdit(self.scrollAreaWidgetContents)
self.lineEdit_nominatim.setText(_fromUtf8(""))
self.lineEdit_nominatim.setObjectName(_fromUtf8("lineEdit_nominatim"))
self.horizontalLayout_8.addWidget(self.lineEdit_nominatim)
self.spinBox_distance_point = QtGui.QSpinBox(self.scrollAreaWidgetContents)
self.spinBox_distance_point.setMinimum(1)
self.spinBox_distance_point.setMaximum(999999999)
self.spinBox_distance_point.setSingleStep(100)
self.spinBox_distance_point.setProperty("value", 1000)
self.spinBox_distance_point.setObjectName(_fromUtf8("spinBox_distance_point"))
self.horizontalLayout_8.addWidget(self.spinBox_distance_point)
self.label_distance_point = QtGui.QLabel(self.scrollAreaWidgetContents)
self.label_distance_point.setText(_fromUtf8("m"))
self.label_distance_point.setObjectName(_fromUtf8("label_distance_point"))
self.horizontalLayout_8.addWidget(self.label_distance_point)
self.formLayout.setLayout(2, QtGui.QFormLayout.FieldRole, self.horizontalLayout_8)
self.radioButton_extentMapCanvas = QtGui.QRadioButton(self.scrollAreaWidgetContents)
self.radioButton_extentMapCanvas.setText(_fromUtf8(""))
self.radioButton_extentMapCanvas.setObjectName(_fromUtf8("radioButton_extentMapCanvas"))
self.formLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.radioButton_extentMapCanvas)
self.label_13 = QtGui.QLabel(self.scrollAreaWidgetContents)
self.label_13.setObjectName(_fromUtf8("label_13"))
self.formLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.label_13)
self.radioButton_extentLayer = QtGui.QRadioButton(self.scrollAreaWidgetContents)
self.radioButton_extentLayer.setText(_fromUtf8(""))
self.radioButton_extentLayer.setObjectName(_fromUtf8("radioButton_extentLayer"))
self.formLayout.setWidget(5, QtGui.QFormLayout.LabelRole, self.radioButton_extentLayer)
self.horizontalLayout_5 = QtGui.QHBoxLayout()
self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5"))
self.label_15 = QtGui.QLabel(self.scrollAreaWidgetContents)
self.label_15.setObjectName(_fromUtf8("label_15"))
self.horizontalLayout_5.addWidget(self.label_15)
self.comboBox_extentLayer = QgsMapLayerComboBox(self.scrollAreaWidgetContents)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.comboBox_extentLayer.sizePolicy().hasHeightForWidth())
self.comboBox_extentLayer.setSizePolicy(sizePolicy)
self.comboBox_extentLayer.setObjectName(_fromUtf8("comboBox_extentLayer"))
self.horizontalLayout_5.addWidget(self.comboBox_extentLayer)
self.formLayout.setLayout(5, QtGui.QFormLayout.FieldRole, self.horizontalLayout_5)
self.label_2 = QtGui.QLabel(self.scrollAreaWidgetContents)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.label_2)
self.verticalLayout.addLayout(self.formLayout)
self.groupBox = QgsCollapsibleGroupBox(self.scrollAreaWidgetContents)
self.groupBox.setChecked(False)
self.groupBox.setObjectName(_fromUtf8("groupBox"))
self.verticalLayout_2 = QtGui.QVBoxLayout(self.groupBox)
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
self.horizontalLayout_3 = QtGui.QHBoxLayout()
self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
self.formLayout_3 = QtGui.QFormLayout()
self.formLayout_3.setObjectName(_fromUtf8("formLayout_3"))
self.label_7 = QtGui.QLabel(self.groupBox)
self.label_7.setText(_fromUtf8("Node"))
self.label_7.setObjectName(_fromUtf8("label_7"))
self.formLayout_3.setWidget(0, QtGui.QFormLayout.LabelRole, self.label_7)
self.checkBox_node = QtGui.QCheckBox(self.groupBox)
self.checkBox_node.setText(_fromUtf8(""))
self.checkBox_node.setChecked(True)
self.checkBox_node.setObjectName(_fromUtf8("checkBox_node"))
self.formLayout_3.setWidget(0, QtGui.QFormLayout.FieldRole, self.checkBox_node)
self.label_8 = QtGui.QLabel(self.groupBox)
self.label_8.setText(_fromUtf8("Way"))
self.label_8.setObjectName(_fromUtf8("label_8"))
self.formLayout_3.setWidget(1, QtGui.QFormLayout.LabelRole, self.label_8)
self.checkBox_way = QtGui.QCheckBox(self.groupBox)
self.checkBox_way.setText(_fromUtf8(""))
self.checkBox_way.setChecked(True)
self.checkBox_way.setObjectName(_fromUtf8("checkBox_way"))
self.formLayout_3.setWidget(1, QtGui.QFormLayout.FieldRole, self.checkBox_way)
self.label_9 = QtGui.QLabel(self.groupBox)
self.label_9.setText(_fromUtf8("Relation"))
self.label_9.setObjectName(_fromUtf8("label_9"))
self.formLayout_3.setWidget(2, QtGui.QFormLayout.LabelRole, self.label_9)
self.checkBox_relation = QtGui.QCheckBox(self.groupBox)
self.checkBox_relation.setText(_fromUtf8(""))
self.checkBox_relation.setChecked(True)
self.checkBox_relation.setObjectName(_fromUtf8("checkBox_relation"))
self.formLayout_3.setWidget(2, QtGui.QFormLayout.FieldRole, self.checkBox_relation)
self.horizontalLayout_3.addLayout(self.formLayout_3)
self.formLayout_4 = QtGui.QFormLayout()
self.formLayout_4.setObjectName(_fromUtf8("formLayout_4"))
self.label_10 = QtGui.QLabel(self.groupBox)
self.label_10.setText(_fromUtf8("Points"))
self.label_10.setObjectName(_fromUtf8("label_10"))
self.formLayout_4.setWidget(0, QtGui.QFormLayout.LabelRole, self.label_10)
self.checkBox_points = QtGui.QCheckBox(self.groupBox)
self.checkBox_points.setText(_fromUtf8(""))
self.checkBox_points.setChecked(True)
self.checkBox_points.setObjectName(_fromUtf8("checkBox_points"))
self.formLayout_4.setWidget(0, QtGui.QFormLayout.FieldRole, self.checkBox_points)
self.checkBox_lines = QtGui.QCheckBox(self.groupBox)
self.checkBox_lines.setText(_fromUtf8(""))
self.checkBox_lines.setChecked(True)
self.checkBox_lines.setObjectName(_fromUtf8("checkBox_lines"))
self.formLayout_4.setWidget(1, QtGui.QFormLayout.FieldRole, self.checkBox_lines)
self.label_11 = QtGui.QLabel(self.groupBox)
self.label_11.setText(_fromUtf8("Lines"))
self.label_11.setObjectName(_fromUtf8("label_11"))
self.formLayout_4.setWidget(1, QtGui.QFormLayout.LabelRole, self.label_11)
self.label_12 = QtGui.QLabel(self.groupBox)
self.label_12.setText(_fromUtf8("Multipolygons"))
self.label_12.setObjectName(_fromUtf8("label_12"))
self.formLayout_4.setWidget(3, QtGui.QFormLayout.LabelRole, self.label_12)
self.checkBox_multipolygons = QtGui.QCheckBox(self.groupBox)
self.checkBox_multipolygons.setText(_fromUtf8(""))
self.checkBox_multipolygons.setChecked(True)
self.checkBox_multipolygons.setObjectName(_fromUtf8("checkBox_multipolygons"))
self.formLayout_4.setWidget(3, QtGui.QFormLayout.FieldRole, self.checkBox_multipolygons)
self.label_14 = QtGui.QLabel(self.groupBox)
self.label_14.setText(_fromUtf8("Multilinestrings"))
self.label_14.setObjectName(_fromUtf8("label_14"))
self.formLayout_4.setWidget(2, QtGui.QFormLayout.LabelRole, self.label_14)
self.checkBox_multilinestrings = QtGui.QCheckBox(self.groupBox)
self.checkBox_multilinestrings.setText(_fromUtf8(""))
self.checkBox_multilinestrings.setChecked(True)
self.checkBox_multilinestrings.setObjectName(_fromUtf8("checkBox_multilinestrings"))
self.formLayout_4.setWidget(2, QtGui.QFormLayout.FieldRole, self.checkBox_multilinestrings)
self.horizontalLayout_3.addLayout(self.formLayout_4)
self.verticalLayout_2.addLayout(self.horizontalLayout_3)
self.formLayout_2 = QtGui.QFormLayout()
self.formLayout_2.setObjectName(_fromUtf8("formLayout_2"))
self.spinBox_timeout = QtGui.QSpinBox(self.groupBox)
self.spinBox_timeout.setButtonSymbols(QtGui.QAbstractSpinBox.UpDownArrows)
self.spinBox_timeout.setMinimum(25)
self.spinBox_timeout.setMaximum(2000)
self.spinBox_timeout.setSingleStep(25)
self.spinBox_timeout.setObjectName(_fromUtf8("spinBox_timeout"))
self.formLayout_2.setWidget(0, QtGui.QFormLayout.FieldRole, self.spinBox_timeout)
self.label_5 = QtGui.QLabel(self.groupBox)
self.label_5.setObjectName(_fromUtf8("label_5"))
self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, self.label_5)
self.label_4 = QtGui.QLabel(self.groupBox)
self.label_4.setObjectName(_fromUtf8("label_4"))
self.formLayout_2.setWidget(1, QtGui.QFormLayout.LabelRole, self.label_4)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.lineEdit_browseDir = QtGui.QLineEdit(self.groupBox)
self.lineEdit_browseDir.setObjectName(_fromUtf8("lineEdit_browseDir"))
self.horizontalLayout.addWidget(self.lineEdit_browseDir)
self.pushButton_browse_output_file = QtGui.QPushButton(self.groupBox)
self.pushButton_browse_output_file.setObjectName(_fromUtf8("pushButton_browse_output_file"))
self.horizontalLayout.addWidget(self.pushButton_browse_output_file)
self.formLayout_2.setLayout(1, QtGui.QFormLayout.FieldRole, self.horizontalLayout)
self.label_6 = QtGui.QLabel(self.groupBox)
self.label_6.setObjectName(_fromUtf8("label_6"))
self.formLayout_2.setWidget(2, QtGui.QFormLayout.LabelRole, self.label_6)
self.lineEdit_filePrefix = QtGui.QLineEdit(self.groupBox)
self.lineEdit_filePrefix.setObjectName(_fromUtf8("lineEdit_filePrefix"))
self.formLayout_2.setWidget(2, QtGui.QFormLayout.FieldRole, self.lineEdit_filePrefix)
self.verticalLayout_2.addLayout(self.formLayout_2)
self.verticalLayout.addWidget(self.groupBox)
self.horizontalLayout_2 = QtGui.QHBoxLayout()
self.horizontalLayout_2.setSizeConstraint(QtGui.QLayout.SetMinimumSize)
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.pushButton_runQuery = QtGui.QPushButton(self.scrollAreaWidgetContents)
self.pushButton_runQuery.setDefault(True)
self.pushButton_runQuery.setObjectName(_fromUtf8("pushButton_runQuery"))
self.horizontalLayout_2.addWidget(self.pushButton_runQuery)
self.verticalLayout.addLayout(self.horizontalLayout_2)
self.label_progress = QtGui.QLabel(self.scrollAreaWidgetContents)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_progress.sizePolicy().hasHeightForWidth())
self.label_progress.setSizePolicy(sizePolicy)
self.label_progress.setText(_fromUtf8("progress text"))
self.label_progress.setObjectName(_fromUtf8("label_progress"))
self.verticalLayout.addWidget(self.label_progress)
self.progressBar_execution = QtGui.QProgressBar(self.scrollAreaWidgetContents)
self.progressBar_execution.setProperty("value", 0)
self.progressBar_execution.setObjectName(_fromUtf8("progressBar_execution"))
self.verticalLayout.addWidget(self.progressBar_execution)
spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem1)
self.scrollArea.setWidget(self.scrollAreaWidgetContents)
self.retranslateUi(OSMDataDialogBase)
QtCore.QMetaObject.connectSlotsByName(OSMDataDialogBase)
def retranslateUi(self, OSMDataDialogBase):
OSMDataDialogBase.setWindowTitle(_translate("OSMDataDialogBase", "OSM Data", None))
self.pushButton_mapFeatures.setText(_translate("OSMDataDialogBase", "Aide avec clé/valeur", None))
self.label.setText(_translate("OSMDataDialogBase", "clé", None))
self.comboBox_in_around.setToolTip(_translate("OSMDataDialogBase", "\"In\" will search the first multipolygon relation, however \"Around\" will get the first OSM node.", None))
self.lineEdit_nominatim.setPlaceholderText(_translate("OSMDataDialogBase", "Un village, une ville, ...", None))
self.label_13.setText(_translate("OSMDataDialogBase", "Etendue du Maroc", None))
self.label_15.setText(_translate("OSMDataDialogBase", "Emprise d\'une couche", None))
self.label_2.setText(_translate("OSMDataDialogBase", "valeur", None))
self.groupBox.setTitle(_translate("OSMDataDialogBase", "Avancé", None))
self.label_5.setText(_translate("OSMDataDialogBase", "Temps max", None))
self.label_4.setText(_translate("OSMDataDialogBase", "Répertoire", None))
self.lineEdit_browseDir.setPlaceholderText(_translate("OSMDataDialogBase", "Enregistrer temporairement", None))
self.pushButton_browse_output_file.setText(_translate("OSMDataDialogBase", "Parcourir", None))
self.label_6.setText(_translate("OSMDataDialogBase", "Préfixe de fichier", None))
self.pushButton_runQuery.setText(_translate("OSMDataDialogBase", "Exécuter", None))
from qgis.gui import QgsCollapsibleGroupBox
from qgis.gui import QgsMapLayerComboBox