프로젝트

일반

사용자정보

개정판 c46ad1e0

IDc46ad1e0229b61e5727cb50fd08fd2777e1c06a7
상위 638dd2dd
하위 3c797715

김연진이(가) 약 5년 전에 추가함

issue #1053 : 장치의 Tag No. 표기

Change-Id: I36ca926ad7b3e2384f7adf337115693f2a509e79

차이점 보기:

HYTOS/HYTOS/SinglePacked.py
13 13
import SinglePacked_UI
14 14
import math
15 15

  
16

  
17
def is_not_blank(s):
18
    return bool(s and s.strip())
19

  
20

  
16 21
class QSinglePacked(QDialog):
17 22
    def __init__(self):
18 23
        QDialog.__init__(self)
19 24

  
20 25
        self.ui = SinglePacked_UI.Ui_SinglePackedDialog()
21 26
        self.ui.setupUi(self)
27
        self._item = None
22 28

  
23
        self.ui.lineEdit_N1_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N1_Pressure)) 
29
        self.ui.lineEdit_N1_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N1_Pressure))
24 30
        self.ui.lineEdit_N2_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N2_Pressure))
25 31
        self.ui.lineEdit_N3_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N3_Pressure))
26
        self.ui.lineEdit_N4_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N4_Pressure))        
27
        self.ui.lineEdit_N5_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N5_Pressure))        
28
        self.ui.lineEdit_N6_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N6_Pressure))        
29
        self.ui.lineEdit_N7_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N7_Pressure))        
32
        self.ui.lineEdit_N4_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N4_Pressure))
33
        self.ui.lineEdit_N5_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N5_Pressure))
34
        self.ui.lineEdit_N6_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N6_Pressure))
35
        self.ui.lineEdit_N7_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N7_Pressure))
30 36
        self.ui.lineEdit_N8_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N8_Pressure))
31 37
        self.ui.lineEdit_N9_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N9_Pressure))
32 38
        self.ui.lineEdit_N10_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N10_Pressure))
33 39

  
34
        self.ui.lineEdit_N1_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N1_Elevation)) 		
35
        self.ui.lineEdit_N2_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N2_Elevation))		
40
        self.ui.lineEdit_N1_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N1_Elevation))
41
        self.ui.lineEdit_N2_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N2_Elevation))
36 42
        self.ui.lineEdit_N3_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N3_Elevation))
37
        self.ui.lineEdit_N4_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N4_Elevation)) 
38
        self.ui.lineEdit_N5_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N5_Elevation)) 
39
        self.ui.lineEdit_N6_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N6_Elevation)) 
40
        self.ui.lineEdit_N7_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N7_Elevation)) 
43
        self.ui.lineEdit_N4_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N4_Elevation))
44
        self.ui.lineEdit_N5_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N5_Elevation))
45
        self.ui.lineEdit_N6_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N6_Elevation))
46
        self.ui.lineEdit_N7_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N7_Elevation))
41 47
        self.ui.lineEdit_N8_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N8_Elevation))
42
        self.ui.lineEdit_N9_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N9_Elevation)) 
48
        self.ui.lineEdit_N9_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N9_Elevation))
43 49
        self.ui.lineEdit_N10_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N10_Elevation))
44 50

  
45 51
        self.initialize()
46
        
47
        
48
    def showDialog(self, item):
52

  
53
    def show_dialog(self, item):
49 54
        self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
50 55
        self._item = item
51 56

  
52 57
        self.ui.lineEdit_TagNo.setFocus()
53
        self.set_controls(item)
58
        self.set_controls()
54 59
        self.load_data()
55 60

  
56 61
        return self.exec_()
......
66 71
        self.ui.label_Img_N7.setVisible(False)
67 72
        self.ui.label_Img_N8.setVisible(False)
68 73
        self.ui.label_Img_N9.setVisible(False)
69
        self.ui.label_Img_N10.setVisible(False)   
70
        
74
        self.ui.label_Img_N10.setVisible(False)
75

  
71 76
        self.ui.label_N1.setVisible(False)
72
        self.ui.lineEdit_N1_Pressure.setEnabled(False)                
77
        self.ui.lineEdit_N1_Pressure.setEnabled(False)
