프로젝트

일반

사용자정보

개정판 24ea7edf

ID24ea7edf68aa7567924fd0c4524833b2b04bb965
상위 d21025cf
하위 09a565dd, bee1327f

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

issue #1053: - 기기의 데이타를 입력하고 로딩한다(모든 폼에 적용)

Change-Id: Iae177462cc3b0102ffa48576b688b24bc675c3c6

차이점 보기:

HYTOS/HYTOS/AirFinCooler.py
20 20

  
21 21
        self.ui = AirFinCooler_UI.Ui_AirFinCoolerDialog()
22 22
        self.ui.setupUi(self)
23
        self.ui.lineEdit_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Pressure))
23
        self.ui.lineEdit_Pressure_Drop.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Pressure_Drop))
24 24
        self.ui.lineEdit_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Elevation))
25 25
        self.initialize()
26 26

  
......
54 54

  
55 55
        matches = [connector.nozzle_data for connector in self._item.connectors if connector.nozzle_data]
56 56
        if matches:
57
            self.ui.lineEdit_Pressure.setText(str(matches[0].pressure))
58
            self.ui.lineEdit_Elevation.setText(str(matches[0].elevation))
57
            pressure_drop = matches[0].pressure_drop
58
            if pressure_drop:                
59
                self.ui.lineEdit_Pressure_Drop.setText(str(pressure_drop))
60

  
61
            elevation = matches[0].elevation
62
            if elevation:
63
                self.ui.lineEdit_Elevation.setText(str(elevation))
59 64

  
60 65
    def accept(self):
61 66
        """ set tag no and nozzle data """
62 67
        from EngineeringConnectorItem import NozzleData
63 68

  
64 69
        for connector in self._item.connectors:
65
            if not connector.nozzle_data: connector.nozzle_data = NozzleData()
66
            connector.nozzle_data.pressure = float(self.ui.lineEdit_Pressure.text())
67
            connector.nozzle_data.elevation = float(self.ui.lineEdit_Elevation.text())
70
            if not connector.nozzle_data: 
71
                connector.nozzle_data = NozzleData()
72

  
73
            pressure_drop = self.ui.lineEdit_Pressure_Drop.text()
74
            if pressure_drop:
75
                connector.nozzle_data.pressure_drop = float(pressure_drop)    
76
            else: 
77
                connector.nozzle_data.pressure_drop = None
78

  
79
            elevation = self.ui.lineEdit_Elevation.text()
80
            if elevation:
81
                connector.nozzle_data.elevation = float(elevation)  
82
            else:
83
                connector.nozzle_data.elevation = None
68 84

  
69 85
        QDialog.accept(self)
70 86

  
HYTOS/HYTOS/AirFinCooler_UI.py
60 60
        self.lineEdit_TagNo.setFont(font)
61 61
        self.lineEdit_TagNo.setAlignment(QtCore.Qt.AlignCenter)
62 62
        self.lineEdit_TagNo.setObjectName("lineEdit_TagNo")
63
        self.lineEdit_Pressure = QtWidgets.QLineEdit(self.groupBox)
64
        self.lineEdit_Pressure.setGeometry(QtCore.QRect(282, 59, 100, 21))
63
        self.lineEdit_Pressure_Drop = QtWidgets.QLineEdit(self.groupBox)
64
        self.lineEdit_Pressure_Drop.setGeometry(QtCore.QRect(282, 59, 100, 21))
65 65
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
66 66
        sizePolicy.setHorizontalStretch(0)
67 67
        sizePolicy.setVerticalStretch(0)
68
        sizePolicy.setHeightForWidth(self.lineEdit_Pressure.sizePolicy().hasHeightForWidth())
69
        self.lineEdit_Pressure.setSizePolicy(sizePolicy)
70
        self.lineEdit_Pressure.setMaximumSize(QtCore.QSize(100, 16777215))
68
        sizePolicy.setHeightForWidth(self.lineEdit_Pressure_Drop.sizePolicy().hasHeightForWidth())
69
        self.lineEdit_Pressure_Drop.setSizePolicy(sizePolicy)
70
        self.lineEdit_Pressure_Drop.setMaximumSize(QtCore.QSize(100, 16777215))
71 71
        font = QtGui.QFont()
72 72
        font.setBold(False)
73 73
        font.setWeight(50)
74
        self.lineEdit_Pressure.setFont(font)
75
        self.lineEdit_Pressure.setAlignment(QtCore.Qt.AlignCenter)
76
        self.lineEdit_Pressure.setObjectName("lineEdit_Pressure")
74
        self.lineEdit_Pressure_Drop.setFont(font)
75
        self.lineEdit_Pressure_Drop.setAlignment(QtCore.Qt.AlignCenter)
76
        self.lineEdit_Pressure_Drop.setObjectName("lineEdit_Pressure_Drop")
77 77
        self.label_3 = QtWidgets.QLabel(self.groupBox)
78 78
        self.label_3.setGeometry(QtCore.QRect(196, 59, 80, 16))
79 79
        self.label_3.setMinimumSize(QtCore.QSize(80, 0))
......
117 117
        self.label_ElevationUnit.setObjectName("label_ElevationUnit")
118 118
        self.label.raise_()
119 119
        self.lineEdit_TagNo.raise_()
120
        self.lineEdit_Pressure.raise_()
120
        self.lineEdit_Pressure_Drop.raise_()
121 121
        self.label_3.raise_()
122 122
        self.label_PressureUnit.raise_()
123 123
        self.label_5.raise_()
......
134 134
        self.buttonBox.accepted.connect(AirFinCoolerDialog.accept)
135 135
        self.buttonBox.rejected.connect(AirFinCoolerDialog.reject)
136 136
        QtCore.QMetaObject.connectSlotsByName(AirFinCoolerDialog)
137
        AirFinCoolerDialog.setTabOrder(self.lineEdit_TagNo, self.lineEdit_Pressure)
138
        AirFinCoolerDialog.setTabOrder(self.lineEdit_Pressure, self.lineEdit_Elevation)
137
        AirFinCoolerDialog.setTabOrder(self.lineEdit_TagNo, self.lineEdit_Pressure_Drop)
138
        AirFinCoolerDialog.setTabOrder(self.lineEdit_Pressure_Drop, self.lineEdit_Elevation)
139 139

  
140 140
    def retranslateUi(self, AirFinCoolerDialog):
141 141
        _translate = QtCore.QCoreApplication.translate
HYTOS/HYTOS/AppDocData.py
3276 3276
        with conn:
3277 3277
            conn.row_factory = sqlite3.Row
3278 3278
            cursor = conn.cursor()
3279
            sql = 'select Pressure, Elevation from Nozzles where Points_UID=?' 
3279
            sql = 'select Pressure, Pressure_Drop, Elevation, Over_Design_CV from Nozzles where Points_UID=?' 
3280 3280
            param = (uid, )
3281 3281
            cursor.execute(sql, param)
3282 3282
            rows = cursor.fetchall()
3283 3283
            if rows:
3284 3284
                res = NozzleData()
3285
                res.pressure = float(rows[0]['Pressure'])
3286
                res.elevation = float(rows[0]['Elevation'])
3287

  
3285
                if rows[0]['Pressure']:
3286
                    res.pressure = float(rows[0]['Pressure'])
3287
                if rows[0]['Pressure_Drop']:
3288
                    res.pressure_drop = float(rows[0]['Pressure_Drop'])
3289
                if rows[0]['Elevation']:
3290
                    res.elevation = float(rows[0]['Elevation'])
3291
                if rows[0]['Over_Design_CV']:
3292
                    res.over_design_cv = float(rows[0]['Over_Design_CV'])
3288 3293
        return res
3289 3294

  
3290 3295
    def getDrawingsUnitsByDrawingUID(self, uid):
HYTOS/HYTOS/Ball.py
20 20

  
21 21
        self.ui = Ball_UI.Ui_BallDialog()
22 22
        self.ui.setupUi(self)
