-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsingle_calc.py
301 lines (293 loc) · 18.6 KB
/
single_calc.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
289
290
291
292
293
294
295
296
297
298
299
300
301
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'single_calc.ui'
#
# Created: Fri Nov 21 19:03:18 2014
# by: PyQt4 UI code generator 4.10.2
#
# 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_SingleCalcDialog(object):
def setupUi(self, SingleCalcDialog):
SingleCalcDialog.setObjectName(_fromUtf8("SingleCalcDialog"))
SingleCalcDialog.resize(720, 463)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(SingleCalcDialog.sizePolicy().hasHeightForWidth())
SingleCalcDialog.setSizePolicy(sizePolicy)
SingleCalcDialog.setMinimumSize(QtCore.QSize(720, 463))
SingleCalcDialog.setMaximumSize(QtCore.QSize(720, 463))
self.RadioGroup = QtGui.QGroupBox(SingleCalcDialog)
self.RadioGroup.setGeometry(QtCore.QRect(10, 10, 141, 191))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.RadioGroup.sizePolicy().hasHeightForWidth())
self.RadioGroup.setSizePolicy(sizePolicy)
self.RadioGroup.setFlat(False)
self.RadioGroup.setCheckable(False)
self.RadioGroup.setObjectName(_fromUtf8("RadioGroup"))
self.OrientRadio = QtGui.QRadioButton(self.RadioGroup)
self.OrientRadio.setGeometry(QtCore.QRect(10, 30, 151, 17))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.OrientRadio.sizePolicy().hasHeightForWidth())
self.OrientRadio.setSizePolicy(sizePolicy)
self.OrientRadio.setObjectName(_fromUtf8("OrientRadio"))
self.radioButtonGroup = QtGui.QButtonGroup(SingleCalcDialog)
self.radioButtonGroup.setObjectName(_fromUtf8("radioButtonGroup"))
self.radioButtonGroup.addButton(self.OrientRadio)
self.RadialRadio = QtGui.QRadioButton(self.RadioGroup)
self.RadialRadio.setGeometry(QtCore.QRect(10, 60, 161, 17))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.RadialRadio.sizePolicy().hasHeightForWidth())
self.RadialRadio.setSizePolicy(sizePolicy)
self.RadialRadio.setObjectName(_fromUtf8("RadialRadio"))
self.radioButtonGroup.addButton(self.RadialRadio)
self.IntersectRadio = QtGui.QRadioButton(self.RadioGroup)
self.IntersectRadio.setGeometry(QtCore.QRect(10, 90, 151, 17))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.IntersectRadio.sizePolicy().hasHeightForWidth())
self.IntersectRadio.setSizePolicy(sizePolicy)
self.IntersectRadio.setObjectName(_fromUtf8("IntersectRadio"))
self.radioButtonGroup.addButton(self.IntersectRadio)
self.ResectionRadio = QtGui.QRadioButton(self.RadioGroup)
self.ResectionRadio.setGeometry(QtCore.QRect(10, 120, 141, 17))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.ResectionRadio.sizePolicy().hasHeightForWidth())
self.ResectionRadio.setSizePolicy(sizePolicy)
self.ResectionRadio.setObjectName(_fromUtf8("ResectionRadio"))
self.radioButtonGroup.addButton(self.ResectionRadio)
self.FreeRadio = QtGui.QRadioButton(self.RadioGroup)
self.FreeRadio.setGeometry(QtCore.QRect(10, 150, 141, 17))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.FreeRadio.sizePolicy().hasHeightForWidth())
self.FreeRadio.setSizePolicy(sizePolicy)
self.FreeRadio.setObjectName(_fromUtf8("FreeRadio"))
self.radioButtonGroup.addButton(self.FreeRadio)
self.PointsGroup = QtGui.QGroupBox(SingleCalcDialog)
self.PointsGroup.setGeometry(QtCore.QRect(330, 10, 381, 191))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.PointsGroup.sizePolicy().hasHeightForWidth())
self.PointsGroup.setSizePolicy(sizePolicy)
self.PointsGroup.setObjectName(_fromUtf8("PointsGroup"))
self.AddButton = QtGui.QPushButton(self.PointsGroup)
self.AddButton.setGeometry(QtCore.QRect(150, 50, 81, 23))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.AddButton.sizePolicy().hasHeightForWidth())
self.AddButton.setSizePolicy(sizePolicy)
self.AddButton.setObjectName(_fromUtf8("AddButton"))
self.AddAllButton = QtGui.QPushButton(self.PointsGroup)
self.AddAllButton.setGeometry(QtCore.QRect(150, 80, 81, 23))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.AddAllButton.sizePolicy().hasHeightForWidth())
self.AddAllButton.setSizePolicy(sizePolicy)
self.AddAllButton.setObjectName(_fromUtf8("AddAllButton"))
self.RemoveButton = QtGui.QPushButton(self.PointsGroup)
self.RemoveButton.setGeometry(QtCore.QRect(150, 120, 81, 23))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.RemoveButton.sizePolicy().hasHeightForWidth())
self.RemoveButton.setSizePolicy(sizePolicy)
self.RemoveButton.setObjectName(_fromUtf8("RemoveButton"))
self.RemoveAllButton = QtGui.QPushButton(self.PointsGroup)
self.RemoveAllButton.setGeometry(QtCore.QRect(150, 150, 81, 23))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.RemoveAllButton.sizePolicy().hasHeightForWidth())
self.RemoveAllButton.setSizePolicy(sizePolicy)
self.RemoveAllButton.setObjectName(_fromUtf8("RemoveAllButton"))
self.TargetPointsLabel = QtGui.QLabel(self.PointsGroup)
self.TargetPointsLabel.setGeometry(QtCore.QRect(10, 20, 121, 16))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.TargetPointsLabel.sizePolicy().hasHeightForWidth())
self.TargetPointsLabel.setSizePolicy(sizePolicy)
self.TargetPointsLabel.setObjectName(_fromUtf8("TargetPointsLabel"))
self.UsedPointsLabel = QtGui.QLabel(self.PointsGroup)
self.UsedPointsLabel.setGeometry(QtCore.QRect(250, 20, 121, 16))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.UsedPointsLabel.sizePolicy().hasHeightForWidth())
self.UsedPointsLabel.setSizePolicy(sizePolicy)
self.UsedPointsLabel.setObjectName(_fromUtf8("UsedPointsLabel"))
self.SourceList = QtGui.QListWidget(self.PointsGroup)
self.SourceList.setGeometry(QtCore.QRect(10, 40, 121, 141))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.SourceList.sizePolicy().hasHeightForWidth())
self.SourceList.setSizePolicy(sizePolicy)
self.SourceList.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
self.SourceList.setObjectName(_fromUtf8("SourceList"))
self.TargetList = QtGui.QListWidget(self.PointsGroup)
self.TargetList.setGeometry(QtCore.QRect(250, 40, 121, 141))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.TargetList.sizePolicy().hasHeightForWidth())
self.TargetList.setSizePolicy(sizePolicy)
self.TargetList.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
self.TargetList.setObjectName(_fromUtf8("TargetList"))
self.ResultGroup = QtGui.QGroupBox(SingleCalcDialog)
self.ResultGroup.setGeometry(QtCore.QRect(10, 210, 701, 201))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.ResultGroup.sizePolicy().hasHeightForWidth())
self.ResultGroup.setSizePolicy(sizePolicy)
self.ResultGroup.setObjectName(_fromUtf8("ResultGroup"))
self.ResultTextBrowser = QtGui.QTextBrowser(self.ResultGroup)
self.ResultTextBrowser.setGeometry(QtCore.QRect(10, 20, 681, 171))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.ResultTextBrowser.sizePolicy().hasHeightForWidth())
self.ResultTextBrowser.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily(_fromUtf8("Courier New"))
self.ResultTextBrowser.setFont(font)
self.ResultTextBrowser.setObjectName(_fromUtf8("ResultTextBrowser"))
self.StationGroup = QtGui.QGroupBox(SingleCalcDialog)
self.StationGroup.setGeometry(QtCore.QRect(170, 10, 141, 191))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.StationGroup.sizePolicy().hasHeightForWidth())
self.StationGroup.setSizePolicy(sizePolicy)
self.StationGroup.setObjectName(_fromUtf8("StationGroup"))
self.Station1Combo = QtGui.QComboBox(self.StationGroup)
self.Station1Combo.setGeometry(QtCore.QRect(10, 50, 121, 22))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.Station1Combo.sizePolicy().hasHeightForWidth())
self.Station1Combo.setSizePolicy(sizePolicy)
self.Station1Combo.setObjectName(_fromUtf8("Station1Combo"))
self.Station1Label = QtGui.QLabel(self.StationGroup)
self.Station1Label.setGeometry(QtCore.QRect(10, 20, 121, 16))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.Station1Label.sizePolicy().hasHeightForWidth())
self.Station1Label.setSizePolicy(sizePolicy)
self.Station1Label.setObjectName(_fromUtf8("Station1Label"))
self.Station2Label = QtGui.QLabel(self.StationGroup)
self.Station2Label.setGeometry(QtCore.QRect(10, 90, 111, 16))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.Station2Label.sizePolicy().hasHeightForWidth())
self.Station2Label.setSizePolicy(sizePolicy)
self.Station2Label.setObjectName(_fromUtf8("Station2Label"))
self.Station2Combo = QtGui.QComboBox(self.StationGroup)
self.Station2Combo.setGeometry(QtCore.QRect(10, 120, 121, 22))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.Station2Combo.sizePolicy().hasHeightForWidth())
self.Station2Combo.setSizePolicy(sizePolicy)
self.Station2Combo.setObjectName(_fromUtf8("Station2Combo"))
self.CalcButton = QtGui.QPushButton(SingleCalcDialog)
self.CalcButton.setGeometry(QtCore.QRect(420, 430, 81, 23))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.CalcButton.sizePolicy().hasHeightForWidth())
self.CalcButton.setSizePolicy(sizePolicy)
self.CalcButton.setObjectName(_fromUtf8("CalcButton"))
self.HelpButton = QtGui.QPushButton(SingleCalcDialog)
self.HelpButton.setGeometry(QtCore.QRect(20, 430, 81, 23))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.HelpButton.sizePolicy().hasHeightForWidth())
self.HelpButton.setSizePolicy(sizePolicy)
self.HelpButton.setObjectName(_fromUtf8("HelpButton"))
self.ResetButton = QtGui.QPushButton(SingleCalcDialog)
self.ResetButton.setGeometry(QtCore.QRect(520, 430, 81, 23))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.ResetButton.sizePolicy().hasHeightForWidth())
self.ResetButton.setSizePolicy(sizePolicy)
self.ResetButton.setObjectName(_fromUtf8("ResetButton"))
self.CloseButton = QtGui.QPushButton(SingleCalcDialog)
self.CloseButton.setGeometry(QtCore.QRect(620, 430, 81, 23))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.CloseButton.sizePolicy().hasHeightForWidth())
self.CloseButton.setSizePolicy(sizePolicy)
self.CloseButton.setObjectName(_fromUtf8("CloseButton"))
self.retranslateUi(SingleCalcDialog)
QtCore.QMetaObject.connectSlotsByName(SingleCalcDialog)
SingleCalcDialog.setTabOrder(self.OrientRadio, self.RadialRadio)
SingleCalcDialog.setTabOrder(self.RadialRadio, self.IntersectRadio)
SingleCalcDialog.setTabOrder(self.IntersectRadio, self.ResectionRadio)
SingleCalcDialog.setTabOrder(self.ResectionRadio, self.FreeRadio)
SingleCalcDialog.setTabOrder(self.FreeRadio, self.Station1Combo)
SingleCalcDialog.setTabOrder(self.Station1Combo, self.Station2Combo)
SingleCalcDialog.setTabOrder(self.Station2Combo, self.AddButton)
SingleCalcDialog.setTabOrder(self.AddButton, self.AddAllButton)
SingleCalcDialog.setTabOrder(self.AddAllButton, self.RemoveButton)
SingleCalcDialog.setTabOrder(self.RemoveButton, self.RemoveAllButton)
SingleCalcDialog.setTabOrder(self.RemoveAllButton, self.HelpButton)
SingleCalcDialog.setTabOrder(self.HelpButton, self.CalcButton)
SingleCalcDialog.setTabOrder(self.CalcButton, self.ResetButton)
SingleCalcDialog.setTabOrder(self.ResetButton, self.CloseButton)
def retranslateUi(self, SingleCalcDialog):
SingleCalcDialog.setWindowTitle(_translate("SingleCalcDialog", "Single Point Calculations", None))
self.RadioGroup.setTitle(_translate("SingleCalcDialog", "Calculation", None))
self.OrientRadio.setToolTip(_translate("SingleCalcDialog", "Calculate orientation angle on stations", None))
self.OrientRadio.setText(_translate("SingleCalcDialog", "Orientation", None))
self.RadialRadio.setText(_translate("SingleCalcDialog", "Radial Survey", None))
self.IntersectRadio.setText(_translate("SingleCalcDialog", "Intersection", None))
self.ResectionRadio.setText(_translate("SingleCalcDialog", "Resection", None))
self.FreeRadio.setText(_translate("SingleCalcDialog", "Free Station", None))
self.PointsGroup.setTitle(_translate("SingleCalcDialog", "Points", None))
self.AddButton.setText(_translate("SingleCalcDialog", "Add >", None))
self.AddAllButton.setText(_translate("SingleCalcDialog", "Add all", None))
self.RemoveButton.setText(_translate("SingleCalcDialog", "< Remove", None))
self.RemoveAllButton.setText(_translate("SingleCalcDialog", "Remove all", None))
self.TargetPointsLabel.setText(_translate("SingleCalcDialog", "Target Points", None))
self.UsedPointsLabel.setText(_translate("SingleCalcDialog", "Used Points", None))
self.ResultGroup.setTitle(_translate("SingleCalcDialog", "Result of Calculations", None))
self.StationGroup.setTitle(_translate("SingleCalcDialog", "Station", None))
self.Station1Label.setText(_translate("SingleCalcDialog", "Station (1)", None))
self.Station2Label.setText(_translate("SingleCalcDialog", "Station (2)", None))
self.CalcButton.setText(_translate("SingleCalcDialog", "Calculate", None))
self.HelpButton.setText(_translate("SingleCalcDialog", "Help", None))
self.ResetButton.setText(_translate("SingleCalcDialog", "Reset", None))
self.CloseButton.setText(_translate("SingleCalcDialog", "Close", None))