73 78
        self.ui.lineEdit_N1_Elevation.setEnabled(False)
74
        
79

  
75 80
        self.ui.label_N2.setVisible(False)
76
        self.ui.lineEdit_N2_Pressure.setEnabled(False)                
81
        self.ui.lineEdit_N2_Pressure.setEnabled(False)
77 82
        self.ui.lineEdit_N2_Elevation.setEnabled(False)
78
    
83

  
79 84
        self.ui.label_N3.setVisible(False)
80
        self.ui.lineEdit_N3_Pressure.setEnabled(False)                
85
        self.ui.lineEdit_N3_Pressure.setEnabled(False)
81 86
        self.ui.lineEdit_N3_Elevation.setEnabled(False)
82 87

  
83 88
        self.ui.label_N4.setVisible(False)
84
        self.ui.lineEdit_N4_Pressure.setEnabled(False)                
89
        self.ui.lineEdit_N4_Pressure.setEnabled(False)
85 90
        self.ui.lineEdit_N4_Elevation.setEnabled(False)
86 91

  
87 92
        self.ui.label_N5.setVisible(False)
88
        self.ui.lineEdit_N5_Pressure.setEnabled(False)                
93
        self.ui.lineEdit_N5_Pressure.setEnabled(False)
89 94
        self.ui.lineEdit_N5_Elevation.setEnabled(False)
90 95

  
91 96
        self.ui.label_N6.setVisible(False)
92
        self.ui.lineEdit_N6_Pressure.setEnabled(False)                
97
        self.ui.lineEdit_N6_Pressure.setEnabled(False)
93 98
        self.ui.lineEdit_N6_Elevation.setEnabled(False)
94 99

  
95 100
        self.ui.label_N7.setVisible(False)
96
        self.ui.lineEdit_N7_Pressure.setEnabled(False)                
101
        self.ui.lineEdit_N7_Pressure.setEnabled(False)
97 102
        self.ui.lineEdit_N7_Elevation.setEnabled(False)
98 103

  
99 104
        self.ui.label_N8.setVisible(False)
100
        self.ui.lineEdit_N8_Pressure.setEnabled(False)                
105
        self.ui.lineEdit_N8_Pressure.setEnabled(False)
101 106
        self.ui.lineEdit_N8_Elevation.setEnabled(False)
102 107

  
103 108
        self.ui.label_N9.setVisible(False)
104
        self.ui.lineEdit_N9_Pressure.setEnabled(False)                
109
        self.ui.lineEdit_N9_Pressure.setEnabled(False)
105 110
        self.ui.lineEdit_N9_Elevation.setEnabled(False)
106 111

  
107 112
        self.ui.label_N10.setVisible(False)
108
        self.ui.lineEdit_N10_Pressure.setEnabled(False)                
113
        self.ui.lineEdit_N10_Pressure.setEnabled(False)
109 114
        self.ui.lineEdit_N10_Elevation.setEnabled(False)
110
        
111
    def set_controls(self, item):    
115

  
116
    def set_controls(self):
112 117
        # To do : 이름으로 Control 찾아오기
113
        for connector in item.connectors:            
118
        for connector in self._item.connectors:
114 119
            index = connector._conn_index
115 120
            if connector.connectedItem:
116 121
                if index == 1:
117 122
                    self.ui.label_Img_N1.setVisible(True)
118 123
                    self.ui.label_N1.setVisible(True)
119
                    self.ui.lineEdit_N1_Pressure.setEnabled(True)                
124
                    self.ui.lineEdit_N1_Pressure.setEnabled(True)
120 125
                    self.ui.lineEdit_N1_Elevation.setEnabled(True)
121 126
                elif index == 2:
122 127
                    self.ui.label_Img_N2.setVisible(True)
123 128
                    self.ui.label_N2.setVisible(True)
124
                    self.ui.lineEdit_N2_Pressure.setEnabled(True)                
129
                    self.ui.lineEdit_N2_Pressure.setEnabled(True)
125 130
                    self.ui.lineEdit_N2_Elevation.setEnabled(True)
126 131
                elif index == 3:
127 132
                    self.ui.label_Img_N3.setVisible(True)