23

  
24
        '''
25
        for index in range(1, 8):
26
            pressure = self.findChild(QtWidgets.QLineEdit, 'lineEdit_N{}_Pressure'.format(index))
27
            pressure.setValidator(QtGui.QDoubleValidator(pressure))
28

  
29
            elevation = self.findChild(QtWidgets.QLineEdit, 'lineEdit_N{}_Elevation'.format(index))
30
            elevation.setValidator(QtGui.QDoubleValidator(elevation))
31
        '''
32

  
33
        self.ui.lineEdit_N1_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N1_Pressure)) 
34
        self.ui.lineEdit_N2_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N2_Pressure))
35
        self.ui.lineEdit_N3_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N3_Pressure))
36
        self.ui.lineEdit_N4_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N4_Pressure))        
37
        self.ui.lineEdit_N5_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N5_Pressure))        
38
        self.ui.lineEdit_N6_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N6_Pressure))        
39
        self.ui.lineEdit_N7_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N7_Pressure))        
40
        self.ui.lineEdit_N8_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N8_Pressure))
41

  
42
        self.ui.lineEdit_N1_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N1_Elevation)) 		
43
        self.ui.lineEdit_N2_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N2_Elevation))		
44
        self.ui.lineEdit_N3_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N3_Elevation))
45
        self.ui.lineEdit_N4_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N4_Elevation)) 
46
        self.ui.lineEdit_N5_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N5_Elevation)) 
47
        self.ui.lineEdit_N6_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N6_Elevation)) 
48
        self.ui.lineEdit_N7_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N7_Elevation)) 
49
        self.ui.lineEdit_N8_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N8_Elevation))
50

  
23 51
        self.initialize()
24 52

  
25 53
    def showDialog(self, item):
26 54
        self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
55
        self._item = item
27 56

  
28 57
        self.ui.lineEdit_TagNo.setFocus()
29 58
        self.set_controls(item)
30
        self.load_units()
59
        self.load_data()
31 60

  
32 61
        self.exec_()
33 62

  
34
    def initialize(self):
35
        # To do : 이름으로 Control 찾아오기
63
    def initialize(self):        
64
        '''
65
        for index in range(1, 8):
66
            image = self.findChild(QtWidgets.QLabel, 'label_Img_N{}'.format(index))
67
            image.setVisible(False)
68

  
69
            nozzle = self.findChild(QtWidgets.QLabel, 'label_N{}'.format(index))
70
            nozzle.setVisible(False) 
71

  
72
            pressure = self.findChild(QtWidgets.QLineEdit, 'lineEdit_N{}_Pressure'.format(index))
73
            pressure.setEnabled(False) 
74

  
75
            elevation = self.findChild(QtWidgets.QLineEdit, 'lineEdit_N{}_Elevation'.format(index))
76
            elevation.setEnabled(False) 
77
        '''
78

  
36 79
        self.ui.label_Img_N1.setVisible(False)
37 80
        self.ui.label_Img_N2.setVisible(False)
38 81
        self.ui.label_Img_N3.setVisible(False)
......
40 83
        self.ui.label_Img_N5.setVisible(False)
41 84
        self.ui.label_Img_N6.setVisible(False)
42 85
        self.ui.label_Img_N7.setVisible(False)
43
        self.ui.label_Img_N8.setVisible(False)
44
        
86
        self.ui.label_Img_N8.setVisible(False)        
87

  
45 88
        self.ui.label_N1.setVisible(False)
46 89
        self.ui.lineEdit_N1_Pressure.setEnabled(False)                
47 90
        self.ui.lineEdit_N1_Elevation.setEnabled(False)
......
72 115

  
73 116
        self.ui.label_N8.setVisible(False)
74 117
        self.ui.lineEdit_N8_Pressure.setEnabled(False)                
75
        self.ui.lineEdit_N8_Elevation.setEnabled(False)
118
        self.ui.lineEdit_N8_Elevation.setEnabled(False)        
119
        
120

  
76 121

  
77 122
    def set_controls(self, item):    
78 123
        # To do : 이름으로 Control 찾아오기
......
120 165
                    self.ui.lineEdit_N8_Pressure.setEnabled(True)                
121 166
                    self.ui.lineEdit_N8_Elevation.setEnabled(True)  
122 167

  
123
    def load_units(self):
168
    def load_data(self):
169
        """ load tag no and nozzle data """
124 170
        from Drawing import Drawing
125 171
        
126 172
        appDocData = AppDocData.instance()
127 173
        drawing = appDocData.activeDrawing    
128 174
        if drawing:
129
            columnDisplayNameList = appDocData.getColumnDisplayNames(drawing.UID, 'Nozzles')
130
            if len(columnDisplayNameList) > 0:                
131
                for columnDisplayName in columnDisplayNameList:        
132
                    if columnDisplayName[0] == 'Pressure':
133
                        self.ui.label_PressureUnit.setText(columnDisplayName[1])
134
                    elif columnDisplayName[0] == 'Elevation':
135
                        self.ui.label_ElevationUnit.setText(columnDisplayName[1])
136
    
175
            for attr in drawing.attrs:
176
                if attr[0] == 'Units':
177
                    self.ui.label_PressureUnit.setText(attr[1]['Pressure'])
178
                    self.ui.label_ElevationUnit.setText(attr[1]['Length'])
179

  
180
        for connector in self._item.connectors:
181
            index = connector._conn_index
182
            if connector.nozzle_data:
183
                pressure = connector.nozzle_data.pressure                                
184
                if pressure:
185
                    if index == 1:
186
                        self.ui.lineEdit_N1_Pressure.setText(str(pressure))
187
                    elif index == 2:
188
                        self.ui.lineEdit_N2_Pressure.setText(str(pressure))
189
                    elif index == 3:
190
                        self.ui.lineEdit_N3_Pressure.setText(str(pressure))
191
                    elif index == 4:
192
                        self.ui.lineEdit_N4_Pressure.setText(str(pressure))
193
                    elif index == 5:
194
                        self.ui.lineEdit_N5_Pressure.setText(str(pressure))  
195
                    elif index == 6:
196
                        self.ui.lineEdit_N6_Pressure.setText(str(pressure))
197
                    elif index == 7:
198
                        self.ui.lineEdit_N7_Pressure.setText(str(pressure))              
199
                    elif index == 8:
200
                        self.ui.lineEdit_N8_Pressure.setText(str(pressure))
201

  
202
                elevation = connector.nozzle_data.elevation
203
                if elevation:
204
                    if index == 1:
205
                        self.ui.lineEdit_N1_Elevation.setText(str(elevation))
206
                    elif index == 2:
207
                        self.ui.lineEdit_N2_Elevation.setText(str(elevation))
208
                    elif index == 3:
209
                        self.ui.lineEdit_N3_Elevation.setText(str(elevation))
210
                    elif index == 4:
211
                        self.ui.lineEdit_N4_Elevation.setText(str(elevation))
212
                    elif index == 5:
213
                        self.ui.lineEdit_N5_Elevation.setText(str(elevation))  
214
                    elif index == 6:
215
                        self.ui.lineEdit_N6_Elevation.setText(str(elevation))
216
                    elif index == 7:
217
                        self.ui.lineEdit_N7_Elevation.setText(str(elevation))              
218
                    elif index == 8:
219
                        self.ui.lineEdit_N8_Elevation.setText(str(elevation))
220

  
137 221
    def accept(self):
138
       
222
        """ set tag no and nozzle data """
223
        from EngineeringConnectorItem import NozzleData
224

  
225
        for connector in self._item.connectors:
226
            index = connector._conn_index
227
            if not connector.nozzle_data: 
228
                connector.nozzle_data = NozzleData()
229

  
230
            if index == 1:
231
                pressure = self.ui.lineEdit_N1_Pressure.text()
232
                if pressure:
233
                    connector.nozzle_data.pressure = float(pressure)    
234
                else: 
235
                    connector.nozzle_data.pressure = None
236

  
237
                elevation = self.ui.lineEdit_N1_Elevation.text()
238
                if elevation:
239
                    connector.nozzle_data.elevation = float(elevation)  
240
                else:
241
                    connector.nozzle_data.elevation = None
242
            elif index == 2:
243
                pressure = self.ui.lineEdit_N2_Pressure.text()
244
                if pressure:
245
                    connector.nozzle_data.pressure = float(pressure)    
246
                else: 
