-
Notifications
You must be signed in to change notification settings - Fork 0
/
sartopo_address_ui.py
266 lines (260 loc) · 14.4 KB
/
sartopo_address_ui.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'sartopo_address.ui'
#
# Created by: PyQt5 UI code generator 5.11.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(516, 157)
self.addrField = QtWidgets.QLineEdit(Dialog)
self.addrField.setGeometry(QtCore.QRect(88, 4, 404, 37))
font = QtGui.QFont()
font.setFamily("Segoe UI")
font.setPointSize(14)
self.addrField.setFont(font)
self.addrField.setObjectName("addrField")
self.latLonField = QtWidgets.QLineEdit(Dialog)
self.latLonField.setEnabled(True)
self.latLonField.setGeometry(QtCore.QRect(276, 48, 193, 22))
font = QtGui.QFont()
font.setFamily("Segoe UI")
self.latLonField.setFont(font)
self.latLonField.setFocusPolicy(QtCore.Qt.NoFocus)
self.latLonField.setStyleSheet("background:#f0f0f0;color:#666666")
self.latLonField.setDragEnabled(True)
self.latLonField.setReadOnly(True)
self.latLonField.setObjectName("latLonField")
self.label = QtWidgets.QLabel(Dialog)
self.label.setGeometry(QtCore.QRect(12, 13, 71, 20))
font = QtGui.QFont()
font.setPointSize(12)
self.label.setFont(font)
self.label.setObjectName("label")
self.locationCountLabel = QtWidgets.QLabel(Dialog)
self.locationCountLabel.setGeometry(QtCore.QRect(96, 49, 171, 20))
font = QtGui.QFont()
font.setFamily("Segoe UI")
font.setPointSize(8)
self.locationCountLabel.setFont(font)
self.locationCountLabel.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.locationCountLabel.setObjectName("locationCountLabel")
self.optionsButton = QtWidgets.QPushButton(Dialog)
self.optionsButton.setGeometry(QtCore.QRect(473, 44, 37, 37))
font = QtGui.QFont()
font.setPointSize(8)
self.optionsButton.setFont(font)
self.optionsButton.setFocusPolicy(QtCore.Qt.NoFocus)
self.optionsButton.setText("")
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/sartopo_address/options_icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.optionsButton.setIcon(icon)
self.optionsButton.setIconSize(QtCore.QSize(24, 24))
self.optionsButton.setObjectName("optionsButton")
self.markerSymbolComboBox = QtWidgets.QComboBox(Dialog)
self.markerSymbolComboBox.setEnabled(True)
self.markerSymbolComboBox.setGeometry(QtCore.QRect(92, 78, 245, 38))
font = QtGui.QFont()
font.setFamily("Segoe UI")
font.setPointSize(12)
self.markerSymbolComboBox.setFont(font)
self.markerSymbolComboBox.setMaxVisibleItems(20)
self.markerSymbolComboBox.setIconSize(QtCore.QSize(30, 30))
self.markerSymbolComboBox.setFrame(True)
self.markerSymbolComboBox.setObjectName("markerSymbolComboBox")
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/sartopo_address/sartopo_markers/dot.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.markerSymbolComboBox.addItem(icon1, "")
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/sartopo_address/sartopo_markers/assisted.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.markerSymbolComboBox.addItem(icon2, "")
icon3 = QtGui.QIcon()
icon3.addPixmap(QtGui.QPixmap(":/sartopo_address/sartopo_markers/evacuated.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.markerSymbolComboBox.addItem(icon3, "")
icon4 = QtGui.QIcon()
icon4.addPixmap(QtGui.QPixmap(":/sartopo_address/sartopo_markers/rescued.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.markerSymbolComboBox.addItem(icon4, "")
icon5 = QtGui.QIcon()
icon5.addPixmap(QtGui.QPixmap(":/sartopo_address/sartopo_markers/follow_up.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.markerSymbolComboBox.addItem(icon5, "")
icon6 = QtGui.QIcon()
icon6.addPixmap(QtGui.QPixmap(":/sartopo_address/sartopo_markers/animal_issue.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.markerSymbolComboBox.addItem(icon6, "")
icon7 = QtGui.QIcon()
icon7.addPixmap(QtGui.QPixmap(":/sartopo_address/sartopo_markers/shelter_in_place.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.markerSymbolComboBox.addItem(icon7, "")
icon8 = QtGui.QIcon()
icon8.addPixmap(QtGui.QPixmap(":/sartopo_address/sartopo_markers/structure_no_damage.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.markerSymbolComboBox.addItem(icon8, "")
icon9 = QtGui.QIcon()
icon9.addPixmap(QtGui.QPixmap(":/sartopo_address/sartopo_markers/structure_damaged.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.markerSymbolComboBox.addItem(icon9, "")
icon10 = QtGui.QIcon()
icon10.addPixmap(QtGui.QPixmap(":/sartopo_address/sartopo_markers/structure_failed.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.markerSymbolComboBox.addItem(icon10, "")
icon11 = QtGui.QIcon()
icon11.addPixmap(QtGui.QPixmap(":/sartopo_address/sartopo_markers/structure_destroyed.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.markerSymbolComboBox.addItem(icon11, "")
icon12 = QtGui.QIcon()
icon12.addPixmap(QtGui.QPixmap(":/sartopo_address/sartopo_markers/warning.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.markerSymbolComboBox.addItem(icon12, "")
icon13 = QtGui.QIcon()
icon13.addPixmap(QtGui.QPixmap(":/sartopo_address/sartopo_markers/route_blocked.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.markerSymbolComboBox.addItem(icon13, "")
self.linkIndicator = QtWidgets.QLineEdit(Dialog)
self.linkIndicator.setEnabled(False)
self.linkIndicator.setGeometry(QtCore.QRect(46, 44, 56, 28))
font = QtGui.QFont()
font.setPointSize(10)
self.linkIndicator.setFont(font)
self.linkIndicator.setFocusPolicy(QtCore.Qt.NoFocus)
self.linkIndicator.setAlignment(QtCore.Qt.AlignCenter)
self.linkIndicator.setObjectName("linkIndicator")
self.label_4 = QtWidgets.QLabel(Dialog)
self.label_4.setGeometry(QtCore.QRect(8, 49, 32, 18))
font = QtGui.QFont()
font.setFamily("Segoe UI")
font.setPointSize(9)
self.label_4.setFont(font)
self.label_4.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_4.setObjectName("label_4")
self.goButton = QtWidgets.QPushButton(Dialog)
self.goButton.setGeometry(QtCore.QRect(440, 85, 70, 64))
font = QtGui.QFont()
font.setFamily("Segoe UI")
font.setPointSize(24)
self.goButton.setFont(font)
self.goButton.setFocusPolicy(QtCore.Qt.NoFocus)
self.goButton.setObjectName("goButton")
self.modeComboBox = QtWidgets.QComboBox(Dialog)
self.modeComboBox.setEnabled(True)
self.modeComboBox.setGeometry(QtCore.QRect(11, 78, 74, 38))
font = QtGui.QFont()
font.setFamily("Segoe UI")
font.setPointSize(10)
self.modeComboBox.setFont(font)
self.modeComboBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.modeComboBox.setIconSize(QtCore.QSize(30, 30))
self.modeComboBox.setFrame(True)
self.modeComboBox.setObjectName("modeComboBox")
self.modeComboBox.addItem("")
self.modeComboBox.addItem("")
self.modeComboBox.addItem("")
self.existingMarkerComboBox = STSFeatureComboBox(Dialog)
self.existingMarkerComboBox.setEnabled(True)
self.existingMarkerComboBox.setGeometry(QtCore.QRect(92, 78, 245, 38))
font = QtGui.QFont()
font.setFamily("Segoe UI")
font.setPointSize(10)
self.existingMarkerComboBox.setFont(font)
self.existingMarkerComboBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.existingMarkerComboBox.setMaxVisibleItems(20)
self.existingMarkerComboBox.setIconSize(QtCore.QSize(30, 30))
self.existingMarkerComboBox.setFrame(True)
self.existingMarkerComboBox.setObjectName("existingMarkerComboBox")
self.existingMarkerComboBox.addItem("")
self.timestampField = QtWidgets.QLineEdit(Dialog)
self.timestampField.setGeometry(QtCore.QRect(343, 94, 91, 23))
font = QtGui.QFont()
font.setPointSize(10)
self.timestampField.setFont(font)
self.timestampField.setText("")
self.timestampField.setObjectName("timestampField")
self.timestampLabel = QtWidgets.QLabel(Dialog)
self.timestampLabel.setGeometry(QtCore.QRect(342, 72, 47, 22))
font = QtGui.QFont()
font.setFamily("Segoe UI")
font.setPointSize(9)
self.timestampLabel.setFont(font)
self.timestampLabel.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.timestampLabel.setObjectName("timestampLabel")
self.timestampCheckbox = QtWidgets.QCheckBox(Dialog)
self.timestampCheckbox.setGeometry(QtCore.QRect(405, 73, 30, 20))
self.timestampCheckbox.setFocusPolicy(QtCore.Qt.NoFocus)
self.timestampCheckbox.setText("")
self.timestampCheckbox.setIconSize(QtCore.QSize(16, 16))
self.timestampCheckbox.setChecked(True)
self.timestampCheckbox.setObjectName("timestampCheckbox")
self.clearAddressButton = QtWidgets.QPushButton(Dialog)
self.clearAddressButton.setGeometry(QtCore.QRect(490, 3, 20, 39))
self.clearAddressButton.setFocusPolicy(QtCore.Qt.NoFocus)
self.clearAddressButton.setText("")
icon14 = QtGui.QIcon()
icon14.addPixmap(QtGui.QPixmap(":/sartopo_address/tall_x_icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.clearAddressButton.setIcon(icon14)
self.clearAddressButton.setIconSize(QtCore.QSize(12, 30))
self.clearAddressButton.setObjectName("clearAddressButton")
self.folderComboBox = STSFeatureComboBox(Dialog)
self.folderComboBox.setEnabled(True)
self.folderComboBox.setGeometry(QtCore.QRect(55, 123, 185, 27))
font = QtGui.QFont()
font.setFamily("Segoe UI")
font.setPointSize(10)
self.folderComboBox.setFont(font)
self.folderComboBox.setFocusPolicy(QtCore.Qt.NoFocus)
self.folderComboBox.setEditable(False)
self.folderComboBox.setIconSize(QtCore.QSize(30, 30))
self.folderComboBox.setFrame(True)
self.folderComboBox.setObjectName("folderComboBox")
self.folderComboBox.addItem("")
self.commentField = QtWidgets.QLineEdit(Dialog)
self.commentField.setGeometry(QtCore.QRect(318, 125, 116, 25))
self.commentField.setObjectName("commentField")
self.label_5 = QtWidgets.QLabel(Dialog)
self.label_5.setGeometry(QtCore.QRect(244, 124, 71, 27))
font = QtGui.QFont()
font.setFamily("Segoe UI")
font.setPointSize(9)
self.label_5.setFont(font)
self.label_5.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_5.setObjectName("label_5")
self.folderLabel = QtWidgets.QLabel(Dialog)
self.folderLabel.setGeometry(QtCore.QRect(4, 125, 48, 25))
font = QtGui.QFont()
font.setFamily("Segoe UI")
font.setPointSize(9)
self.folderLabel.setFont(font)
self.folderLabel.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.folderLabel.setObjectName("folderLabel")
self.retranslateUi(Dialog)
self.addrField.editingFinished.connect(Dialog.lookupFromAddrField)
self.modeComboBox.currentIndexChanged['int'].connect(Dialog.modeChanged)
self.goButton.released.connect(Dialog.go)
self.clearAddressButton.released.connect(Dialog.clearAddress)
self.timestampCheckbox.released.connect(Dialog.timestampCheckboxCB)
self.existingMarkerComboBox.currentIndexChanged['int'].connect(Dialog.existingMarkerComboBoxCB)
self.markerSymbolComboBox.currentIndexChanged['int'].connect(Dialog.markerSymbolComboBoxCB)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "SARTopo Address Tool"))
self.latLonField.setPlaceholderText(_translate("Dialog", "Lat/Lon (D.d)"))
self.label.setText(_translate("Dialog", "Address"))
self.locationCountLabel.setText(_translate("Dialog", "0 Locations loaded"))
self.markerSymbolComboBox.setItemText(0, _translate("Dialog", "Default"))
self.markerSymbolComboBox.setItemText(1, _translate("Dialog", "Assisted"))
self.markerSymbolComboBox.setItemText(2, _translate("Dialog", "Evacuated"))
self.markerSymbolComboBox.setItemText(3, _translate("Dialog", "Rescued"))
self.markerSymbolComboBox.setItemText(4, _translate("Dialog", "Follow-up"))
self.markerSymbolComboBox.setItemText(5, _translate("Dialog", "Animal Issue"))
self.markerSymbolComboBox.setItemText(6, _translate("Dialog", "Shelter In Place"))
self.markerSymbolComboBox.setItemText(7, _translate("Dialog", "No Damage"))
self.markerSymbolComboBox.setItemText(8, _translate("Dialog", "Damaged"))
self.markerSymbolComboBox.setItemText(9, _translate("Dialog", "Failed"))
self.markerSymbolComboBox.setItemText(10, _translate("Dialog", "Destroyed"))
self.markerSymbolComboBox.setItemText(11, _translate("Dialog", "Warning"))
self.markerSymbolComboBox.setItemText(12, _translate("Dialog", "Route Blocked"))
self.label_4.setText(_translate("Dialog", "Map"))
self.goButton.setText(_translate("Dialog", "Go"))
self.modeComboBox.setItemText(0, _translate("Dialog", "Mode"))
self.modeComboBox.setItemText(1, _translate("Dialog", "Add"))
self.modeComboBox.setItemText(2, _translate("Dialog", "Move"))
self.existingMarkerComboBox.setItemText(0, _translate("Dialog", "Existing Marker"))
self.timestampLabel.setText(_translate("Dialog", "Time"))
self.folderComboBox.setItemText(0, _translate("Dialog", "Addresses"))
self.label_5.setText(_translate("Dialog", "Comment"))
self.folderLabel.setText(_translate("Dialog", "Folder"))
from STSFeatureComboBox import STSFeatureComboBox
import sartopo_address_rc