128 133
                    self.ui.label_N3.setVisible(True)
129
                    self.ui.lineEdit_N3_Pressure.setEnabled(True)                
134
                    self.ui.lineEdit_N3_Pressure.setEnabled(True)
130 135
                    self.ui.lineEdit_N3_Elevation.setEnabled(True)
131 136
                elif index == 4:
132 137
                    self.ui.label_Img_N4.setVisible(True)
133 138
                    self.ui.label_N4.setVisible(True)
134
                    self.ui.lineEdit_N4_Pressure.setEnabled(True)                
139
                    self.ui.lineEdit_N4_Pressure.setEnabled(True)
135 140
                    self.ui.lineEdit_N4_Elevation.setEnabled(True)
136 141
                elif index == 5:
137 142
                    self.ui.label_Img_N5.setVisible(True)
138 143
                    self.ui.label_N5.setVisible(True)
139
                    self.ui.lineEdit_N5_Pressure.setEnabled(True)                
140
                    self.ui.lineEdit_N5_Elevation.setEnabled(True)                    
144
                    self.ui.lineEdit_N5_Pressure.setEnabled(True)
145
                    self.ui.lineEdit_N5_Elevation.setEnabled(True)
141 146
                elif index == 6:
142 147
                    self.ui.label_Img_N6.setVisible(True)
143 148
                    self.ui.label_N6.setVisible(True)
144
                    self.ui.lineEdit_N6_Pressure.setEnabled(True)                
145
                    self.ui.lineEdit_N6_Elevation.setEnabled(True)  
149
                    self.ui.lineEdit_N6_Pressure.setEnabled(True)
150
                    self.ui.lineEdit_N6_Elevation.setEnabled(True)
146 151
                elif index == 7:
147 152
                    self.ui.label_Img_N7.setVisible(True)
148 153
                    self.ui.label_N7.setVisible(True)
149
                    self.ui.lineEdit_N7_Pressure.setEnabled(True)                
150
                    self.ui.lineEdit_N7_Elevation.setEnabled(True)                    
154
                    self.ui.lineEdit_N7_Pressure.setEnabled(True)
155
                    self.ui.lineEdit_N7_Elevation.setEnabled(True)
151 156
                elif index == 8:
152 157
                    self.ui.label_Img_N8.setVisible(True)
153 158
                    self.ui.label_N8.setVisible(True)
154
                    self.ui.lineEdit_N8_Pressure.setEnabled(True)                
155
                    self.ui.lineEdit_N8_Elevation.setEnabled(True)  
159
                    self.ui.lineEdit_N8_Pressure.setEnabled(True)
160
                    self.ui.lineEdit_N8_Elevation.setEnabled(True)
156 161
                elif index == 9:
157 162
                    self.ui.label_Img_N9.setVisible(True)
158 163
                    self.ui.label_N9.setVisible(True)
159
                    self.ui.lineEdit_N9_Pressure.setEnabled(True)                
160
                    self.ui.lineEdit_N9_Elevation.setEnabled(True)  
164
                    self.ui.lineEdit_N9_Pressure.setEnabled(True)
165
                    self.ui.lineEdit_N9_Elevation.setEnabled(True)
161 166
                elif index == 10:
162 167
                    self.ui.label_Img_N10.setVisible(True)
163 168
                    self.ui.label_N10.setVisible(True)
164
                    self.ui.lineEdit_N10_Pressure.setEnabled(True)                
165
                    self.ui.lineEdit_N10_Elevation.setEnabled(True)  
166
                
169
                    self.ui.lineEdit_N10_Pressure.setEnabled(True)
170
                    self.ui.lineEdit_N10_Elevation.setEnabled(True)
171

  
167 172
    def load_data(self):
168 173
        """ load tag no and nozzle data """
169 174
        from Drawing import Drawing
170
        
175
        self.ui.lineEdit_TagNo.setText(self._item.tag_no)
176

  
171 177
        appDocData = AppDocData.instance()
172
        drawing = appDocData.activeDrawing    
178
        drawing = appDocData.activeDrawing
173 179
        if drawing:
174 180
            for attr in drawing.attrs:
175 181
                if attr[0] == 'Units':