247
                    connector.nozzle_data.pressure = None
248

  
249
                elevation = self.ui.lineEdit_N2_Elevation.text()
250
                if elevation:
251
                    connector.nozzle_data.elevation = float(elevation)  
252
                else:
253
                    connector.nozzle_data.elevation = None
254
            elif index == 3:
255
                pressure = self.ui.lineEdit_N3_Pressure.text()
256
                if pressure:
257
                    connector.nozzle_data.pressure = float(pressure)    
258
                else: 
259
                    connector.nozzle_data.pressure = None
260

  
261
                elevation = self.ui.lineEdit_N3_Elevation.text()
262
                if elevation:
263
                    connector.nozzle_data.elevation = float(elevation)  
264
                else:
265
                    connector.nozzle_data.elevation = None
266
            elif index == 4:
267
                pressure = self.ui.lineEdit_N4_Pressure.text()
268
                if pressure:
269
                    connector.nozzle_data.pressure = float(pressure)    
270
                else: 
271
                    connector.nozzle_data.pressure = None
272

  
273
                elevation = self.ui.lineEdit_N4_Elevation.text()
274
                if elevation:
275
                    connector.nozzle_data.elevation = float(elevation)  
276
                else:
277
                    connector.nozzle_data.elevation = None
278
            elif index == 5:
279
                pressure = self.ui.lineEdit_N5_Pressure.text()
280
                if pressure:
281
                    connector.nozzle_data.pressure = float(pressure)    
282
                else: 
283
                    connector.nozzle_data.pressure = None
284

  
285
                elevation = self.ui.lineEdit_N5_Elevation.text()
286
                if elevation:
287
                    connector.nozzle_data.elevation = float(elevation)  
288
                else:
289
                    connector.nozzle_data.elevation = None
290
            elif index == 6:
291
                pressure = self.ui.lineEdit_N6_Pressure.text()
292
                if pressure:
293
                    connector.nozzle_data.pressure = float(pressure)    
294
                else: 
295
                    connector.nozzle_data.pressure = None
296

  
297
                elevation = self.ui.lineEdit_N6_Elevation.text()
298
                if elevation:
299
                    connector.nozzle_data.elevation = float(elevation)  
300
                else:
301
                    connector.nozzle_data.elevation = None
302
            elif index == 7:
303
                pressure = self.ui.lineEdit_N7_Pressure.text()
304
                if pressure:
305
                    connector.nozzle_data.pressure = float(pressure)    
306
                else: 
307
                    connector.nozzle_data.pressure = None
308

  
309
                elevation = self.ui.lineEdit_N7_Elevation.text()
310
                if elevation:
311
                    connector.nozzle_data.elevation = float(elevation)  
312
                else:
313
                    connector.nozzle_data.elevation = None
314
            elif index == 8:
315
                pressure = self.ui.lineEdit_N8_Pressure.text()
316
                if pressure:
317
                    connector.nozzle_data.pressure = float(pressure)    
318
                else: 
319
                    connector.nozzle_data.pressure = None
320

  
321
                elevation = self.ui.lineEdit_N8_Elevation.text()
322
                if elevation:
323
                    connector.nozzle_data.elevation = float(elevation)  
324
                else:
325
                    connector.nozzle_data.elevation = None
326

  
139 327
        QDialog.accept(self)
140 328

  
141 329
    def reject(self):
HYTOS/HYTOS/BatteryLimit.py
20 20

  
21 21
        self.ui = BatteryLimit_UI.Ui_BatteryLimitDialog()
22 22
        self.ui.setupUi(self)
23
        self.ui.lineEdit_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Pressure))
24
        self.ui.lineEdit_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Elevation))
23 25
        self.initialize()
24 26
                
25 27
    def showDialog(self, item):
26 28
        self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
29
        self._item = item
27 30

  
28 31
        self.ui.lineEdit_TagNo.setFocus()
29 32
        self.set_controls(item)
30
        self.load_units()
33
        self.load_data()
31 34

  
32 35
        self.exec_()
33 36

  
......
50 53
        elif name == 'Right':    
51 54
            self.ui.label_Img_Right.setVisible(True)
52 55

  
53
    def load_units(self):
56
    def load_data(self):
57
        """ load tag no and nozzle data """
54 58
        from Drawing import Drawing
55 59
        
56 60
        appDocData = AppDocData.instance()
......
60 64
                if attr[0] == 'Units':
61 65
                    self.ui.label_PressureUnit.setText(attr[1]['Pressure'])
62 66
                    self.ui.label_ElevationUnit.setText(attr[1]['Length'])
63
                
67

  
68
        matches = [connector.nozzle_data for connector in self._item.connectors if connector.nozzle_data]
69
        if matches:
70
            pressure = matches[0].pressure
71
            if pressure:                
72
                self.ui.lineEdit_Pressure.setText(str(pressure))
73

  
74
            elevation = matches[0].elevation
75
            if elevation:
76
                self.ui.lineEdit_Elevation.setText(str(elevation))
77

  
64 78
    
65 79
    def accept(self):
66
        
80
        """ set tag no and nozzle data """
81
        from EngineeringConnectorItem import NozzleData
82

  
83
        for connector in self._item.connectors:
84
            if not connector.nozzle_data: 
85
                connector.nozzle_data = NozzleData()
86

  
87
            pressure = self.ui.lineEdit_Pressure.text()
88
            if pressure:
89
                connector.nozzle_data.pressure = float(pressure)    
90
            else: 
91
                connector.nozzle_data.pressure = None
92

  
93
            elevation = self.ui.lineEdit_Elevation.text()
94
            if elevation:
95
                connector.nozzle_data.elevation = float(elevation)  
96
            else:
97
                connector.nozzle_data.elevation = None
98

  
67 99
        QDialog.accept(self)
68 100

  
69 101
    def reject(self):
HYTOS/HYTOS/Coil.py
20 20

  
21 21
        self.ui = Coil_UI.Ui_CoilDialog()
22 22
        self.ui.setupUi(self)
23
        self.ui.lineEdit_Pressure_Drop.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Pressure_Drop))
24
        self.ui.lineEdit_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Elevation))
23 25
        self.initialize()
24 26
        
25 27
        
26 28
    def showDialog(self, item):
27 29
        self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
30
        self._item = item
28 31

  
29 32
        self.ui.lineEdit_TagNo.setFocus()
30 33
        self.set_controls(item)
31
        self.load_units()
34
        self.load_data()
32 35

  
33 36
        self.exec_()
34 37

  
......
38 41
    def set_controls(self, item):    
39 42
        self.ui.label_Img.setVisible(True)
40 43

  
41
    def load_units(self):
44
    def load_data(self):
45
        """ load tag no and nozzle data """
42 46
        from Drawing import Drawing
43 47
        
44 48
        appDocData = AppDocData.instance()
......
48 52
                if attr[0] == 'Units':
49 53
                    self.ui.label_PressureUnit.setText(attr[1]['Pressure'])
50 54
                    self.ui.label_ElevationUnit.setText(attr[1]['Length'])
51
                    
55

  
56
        matches = [connector.nozzle_data for connector in self._item.connectors if connector.nozzle_data]
57
        if matches:
58
            pressure_drop = matches[0].pressure_drop
59
            if pressure_drop:                
60
                self.ui.lineEdit_Pressure_Drop.setText(str(pressure_drop))
61

  
62
            elevation = matches[0].elevation
63
            if elevation:
64
                self.ui.lineEdit_Elevation.setText(str(elevation))
65
             
52 66
    def accept(self):
67
        """ set tag no and nozzle data """
68
        from EngineeringConnectorItem import NozzleData
69

  
70
        for connector in self._item.connectors:
71
            if not connector.nozzle_data: 
72
                connector.nozzle_data = NozzleData()
73

  
74
            pressure_drop = self.ui.lineEdit_Pressure_Drop.text()
75
            if pressure_drop:
76
                connector.nozzle_data.pressure_drop = float(pressure_drop)    
77
            else: 
78
                connector.nozzle_data.pressure_drop = None
79

  
80
            elevation = self.ui.lineEdit_Elevation.text()
81
            if elevation:
82
                connector.nozzle_data.elevation = float(elevation)  
83
            else:
84
                connector.nozzle_data.elevation = None
85
                
53 86
        QDialog.accept(self)
54 87

  
55 88
    def reject(self):
HYTOS/HYTOS/Coil_UI.py
58 58
        self.label_3.setFont(font)
59 59
        self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
60 60
        self.label_3.setObjectName("label_3")
61
        self.lineEdit_Pressure = QtWidgets.QLineEdit(self.groupBox)
62
        self.lineEdit_Pressure.setGeometry(QtCore.QRect(162, 59, 100, 21))
63
        self.lineEdit_Pressure.setMaximumSize(QtCore.QSize(100, 16777215))
61
        self.lineEdit_Pressure_Drop = QtWidgets.QLineEdit(self.groupBox)
62
        self.lineEdit_Pressure_Drop.setGeometry(QtCore.QRect(162, 59, 100, 21))
63
        self.lineEdit_Pressure_Drop.setMaximumSize(QtCore.QSize(100, 16777215))
64 64
        font = QtGui.QFont()
65 65
        font.setBold(False)
66 66
        font.setWeight(50)
67
        self.lineEdit_Pressure.setFont(font)
68
        self.lineEdit_Pressure.setAlignment(QtCore.Qt.AlignCenter)
69
        self.lineEdit_Pressure.setObjectName("lineEdit_Pressure")
67
        self.lineEdit_Pressure_Drop.setFont(font)
68
        self.lineEdit_Pressure_Drop.setAlignment(QtCore.Qt.AlignCenter)
69
        self.lineEdit_Pressure_Drop.setObjectName("lineEdit_Pressure_Drop")
70 70
        self.label_PressureUnit = QtWidgets.QLabel(self.groupBox)
71 71
        self.label_PressureUnit.setGeometry(QtCore.QRect(268, 59, 49, 16))
72 72
        font = QtGui.QFont()
......
109 109
        self.buttonBox.accepted.connect(CoilDialog.accept)
110 110
        self.buttonBox.rejected.connect(CoilDialog.reject)
111 111
        QtCore.QMetaObject.connectSlotsByName(CoilDialog)
112
        CoilDialog.setTabOrder(self.lineEdit_TagNo, self.lineEdit_Pressure)
113
        CoilDialog.setTabOrder(self.lineEdit_Pressure, self.lineEdit_Elevation)
112
        CoilDialog.setTabOrder(self.lineEdit_TagNo, self.lineEdit_Pressure_Drop)
113
        CoilDialog.setTabOrder(self.lineEdit_Pressure_Drop, self.lineEdit_Elevation)
114 114

  
115 115
    def retranslateUi(self, CoilDialog):
116 116
        _translate = QtCore.QCoreApplication.translate
HYTOS/HYTOS/Compressor.py
20 20

  
21 21
        self.ui = Compressor_UI.Ui_CompressorDialog()
22 22
        self.ui.setupUi(self)
23

  
24
        self.ui.lineEdit_Suc_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Suc_Pressure)) 
25
        self.ui.lineEdit_Dis_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Dis_Pressure)) 
26
        self.ui.lineEdit_Suc_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Suc_Elevation)) 
27
        self.ui.lineEdit_Dis_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Dis_Elevation)) 
28
        
23 29
        self.initialize()
24 30
        
25 31
    def showDialog(self, item):
26 32
        self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
33
        self._item = item
27 34

  
28 35
        self.ui.lineEdit_TagNo.setFocus()
29 36
        self.set_controls(item)
30
        self.load_units()
37
        self.load_data()
31 38

  
32 39
        self.exec_()
33 40

  
......
65 72
                self.ui.lineEdit_Dis_Pressure.setEnabled(True)
66 73
                self.ui.lineEdit_Dis_Elevation.setEnabled(True)
67 74
      
68
    def load_units(self):
75
    def load_data(self):
76
        """ load tag no and nozzle data """
69 77
        from Drawing import Drawing
70 78
        
71 79
        appDocData = AppDocData.instance()
......
75 83
                if attr[0] == 'Units':
76 84
                    self.ui.label_PressureUnit.setText(attr[1]['Pressure'])
77 85
                    self.ui.label_ElevationUnit.setText(attr[1]['Length'])
78
              
86

  
87
        for connector in self._item.connectors:
88
            index = connector._conn_index
89
            if connector.nozzle_data:
90
                pressure = connector.nozzle_data.pressure                                
91
                if pressure:
92
                    if index == 1:
93
                        self.ui.lineEdit_Suc_Pressure.setText(str(pressure))
94
                    elif index == 2:
95
                        self.ui.lineEdit_Dis_Pressure.setText(str(pressure))
96
                    
97
                elevation = connector.nozzle_data.elevation
98
                if elevation:
99
                    if index == 1:
100
                        self.ui.lineEdit_Suc_Elevation.setText(str(elevation))
101
                    elif index == 2:
102
                        self.ui.lineEdit_Dis_Elevation.setText(str(elevation))
103

  
79 104
    def accept(self):
105
        """ set tag no and nozzle data """
106
        from EngineeringConnectorItem import NozzleData
107

  
108
        for connector in self._item.connectors:
109
            index = connector._conn_index
110
            if not connector.nozzle_data: 
111
                connector.nozzle_data = NozzleData()
112

  
113
            if index == 1:
114
                pressure = self.ui.lineEdit_Suc_Pressure.text()
115
                if pressure:
116
                    connector.nozzle_data.pressure = float(pressure)    
117
                else: 
118
                    connector.nozzle_data.pressure = None
119

  
120
                elevation = self.ui.lineEdit_Suc_Elevation.text()
121
                if elevation:
122
                    connector.nozzle_data.elevation = float(elevation)  
123
                else:
124
                    connector.nozzle_data.elevation = None
125
            elif index == 2:
126
                pressure = self.ui.lineEdit_Dis_Pressure.text()
127
                if pressure:
128
                    connector.nozzle_data.pressure = float(pressure)    
129
                else: 
130
                    connector.nozzle_data.pressure = None
131

  
132
                elevation = self.ui.lineEdit_Dis_Elevation.text()
133
                if elevation:
134
                    connector.nozzle_data.elevation = float(elevation)  
135
                else:
136
                    connector.nozzle_data.elevation = None
80 137

  
81 138
        QDialog.accept(self)
82 139

  
HYTOS/HYTOS/ConeRoof.py
20 20

  
21 21
        self.ui = ConeRoof_UI.Ui_ConeRoofDialog()
22 22
        self.ui.setupUi(self)
23

  
24
        self.ui.lineEdit_N1_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N1_Pressure)) 
25
        self.ui.lineEdit_N2_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N2_Pressure))
26
        self.ui.lineEdit_N3_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N3_Pressure))
27
        self.ui.lineEdit_N4_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N4_Pressure))        
28
        self.ui.lineEdit_N5_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N5_Pressure))        
29
        self.ui.lineEdit_N6_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N6_Pressure))        
30
        self.ui.lineEdit_N7_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N7_Pressure))        
31
        self.ui.lineEdit_N8_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N8_Pressure))
32
        self.ui.lineEdit_N9_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N9_Pressure))
33

  
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))		
36
        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)) 
41
        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))
43

  
44

  
23 45
        self.initialize()
24 46
        
25 47
    def showDialog(self, item):
26 48
        self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
49
        self._item = item
27 50

  
28 51
        self.ui.lineEdit_TagNo.setFocus()
29 52
        self.set_controls(item)
30
        self.load_units()
53
        self.load_data()
31 54

  
32 55
        self.exec_()
33 56

  
......
130 153
                    self.ui.lineEdit_N9_Pressure.setEnabled(True)                
131 154
                    self.ui.lineEdit_N9_Elevation.setEnabled(True)  
132 155
                
133
    def load_units(self):
156
    def load_data(self):
157
        """ load tag no and nozzle data """
134 158
        from Drawing import Drawing
135 159
        
136 160
        appDocData = AppDocData.instance()
......
141 165
                    self.ui.label_PressureUnit.setText(attr[1]['Pressure'])
142 166
                    self.ui.label_ElevationUnit.setText(attr[1]['Length'])
143 167
                
168
        for connector in self._item.connectors:
169
            index = connector._conn_index
170
            if connector.nozzle_data:
171
                pressure = connector.nozzle_data.pressure                                
172
                if pressure:
173
                    if index == 1:
174
                        self.ui.lineEdit_N1_Pressure.setText(str(pressure))
175
                    elif index == 2:
176
                        self.ui.lineEdit_N2_Pressure.setText(str(pressure))
177
                    elif index == 3:
178
                        self.ui.lineEdit_N3_Pressure.setText(str(pressure))
179
                    elif index == 4:
180
                        self.ui.lineEdit_N4_Pressure.setText(str(pressure))
181
                    elif index == 5:
182
                        self.ui.lineEdit_N5_Pressure.setText(str(pressure))  
183
                    elif index == 6:
184
                        self.ui.lineEdit_N6_Pressure.setText(str(pressure))
185
                    elif index == 7:
186
                        self.ui.lineEdit_N7_Pressure.setText(str(pressure))              
187
                    elif index == 8:
188
                        self.ui.lineEdit_N8_Pressure.setText(str(pressure))
189
                    elif index == 9:
190
                        self.ui.lineEdit_N9_Pressure.setText(str(pressure))
191

  
192
                elevation = connector.nozzle_data.elevation
193
                if elevation:
194
                    if index == 1:
195
                        self.ui.lineEdit_N1_Elevation.setText(str(elevation))
196
                    elif index == 2:
197
                        self.ui.lineEdit_N2_Elevation.setText(str(elevation))
198
                    elif index == 3:
199
                        self.ui.lineEdit_N3_Elevation.setText(str(elevation))
200
                    elif index == 4:
201
                        self.ui.lineEdit_N4_Elevation.setText(str(elevation))
202
                    elif index == 5:
203
                        self.ui.lineEdit_N5_Elevation.setText(str(elevation))  
204
                    elif index == 6:
205
                        self.ui.lineEdit_N6_Elevation.setText(str(elevation))
206
                    elif index == 7:
207
                        self.ui.lineEdit_N7_Elevation.setText(str(elevation))              
208
                    elif index == 8:
209
                        self.ui.lineEdit_N8_Elevation.setText(str(elevation))
210
                    elif index == 9:
211
                        self.ui.lineEdit_N9_Elevation.setText(str(elevation))
212

  
213

  
144 214
    def accept(self):
145
        
215
        """ set tag no and nozzle data """
216
        from EngineeringConnectorItem import NozzleData
217

  
218
        for connector in self._item.connectors:
219
            index = connector._conn_index
220
            if not connector.nozzle_data: 
221
                connector.nozzle_data = NozzleData()
222

  
223
            if index == 1:
224
                pressure = self.ui.lineEdit_N1_Pressure.text()
225
                if pressure:
226
                    connector.nozzle_data.pressure = float(pressure)    
227
                else: 
228
                    connector.nozzle_data.pressure = None
229

  
230
                elevation = self.ui.lineEdit_N1_Elevation.text()
231
                if elevation:
232
                    connector.nozzle_data.elevation = float(elevation)  
233
                else:
234
                    connector.nozzle_data.elevation = None
235
            elif index == 2:
236
                pressure = self.ui.lineEdit_N2_Pressure.text()
237
                if pressure:
238
                    connector.nozzle_data.pressure = float(pressure)    
239
                else: 
240
                    connector.nozzle_data.pressure = None
241

  
242
                elevation = self.ui.lineEdit_N2_Elevation.text()
243
                if elevation:
244
                    connector.nozzle_data.elevation = float(elevation)  
245
                else:
246
                    connector.nozzle_data.elevation = None
247
            elif index == 3:
248
                pressure = self.ui.lineEdit_N3_Pressure.text()
249
                if pressure:
250
                    connector.nozzle_data.pressure = float(pressure)    
251
                else: 
252
                    connector.nozzle_data.pressure = None
253

  
254
                elevation = self.ui.lineEdit_N3_Elevation.text()
255
                if elevation:
256
                    connector.nozzle_data.elevation = float(elevation)  
257
                else:
258
                    connector.nozzle_data.elevation = None
259
            elif index == 4:
260
                pressure = self.ui.lineEdit_N4_Pressure.text()
261
                if pressure:
262
                    connector.nozzle_data.pressure = float(pressure)    
263
                else: 
264
                    connector.nozzle_data.pressure = None
265

  
266
                elevation = self.ui.lineEdit_N4_Elevation.text()
267
                if elevation:
268
                    connector.nozzle_data.elevation = float(elevation)  
269
                else:
270
                    connector.nozzle_data.elevation = None
271
            elif index == 5:
272
                pressure = self.ui.lineEdit_N5_Pressure.text()
273
                if pressure:
274
                    connector.nozzle_data.pressure = float(pressure)    
275
                else: 
276
                    connector.nozzle_data.pressure = None
277

  
278
                elevation = self.ui.lineEdit_N5_Elevation.text()
279
                if elevation:
280
                    connector.nozzle_data.elevation = float(elevation)  
281
                else:
282
                    connector.nozzle_data.elevation = None
283
            elif index == 6:
284
                pressure = self.ui.lineEdit_N6_Pressure.text()
285
                if pressure:
286
                    connector.nozzle_data.pressure = float(pressure)    
287
                else: 
288
                    connector.nozzle_data.pressure = None
289

  
290
                elevation = self.ui.lineEdit_N6_Elevation.text()
291
                if elevation:
292
                    connector.nozzle_data.elevation = float(elevation)  
293
                else:
294
                    connector.nozzle_data.elevation = None
295
            elif index == 7:
296
                pressure = self.ui.lineEdit_N7_Pressure.text()
297
                if pressure:
298
                    connector.nozzle_data.pressure = float(pressure)    
299
                else: 
300
                    connector.nozzle_data.pressure = None
301

  
302
                elevation = self.ui.lineEdit_N7_Elevation.text()
303
                if elevation:
304
                    connector.nozzle_data.elevation = float(elevation)  
305
                else:
306
                    connector.nozzle_data.elevation = None
307
            elif index == 8:
308
                pressure = self.ui.lineEdit_N8_Pressure.text()
309
                if pressure:
310
                    connector.nozzle_data.pressure = float(pressure)    
311
                else: 
312
                    connector.nozzle_data.pressure = None
313

  
314
                elevation = self.ui.lineEdit_N8_Elevation.text()
315
                if elevation:
316
                    connector.nozzle_data.elevation = float(elevation)  
317
                else:
318
                    connector.nozzle_data.elevation = None
319
            elif index == 9:
320
                pressure = self.ui.lineEdit_N9_Pressure.text()
321
                if pressure:
322
                    connector.nozzle_data.pressure = float(pressure)    
323
                else: 
324
                    connector.nozzle_data.pressure = None
325

  
326
                elevation = self.ui.lineEdit_N9_Elevation.text()
327
                if elevation:
328
                    connector.nozzle_data.elevation = float(elevation)  
329
                else:
330
                    connector.nozzle_data.elevation = None
331

  
146 332
        QDialog.accept(self)
147 333

  
148 334
    def reject(self):
HYTOS/HYTOS/DP_Equipment.py
20 20

  
21 21
        self.ui = DP_Equipment_UI.Ui_DP_EquipmentDialog()
22 22
        self.ui.setupUi(self)
23

  
24
        self.ui.lineEdit_Horizontal_Pressure_Drop.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Horizontal_Pressure_Drop)) 
25
        self.ui.lineEdit_Vertical_Pressure_Drop.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Vertical_Pressure_Drop))
26
        self.ui.lineEdit_Horizontal_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Horizontal_Elevation)) 		
27
        self.ui.lineEdit_Vertical_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Vertical_Elevation))	
28

  
23 29
        self.initialize()
24 30
        
25 31
        
26 32
    def showDialog(self, item):
27 33
        self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
34
        self._item = item
28 35

  
29 36
        self.ui.lineEdit_TagNo.setFocus()
30 37
        self.set_controls(item)
31
        self.load_units()
38
        self.load_data()
32 39
        
33 40
        self.exec_()