......
179 185
        for connector in self._item.connectors:
180 186
            index = connector._conn_index
181 187
            if connector.data:
182
                pressure = connector.data.pressure                                
188
                pressure = connector.data.pressure
183 189
                if pressure:
184 190
                    if index == 1:
185 191
                        self.ui.lineEdit_N1_Pressure.setText(str(pressure))
......
190 196
                    elif index == 4:
191 197
                        self.ui.lineEdit_N4_Pressure.setText(str(pressure))
192 198
                    elif index == 5:
193
                        self.ui.lineEdit_N5_Pressure.setText(str(pressure))  
199
                        self.ui.lineEdit_N5_Pressure.setText(str(pressure))
194 200
                    elif index == 6:
195 201
                        self.ui.lineEdit_N6_Pressure.setText(str(pressure))
196 202
                    elif index == 7:
197
                        self.ui.lineEdit_N7_Pressure.setText(str(pressure))              
203
                        self.ui.lineEdit_N7_Pressure.setText(str(pressure))
198 204
                    elif index == 8:
199 205
                        self.ui.lineEdit_N8_Pressure.setText(str(pressure))
200 206
                    elif index == 9:
201
                        self.ui.lineEdit_N9_Pressure.setText(str(pressure))              
207
                        self.ui.lineEdit_N9_Pressure.setText(str(pressure))
202 208
                    elif index == 10:
203 209
                        self.ui.lineEdit_N10_Pressure.setText(str(pressure))
204 210

  
......
213 219
                    elif index == 4:
214 220
                        self.ui.lineEdit_N4_Elevation.setText(str(elevation))
215 221
                    elif index == 5:
216
                        self.ui.lineEdit_N5_Elevation.setText(str(elevation))  
222
                        self.ui.lineEdit_N5_Elevation.setText(str(elevation))
217 223
                    elif index == 6:
218 224
                        self.ui.lineEdit_N6_Elevation.setText(str(elevation))
219 225
                    elif index == 7:
220
                        self.ui.lineEdit_N7_Elevation.setText(str(elevation))              
226
                        self.ui.lineEdit_N7_Elevation.setText(str(elevation))
221 227
                    elif index == 8:
222 228
                        self.ui.lineEdit_N8_Elevation.setText(str(elevation))
223 229
                    elif index == 9:
224
                        self.ui.lineEdit_N9_Elevation.setText(str(elevation))              
230
                        self.ui.lineEdit_N9_Elevation.setText(str(elevation))
225 231
                    elif index == 10:
226 232
                        self.ui.lineEdit_N10_Elevation.setText(str(elevation))
227 233

  
228 234
    def accept(self):
229 235
        """ set tag no and nozzle data """
230 236
        from EngineeringConnectorItem import NozzleData
237
        tag_no = self.ui.lineEdit_TagNo.text()
231 238

  
232
        for connector in self._item.connectors:
233
            index = connector._conn_index
234
            if not connector.data: 
235
                connector.data = NozzleData()
236

  
237
            if index == 1:
238
                pressure = self.ui.lineEdit_N1_Pressure.text()
239
                if pressure:
240
                    connector.data.pressure = float(pressure)    
241
                else: 
242
                    connector.data.pressure = None
243

  
244
                elevation = self.ui.lineEdit_N1_Elevation.text()
245
                if elevation:
246
                    connector.data.elevation = float(elevation)  
247
                else:
248
                    connector.data.elevation = None
249
            elif index == 2:
250
                pressure = self.ui.lineEdit_N2_Pressure.text()
251
                if pressure:
252
                    connector.data.pressure = float(pressure)    
253
                else: 
254
                    connector.data.pressure = None
255

  
256
                elevation = self.ui.lineEdit_N2_Elevation.text()
257
                if elevation:
258
                    connector.data.elevation = float(elevation)  
259
                else:
260
                    connector.data.elevation = None
261
            elif index == 3:
262
                pressure = self.ui.lineEdit_N3_Pressure.text()
263
                if pressure:
264
                    connector.data.pressure = float(pressure)    
265
                else: 
266
                    connector.data.pressure = None
267

  
268
                elevation = self.ui.lineEdit_N3_Elevation.text()