34 41

  
......
39 46
        self.ui.label_Img_Vertical_Out.setVisible(False)
40 47

  
41 48
        self.ui.label_Horizontal.setVisible(False)
42
        self.ui.lineEdit_Horizontal_Pressure.setEnabled(False)                
49
        self.ui.lineEdit_Horizontal_Pressure_Drop.setEnabled(False)                
43 50
        self.ui.lineEdit_Horizontal_Elevation.setEnabled(False)
44 51

  
45 52
        self.ui.label_Vertical.setVisible(False)
46
        self.ui.lineEdit_Vertical_Pressure.setEnabled(False)                
53
        self.ui.lineEdit_Vertical_Pressure_Drop.setEnabled(False)                
47 54
        self.ui.lineEdit_Vertical_Elevation.setEnabled(False)
48 55

  
49 56
    def set_controls(self, item):
......
59 66
                self.ui.label_Img_Vertical_Out.setVisible(True)
60 67
                
61 68
                self.ui.label_Vertical.setVisible(True)
62
                self.ui.lineEdit_Vertical_Pressure.setEnabled(True)                
69
                self.ui.lineEdit_Vertical_Pressure_Drop.setEnabled(True)                
63 70
                self.ui.lineEdit_Vertical_Elevation.setEnabled(True)
64 71

  
65 72
            if 2 in used_index or 4 in used_index:
......
67 74
                self.ui.label_Img_Horizontal_Out.setVisible(True)
68 75
                
69 76
                self.ui.label_Horizontal.setVisible(True)
70
                self.ui.lineEdit_Horizontal_Pressure.setEnabled(True)
77
                self.ui.lineEdit_Horizontal_Pressure_Drop.setEnabled(True)
71 78
                self.ui.lineEdit_Horizontal_Elevation.setEnabled(True)
72 79

  
73
    def load_units(self):
80
    def load_data(self):
81
        """ load tag no and nozzle data """
74 82
        from Drawing import Drawing
75 83
        
76 84
        appDocData = AppDocData.instance()
......
80 88
                if attr[0] == 'Units':
81 89
                    self.ui.label_PressureUnit.setText(attr[1]['Pressure'])
82 90
                    self.ui.label_ElevationUnit.setText(attr[1]['Length'])
83
                
91
        
92
        for connector in self._item.connectors:
93
            index = connector._conn_index
94
            if connector.nozzle_data:
95
                pressure_drop = connector.nozzle_data.pressure_drop                                
96
                if pressure_drop:
97
                    if index == 1:
98
                        self.ui.lineEdit_Vertical_Pressure_Drop.setText(str(pressure_drop))
99
                    elif index == 2:
100
                        self.ui.lineEdit_Horizontal_Pressure_Drop.setText(str(pressure_drop))
101
                    elif index == 3:
102
                        self.ui.lineEdit_Vertical_Pressure_Drop.setText(str(pressure_drop))
103
                    elif index == 4:
104
                        self.ui.lineEdit_Horizontal_Pressure_Drop.setText(str(pressure_drop))
105
                   
106
                elevation = connector.nozzle_data.elevation
107
                if elevation:
108
                    if index == 1:
109
                        self.ui.lineEdit_Vertical_Elevation.setText(str(elevation))
110
                    elif index == 2:
111
                        self.ui.lineEdit_Horizontal_Elevation.setText(str(elevation))
112
                    elif index == 3:
113
                        self.ui.lineEdit_Vertical_Elevation.setText(str(elevation))
114
                    elif index == 4:
115
                        self.ui.lineEdit_Horizontal_Elevation.setText(str(elevation))
116
                    
117

  
84 118
    def accept(self):
119
        """ set tag no and nozzle data """
120
        from EngineeringConnectorItem import NozzleData
121

  
122
        for connector in self._item.connectors:
123
            index = connector._conn_index
124
            if not connector.nozzle_data: 
125
                connector.nozzle_data = NozzleData()
126

  
127
            if index == 1:
128
                pressure_drop = self.ui.lineEdit_Vertical_Pressure_Drop.text()
129
                if pressure_drop:
130
                    connector.nozzle_data.pressure_drop = float(pressure_drop)    
131
                else: 
132
                    connector.nozzle_data.pressure_drop = None
133

  
134
                elevation = self.ui.lineEdit_Vertical_Elevation.text()
135
                if elevation:
136
                    connector.nozzle_data.elevation = float(elevation)  
137
                else:
138
                    connector.nozzle_data.elevation = None
139
            elif index == 2:
140
                pressure_drop = self.ui.lineEdit_Horizontal_Pressure_Drop.text()
141
                if pressure_drop:
142
                    connector.nozzle_data.pressure_drop = float(pressure_drop)    
143
                else: 
144
                    connector.nozzle_data.pressure_drop = None
145

  
146
                elevation = self.ui.lineEdit_Horizontal_Elevation.text()
147
                if elevation:
148
                    connector.nozzle_data.elevation = float(elevation)  
149
                else:
150
                    connector.nozzle_data.elevation = None
151
            elif index == 3:
152
                pressure_drop = self.ui.lineEdit_Vertical_Pressure_Drop.text()
153
                if pressure_drop:
154
                    connector.nozzle_data.pressure_drop = float(pressure_drop)    
155
                else: 
156
                    connector.nozzle_data.pressure_drop = None
157

  
158
                elevation = self.ui.lineEdit_Vertical_Elevation.text()
159
                if elevation:
160
                    connector.nozzle_data.elevation = float(elevation)  
161
                else:
162
                    connector.nozzle_data.elevation = None
163
            elif index == 4:
164
                pressure_drop = self.ui.lineEdit_Horizontal_Pressure_Drop.text()
165
                if pressure_drop:
166
                    connector.nozzle_data.pressure_drop = float(pressure_drop)    
167
                else: 
168
                    connector.nozzle_data.pressure_drop = None
169

  
170
                elevation = self.ui.lineEdit_Horizontal_Elevation.text()
171
                if elevation:
172
                    connector.nozzle_data.elevation = float(elevation)  
173
                else:
174
                    connector.nozzle_data.elevation = None
85 175

  
86 176
        QDialog.accept(self)
87 177

  
HYTOS/HYTOS/DP_Equipment_UI.py
104 104
        self.label_Horizontal = QtWidgets.QLabel(self.groupBox)
105 105
        self.label_Horizontal.setGeometry(QtCore.QRect(11, 76, 25, 17))
106 106
        self.label_Horizontal.setObjectName("label_Horizontal")
107
        self.lineEdit_Horizontal_Pressure = QtWidgets.QLineEdit(self.groupBox)
108
        self.lineEdit_Horizontal_Pressure.setGeometry(QtCore.QRect(42, 74, 100, 21))
109
        self.lineEdit_Horizontal_Pressure.setMinimumSize(QtCore.QSize(100, 0))
110
        self.lineEdit_Horizontal_Pressure.setAlignment(QtCore.Qt.AlignCenter)
111
        self.lineEdit_Horizontal_Pressure.setObjectName("lineEdit_Horizontal_Pressure")
107
        self.lineEdit_Horizontal_Pressure_Drop = QtWidgets.QLineEdit(self.groupBox)
108
        self.lineEdit_Horizontal_Pressure_Drop.setGeometry(QtCore.QRect(42, 74, 100, 21))
109
        self.lineEdit_Horizontal_Pressure_Drop.setMinimumSize(QtCore.QSize(100, 0))
110
        self.lineEdit_Horizontal_Pressure_Drop.setAlignment(QtCore.Qt.AlignCenter)
111
        self.lineEdit_Horizontal_Pressure_Drop.setObjectName("lineEdit_Horizontal_Pressure_Drop")
112 112
        self.lineEdit_Horizontal_Elevation = QtWidgets.QLineEdit(self.groupBox)
113 113
        self.lineEdit_Horizontal_Elevation.setGeometry(QtCore.QRect(148, 74, 100, 21))
114 114
        self.lineEdit_Horizontal_Elevation.setMinimumSize(QtCore.QSize(100, 0))
......
117 117
        self.label_Vertical = QtWidgets.QLabel(self.groupBox)
118 118
        self.label_Vertical.setGeometry(QtCore.QRect(11, 104, 25, 17))
119 119
        self.label_Vertical.setObjectName("label_Vertical")
120
        self.lineEdit_Vertical_Pressure = QtWidgets.QLineEdit(self.groupBox)
121
        self.lineEdit_Vertical_Pressure.setGeometry(QtCore.QRect(42, 102, 100, 21))
122
        self.lineEdit_Vertical_Pressure.setMinimumSize(QtCore.QSize(100, 0))
123
        self.lineEdit_Vertical_Pressure.setAlignment(QtCore.Qt.AlignCenter)
124
        self.lineEdit_Vertical_Pressure.setObjectName("lineEdit_Vertical_Pressure")
120
        self.lineEdit_Vertical_Pressure_Drop = QtWidgets.QLineEdit(self.groupBox)
121
        self.lineEdit_Vertical_Pressure_Drop.setGeometry(QtCore.QRect(42, 102, 100, 21))
122
        self.lineEdit_Vertical_Pressure_Drop.setMinimumSize(QtCore.QSize(100, 0))
123
        self.lineEdit_Vertical_Pressure_Drop.setAlignment(QtCore.Qt.AlignCenter)
124
        self.lineEdit_Vertical_Pressure_Drop.setObjectName("lineEdit_Vertical_Pressure_Drop")
125 125
        self.lineEdit_Vertical_Elevation = QtWidgets.QLineEdit(self.groupBox)
126 126
        self.lineEdit_Vertical_Elevation.setGeometry(QtCore.QRect(148, 102, 100, 21))
127 127
        self.lineEdit_Vertical_Elevation.setMinimumSize(QtCore.QSize(100, 0))
......
132 132
        self.buttonBox.accepted.connect(DP_EquipmentDialog.accept)
133 133
        self.buttonBox.rejected.connect(DP_EquipmentDialog.reject)
134 134
        QtCore.QMetaObject.connectSlotsByName(DP_EquipmentDialog)
135
        DP_EquipmentDialog.setTabOrder(self.lineEdit_TagNo, self.lineEdit_Horizontal_Pressure)
136
        DP_EquipmentDialog.setTabOrder(self.lineEdit_Horizontal_Pressure, self.lineEdit_Horizontal_Elevation)
137
        DP_EquipmentDialog.setTabOrder(self.lineEdit_Horizontal_Elevation, self.lineEdit_Vertical_Pressure)
138
        DP_EquipmentDialog.setTabOrder(self.lineEdit_Vertical_Pressure, self.lineEdit_Vertical_Elevation)
135
        DP_EquipmentDialog.setTabOrder(self.lineEdit_TagNo, self.lineEdit_Horizontal_Pressure_Drop)
136
        DP_EquipmentDialog.setTabOrder(self.lineEdit_Horizontal_Pressure_Drop, self.lineEdit_Horizontal_Elevation)
137
        DP_EquipmentDialog.setTabOrder(self.lineEdit_Horizontal_Elevation, self.lineEdit_Vertical_Pressure_Drop)
138
        DP_EquipmentDialog.setTabOrder(self.lineEdit_Vertical_Pressure_Drop, self.lineEdit_Vertical_Elevation)
139 139

  
140 140
    def retranslateUi(self, DP_EquipmentDialog):
141 141
        _translate = QtCore.QCoreApplication.translate
HYTOS/HYTOS/DomeRoof.py
20 20

  
21 21
        self.ui = DomeRoof_UI.Ui_DomeRoofDialog()
22 22
        self.ui.setupUi(self)
23

  
24
        self.ui.lineEdit_N1_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N1_Pressure)) 
25
        self.ui.lineEdit_N2_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N2_Pressure))
26
        self.ui.lineEdit_N3_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N3_Pressure))
27
        self.ui.lineEdit_N4_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N4_Pressure))        
28
        self.ui.lineEdit_N5_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N5_Pressure))        
29
        self.ui.lineEdit_N6_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N6_Pressure))        
30
        self.ui.lineEdit_N7_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N7_Pressure))        
31
        self.ui.lineEdit_N8_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N8_Pressure))
32
        self.ui.lineEdit_N9_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_N9_Pressure))
33

  
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))		
36
        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)) 
41
        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))
43

  
23 44
        self.initialize()
24 45
        
25 46
    def showDialog(self, item):
26 47
        self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
48
        self._item = item
27 49

  
28 50
        self.ui.lineEdit_TagNo.setFocus()
29 51
        self.set_controls(item)
30
        self.load_units()
52
        self.load_data()
31 53

  
32 54
        self.exec_()
33 55

  
......
130 152
                    self.ui.lineEdit_N9_Pressure.setEnabled(True)                
131 153
                    self.ui.lineEdit_N9_Elevation.setEnabled(True)  
132 154
                
133
    def load_units(self):
155
    def load_data(self):
156
        """ load tag no and nozzle data """
134 157
        from Drawing import Drawing
135 158
        
136 159
        appDocData = AppDocData.instance()
......
140 163
                if attr[0] == 'Units':
141 164
                    self.ui.label_PressureUnit.setText(attr[1]['Pressure'])
142 165
                    self.ui.label_ElevationUnit.setText(attr[1]['Length'])
143
                    
166

  
167
        for connector in self._item.connectors:
168
            index = connector._conn_index
169
            if connector.nozzle_data:
170
                pressure = connector.nozzle_data.pressure                                
171
                if pressure:
172
                    if index == 1:
173
                        self.ui.lineEdit_N1_Pressure.setText(str(pressure))
174
                    elif index == 2:
175
                        self.ui.lineEdit_N2_Pressure.setText(str(pressure))
176
                    elif index == 3:
177
                        self.ui.lineEdit_N3_Pressure.setText(str(pressure))
178
                    elif index == 4:
179
                        self.ui.lineEdit_N4_Pressure.setText(str(pressure))
180
                    elif index == 5:
181
                        self.ui.lineEdit_N5_Pressure.setText(str(pressure))  
182
                    elif index == 6:
183
                        self.ui.lineEdit_N6_Pressure.setText(str(pressure))
184
                    elif index == 7:
185
                        self.ui.lineEdit_N7_Pressure.setText(str(pressure))              
186
                    elif index == 8:
187
                        self.ui.lineEdit_N8_Pressure.setText(str(pressure))
188
                    elif index == 9:
189
                        self.ui.lineEdit_N9_Pressure.setText(str(pressure))
190

  
191
                elevation = connector.nozzle_data.elevation
192
                if elevation:
193
                    if index == 1:
194
                        self.ui.lineEdit_N1_Elevation.setText(str(elevation))
195
                    elif index == 2:
196
                        self.ui.lineEdit_N2_Elevation.setText(str(elevation))
197
                    elif index == 3:
198
                        self.ui.lineEdit_N3_Elevation.setText(str(elevation))
199
                    elif index == 4:
200
                        self.ui.lineEdit_N4_Elevation.setText(str(elevation))
201
                    elif index == 5:
202
                        self.ui.lineEdit_N5_Elevation.setText(str(elevation))  
203
                    elif index == 6:
204
                        self.ui.lineEdit_N6_Elevation.setText(str(elevation))
205
                    elif index == 7:
206
                        self.ui.lineEdit_N7_Elevation.setText(str(elevation))              
207
                    elif index == 8:
208
                        self.ui.lineEdit_N8_Elevation.setText(str(elevation))
209
                    elif index == 9:
210
                        self.ui.lineEdit_N9_Elevation.setText(str(elevation))
211
            
144 212
    def accept(self):
145
        
213
        """ set tag no and nozzle data """
214
        from EngineeringConnectorItem import NozzleData
215

  
216
        for connector in self._item.connectors:
217
            index = connector._conn_index
218
            if not connector.nozzle_data: 
219
                connector.nozzle_data = NozzleData()
220

  
221
            if index == 1:
222
                pressure = self.ui.lineEdit_N1_Pressure.text()
223
                if pressure:
224
                    connector.nozzle_data.pressure = float(pressure)    
225
                else: 
226
                    connector.nozzle_data.pressure = None
227

  
228
                elevation = self.ui.lineEdit_N1_Elevation.text()
229
                if elevation:
230
                    connector.nozzle_data.elevation = float(elevation)  
231
                else:
232
                    connector.nozzle_data.elevation = None
233
            elif index == 2:
234
                pressure = self.ui.lineEdit_N2_Pressure.text()
235
                if pressure:
236
                    connector.nozzle_data.pressure = float(pressure)    
237
                else: 
238
                    connector.nozzle_data.pressure = None
239

  
240
                elevation = self.ui.lineEdit_N2_Elevation.text()
241
                if elevation:
242
                    connector.nozzle_data.elevation = float(elevation)  
243
                else:
244
                    connector.nozzle_data.elevation = None
245
            elif index == 3:
246
                pressure = self.ui.lineEdit_N3_Pressure.text()
247
                if pressure:
248
                    connector.nozzle_data.pressure = float(pressure)    
249
                else: 
250
                    connector.nozzle_data.pressure = None
251

  
252
                elevation = self.ui.lineEdit_N3_Elevation.text()
253
                if elevation:
254
                    connector.nozzle_data.elevation = float(elevation)  
255
                else:
256
                    connector.nozzle_data.elevation = None
257
            elif index == 4:
258
                pressure = self.ui.lineEdit_N4_Pressure.text()
259
                if pressure:
260
                    connector.nozzle_data.pressure = float(pressure)    
261
                else: 
262
                    connector.nozzle_data.pressure = None
263

  
264
                elevation = self.ui.lineEdit_N4_Elevation.text()
265
                if elevation:
266
                    connector.nozzle_data.elevation = float(elevation)  
267
                else:
268
                    connector.nozzle_data.elevation = None
269
            elif index == 5:
270
                pressure = self.ui.lineEdit_N5_Pressure.text()
271
                if pressure:
272
                    connector.nozzle_data.pressure = float(pressure)    
273
                else: 
274
                    connector.nozzle_data.pressure = None
275

  
276
                elevation = self.ui.lineEdit_N5_Elevation.text()
277
                if elevation:
278
                    connector.nozzle_data.elevation = float(elevation)  
279
                else:
280
                    connector.nozzle_data.elevation = None
281
            elif index == 6:
282
                pressure = self.ui.lineEdit_N6_Pressure.text()
283
                if pressure:
284
                    connector.nozzle_data.pressure = float(pressure)    
285
                else: 
286
                    connector.nozzle_data.pressure = None
287

  
288
                elevation = self.ui.lineEdit_N6_Elevation.text()
289
                if elevation:
290
                    connector.nozzle_data.elevation = float(elevation)  
291
                else:
292
                    connector.nozzle_data.elevation = None
293
            elif index == 7:
294
                pressure = self.ui.lineEdit_N7_Pressure.text()
295
                if pressure:
296
                    connector.nozzle_data.pressure = float(pressure)    
297
                else: 
298
                    connector.nozzle_data.pressure = None
299

  
300
                elevation = self.ui.lineEdit_N7_Elevation.text()
301
                if elevation:
302
                    connector.nozzle_data.elevation = float(elevation)  
303
                else:
304
                    connector.nozzle_data.elevation = None
305
            elif index == 8:
306
                pressure = self.ui.lineEdit_N8_Pressure.text()
307
                if pressure:
308
                    connector.nozzle_data.pressure = float(pressure)    
309
                else: 
310
                    connector.nozzle_data.pressure = None
311

  
312
                elevation = self.ui.lineEdit_N8_Elevation.text()
313
                if elevation:
314
                    connector.nozzle_data.elevation = float(elevation)  
315
                else:
316
                    connector.nozzle_data.elevation = None
317
            elif index == 9:
318
                pressure = self.ui.lineEdit_N9_Pressure.text()
319
                if pressure:
320
                    connector.nozzle_data.pressure = float(pressure)    
321
                else: 
322
                    connector.nozzle_data.pressure = None
323

  
324
                elevation = self.ui.lineEdit_N9_Elevation.text()
325
                if elevation:
326
                    connector.nozzle_data.elevation = float(elevation)  
327
                else:
328
                    connector.nozzle_data.elevation = None
329

  
146 330
        QDialog.accept(self)
147 331

  
148 332
    def reject(self):
HYTOS/HYTOS/Drum_Horizontal.py
20 20

  
21 21
        self.ui = Drum_Horizontal_UI.Ui_Drum_HorizontalDialog()
22 22
        self.ui.setupUi(self)
23

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

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

  
23 46
        self.initialize()
24 47

  
25 48
    def showDialog(self, item):
26 49
        self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
50
        self._item = item
27 51

  
28 52
        self.ui.lineEdit_TagNo.setFocus()
29 53
        self.set_controls(item)
30
        self.load_units()
54
        self.load_data()
31 55
        
32 56
        self.exec_()
33 57

  
......
140 164
                    self.ui.lineEdit_N10_Pressure.setEnabled(True)                
141 165
                    self.ui.lineEdit_N10_Elevation.setEnabled(True)  
142 166
     
143
    def load_units(self):
167
    def load_data(self):
168
        """ load tag no and nozzle data """
144 169
        from Drawing import Drawing
145 170
        
146 171
        appDocData = AppDocData.instance()
......
150 175
                if attr[0] == 'Units':
151 176
                    self.ui.label_PressureUnit.setText(attr[1]['Pressure'])
152 177
                    self.ui.label_ElevationUnit.setText(attr[1]['Length'])
153
                
178

  
179
        for connector in self._item.connectors:
180
            index = connector._conn_index
181
            if connector.nozzle_data:
182
                pressure = connector.nozzle_data.pressure                                
183
                if pressure:
184
                    if index == 1:
185
                        self.ui.lineEdit_N1_Pressure.setText(str(pressure))
186
                    elif index == 2:
187
                        self.ui.lineEdit_N2_Pressure.setText(str(pressure))
188
                    elif index == 3:
189
                        self.ui.lineEdit_N3_Pressure.setText(str(pressure))
190
                    elif index == 4:
191
                        self.ui.lineEdit_N4_Pressure.setText(str(pressure))
192
                    elif index == 5:
193
                        self.ui.lineEdit_N5_Pressure.setText(str(pressure))  
194
                    elif index == 6:
195
                        self.ui.lineEdit_N6_Pressure.setText(str(pressure))
196
                    elif index == 7:
197
                        self.ui.lineEdit_N7_Pressure.setText(str(pressure))              
198
                    elif index == 8:
199
                        self.ui.lineEdit_N8_Pressure.setText(str(pressure))
200
                    elif index == 9:
201
                        self.ui.lineEdit_N9_Pressure.setText(str(pressure))              
202
                    elif index == 10:
203
                        self.ui.lineEdit_N10_Pressure.setText(str(pressure))
204

  
205
                elevation = connector.nozzle_data.elevation
206
                if elevation:
207
                    if index == 1:
208
                        self.ui.lineEdit_N1_Elevation.setText(str(elevation))
209
                    elif index == 2:
210
                        self.ui.lineEdit_N2_Elevation.setText(str(elevation))
211
                    elif index == 3:
212
                        self.ui.lineEdit_N3_Elevation.setText(str(elevation))
213
                    elif index == 4:
214
                        self.ui.lineEdit_N4_Elevation.setText(str(elevation))
215
                    elif index == 5:
216
                        self.ui.lineEdit_N5_Elevation.setText(str(elevation))  
217
                    elif index == 6:
218
                        self.ui.lineEdit_N6_Elevation.setText(str(elevation))
219
                    elif index == 7:
220
                        self.ui.lineEdit_N7_Elevation.setText(str(elevation))              
221
                    elif index == 8:
222
                        self.ui.lineEdit_N8_Elevation.setText(str(elevation))
223
                    elif index == 9:
224
                        self.ui.lineEdit_N9_Elevation.setText(str(elevation))              
225
                    elif index == 10:
226
                        self.ui.lineEdit_N10_Elevation.setText(str(elevation))
227

  
154 228
    def accept(self):   
229

  
230
        """ set tag no and nozzle data """
231
        from EngineeringConnectorItem import NozzleData
232

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

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

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

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

  
269
                elevation = self.ui.lineEdit_N3_Elevation.text()
... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.

내보내기 Unified diff

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