269
                if elevation:
270
                    connector.data.elevation = float(elevation)  
271
                else:
272
                    connector.data.elevation = None
273
            elif index == 4:
274
                pressure = self.ui.lineEdit_N4_Pressure.text()
275
                if pressure:
276
                    connector.data.pressure = float(pressure)    
277
                else: 
278
                    connector.data.pressure = None
279

  
280
                elevation = self.ui.lineEdit_N4_Elevation.text()
281
                if elevation:
282
                    connector.data.elevation = float(elevation)  
283
                else:
284
                    connector.data.elevation = None
285
            elif index == 5:
286
                pressure = self.ui.lineEdit_N5_Pressure.text()
287
                if pressure:
288
                    connector.data.pressure = float(pressure)    
289
                else: 
290
                    connector.data.pressure = None
291

  
292
                elevation = self.ui.lineEdit_N5_Elevation.text()
293
                if elevation:
294
                    connector.data.elevation = float(elevation)  
295
                else:
296
                    connector.data.elevation = None
297
            elif index == 6:
298
                pressure = self.ui.lineEdit_N6_Pressure.text()
299
                if pressure:
300
                    connector.data.pressure = float(pressure)    
301
                else: 
302
                    connector.data.pressure = None
303

  
304
                elevation = self.ui.lineEdit_N6_Elevation.text()
305
                if elevation:
306
                    connector.data.elevation = float(elevation)  
307
                else:
308
                    connector.data.elevation = None
309
            elif index == 7:
310
                pressure = self.ui.lineEdit_N7_Pressure.text()
311
                if pressure:
312
                    connector.data.pressure = float(pressure)    
313
                else: 
314
                    connector.data.pressure = None
315

  
316
                elevation = self.ui.lineEdit_N7_Elevation.text()
317
                if elevation:
318
                    connector.data.elevation = float(elevation)  
319
                else:
320
                    connector.data.elevation = None
321
            elif index == 8:
322
                pressure = self.ui.lineEdit_N8_Pressure.text()
323
                if pressure:
324
                    connector.data.pressure = float(pressure)    
325
                else: 
326
                    connector.data.pressure = None
239
        if is_not_blank(tag_no):
240
            self._item.tag_no = tag_no
241
            for connector in self._item.connectors:
242
                index = connector._conn_index
243
                if not connector.data:
244
                    connector.data = NozzleData()
327 245

  
328
                elevation = self.ui.lineEdit_N8_Elevation.text()
329
                if elevation:
330
                    connector.data.elevation = float(elevation)  
331
                else:
332
                    connector.data.elevation = None
333
            elif index == 9:
334
                pressure = self.ui.lineEdit_N9_Pressure.text()
335
                if pressure:
336
                    connector.data.pressure = float(pressure)    
337
                else: 
338
                    connector.data.pressure = None
339

  
340
                elevation = self.ui.lineEdit_N9_Elevation.text()
341
                if elevation:
342
                    connector.data.elevation = float(elevation)  
343
                else:
344
                    connector.data.elevation = None
345
            elif index == 10:
346
                pressure = self.ui.lineEdit_N10_Pressure.text()
347
                if pressure:
348
                    connector.data.pressure = float(pressure)    
349
                else: 
350
                    connector.data.pressure = None
351

  
352
                elevation = self.ui.lineEdit_N10_Elevation.text()
353
                if elevation:
354
                    connector.data.elevation = float(elevation)  
355
                else:
356
                    connector.data.elevation = None
357

  
358
        QDialog.accept(self)
246
                if index == 1:
247
                    pressure = self.ui.lineEdit_N1_Pressure.text()
248
                    if pressure:
249
                        connector.data.pressure = float(pressure)
250
                    else:
251
                        connector.data.pressure = None
252

  
253
                    elevation = self.ui.lineEdit_N1_Elevation.text()
254
                    if elevation:
255
                        connector.data.elevation = float(elevation)
256
                    else:
257
                        connector.data.elevation = None
258
                elif index == 2:
259
                    pressure = self.ui.lineEdit_N2_Pressure.text()
260
                    if pressure:
261
                        connector.data.pressure = float(pressure)
262
                    else:
263
                        connector.data.pressure = None
264

  
265
                    elevation = self.ui.lineEdit_N2_Elevation.text()
266
                    if elevation:
267
                        connector.data.elevation = float(elevation)
268
                    else:
269
                        connector.data.elevation = None
270
                elif index == 3:
271
                    pressure = self.ui.lineEdit_N3_Pressure.text()
272
                    if pressure:
273
                        connector.data.pressure = float(pressure)
274
                    else:
275
                        connector.data.pressure = None
276

  
277
                    elevation = self.ui.lineEdit_N3_Elevation.text()
278
                    if elevation:
279
                        connector.data.elevation = float(elevation)
280
                    else:
281
                        connector.data.elevation = None
282
                elif index == 4:
283
                    pressure = self.ui.lineEdit_N4_Pressure.text()
284
                    if pressure:
285
                        connector.data.pressure = float(pressure)
286
                    else:
287
                        connector.data.pressure = None
288

  
289
                    elevation = self.ui.lineEdit_N4_Elevation.text()
290
                    if elevation:
291
                        connector.data.elevation = float(elevation)
292
                    else:
293
                        connector.data.elevation = None
294
                elif index == 5:
295
                    pressure = self.ui.lineEdit_N5_Pressure.text()
296
                    if pressure:
297
                        connector.data.pressure = float(pressure)
298
                    else:
299
                        connector.data.pressure = None
300

  
301
                    elevation = self.ui.lineEdit_N5_Elevation.text()
302
                    if elevation:
303
                        connector.data.elevation = float(elevation)
304
                    else:
305
                        connector.data.elevation = None
306
                elif index == 6:
307
                    pressure = self.ui.lineEdit_N6_Pressure.text()
308
                    if pressure:
309
                        connector.data.pressure = float(pressure)
310
                    else:
311
                        connector.data.pressure = None
312

  
313
                    elevation = self.ui.lineEdit_N6_Elevation.text()
314
                    if elevation:
315
                        connector.data.elevation = float(elevation)
316
                    else:
317
                        connector.data.elevation = None
318
                elif index == 7:
319
                    pressure = self.ui.lineEdit_N7_Pressure.text()
320
                    if pressure:
321
                        connector.data.pressure = float(pressure)
322
                    else:
323
                        connector.data.pressure = None
324

  
325
                    elevation = self.ui.lineEdit_N7_Elevation.text()
326
                    if elevation:
327
                        connector.data.elevation = float(elevation)
328
                    else:
329
                        connector.data.elevation = None
330
                elif index == 8:
331
                    pressure = self.ui.lineEdit_N8_Pressure.text()
332
                    if pressure:
333
                        connector.data.pressure = float(pressure)
334
                    else:
335
                        connector.data.pressure = None
336

  
337
                    elevation = self.ui.lineEdit_N8_Elevation.text()
338
                    if elevation:
339
                        connector.data.elevation = float(elevation)
340
                    else:
341
                        connector.data.elevation = None
342
                elif index == 9:
343
                    pressure = self.ui.lineEdit_N9_Pressure.text()
344
                    if pressure:
345
                        connector.data.pressure = float(pressure)
346
                    else:
347
                        connector.data.pressure = None
348

  
349
                    elevation = self.ui.lineEdit_N9_Elevation.text()
350
                    if elevation:
351
                        connector.data.elevation = float(elevation)
352
                    else:
353
                        connector.data.elevation = None
354
                elif index == 10:
355
                    pressure = self.ui.lineEdit_N10_Pressure.text()
356
                    if pressure:
357
                        connector.data.pressure = float(pressure)
358
                    else:
359
                        connector.data.pressure = None
360

  
361
                    elevation = self.ui.lineEdit_N10_Elevation.text()
362
                    if elevation:
363
                        connector.data.elevation = float(elevation)
364
                    else:
365
                        connector.data.elevation = None
366

  
367
            QDialog.accept(self)
368
        else:
369
            QMessageBox.warning(self, self.tr('Notice'), self.tr('Please Input [Tag No.]'))
359 370

  
360 371
    def reject(self):
361
        QDialog.reject(self)
372
        QDialog.reject(self)

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)