프로젝트

일반

사용자정보

개정판 c0f8c341

IDc0f8c34166b6f5440c409dcfab9b98cee74a65d1
상위 e618acaf
하위 a4cbc318, 24b1417c

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

issue #1053 : 장치 데이터 입력

Change-Id: I485acf32e2f0d66d2bab1fe1321c64b9a3d1d0c5

차이점 보기:

HYTOS/HYTOS/ShlTubHeatExchanger.py
99 99
                used_index.append(connector._conn_index)
100 100

  
101 101
        if len(used_index) > 0:
102
            if 1 in used_index or 3 in used_index:
103
                self.ui.label_Img_Tub1.setVisible(True)
104
                self.ui.label_Img_Tub2.setVisible(True)
105
                self.ui.label_Img_Tub3.setVisible(True)
106
                self.ui.label_Img_Tub4.setVisible(True)
102
            if self._item.name == 'HEX_H':
103
                if 1 in used_index or 3 in used_index:
104
                    self.ui.label_Img_Shl1.setVisible(True)
105
                    self.ui.label_Img_Shl2.setVisible(True)
106
                    self.ui.label_Img_Shl3.setVisible(True)
107

  
108
                    self.ui.label_Shl.setVisible(True)
109
                    self.ui.lineEdit_Shl_Pressure_Drop.setEnabled(True)
110
                    self.ui.lineEdit_Shl_Elevation.setEnabled(True)
111

  
112
                if 2 in used_index or 4 in used_index:
113
                    self.ui.label_Img_Tub1.setVisible(True)
114
                    self.ui.label_Img_Tub2.setVisible(True)
115
                    self.ui.label_Img_Tub3.setVisible(True)
116
                    self.ui.label_Img_Tub4.setVisible(True)
117

  
118
                    self.ui.label_Tub.setVisible(True)
119
                    self.ui.lineEdit_Tub_Pressure_Drop.setEnabled(True)
120
                    self.ui.lineEdit_Tub_Elevation.setEnabled(True)
121
            else:
122
                if 1 in used_index or 3 in used_index:
123
                    self.ui.label_Img_Tub1.setVisible(True)
124
                    self.ui.label_Img_Tub2.setVisible(True)
125
                    self.ui.label_Img_Tub3.setVisible(True)
126
                    self.ui.label_Img_Tub4.setVisible(True)
107 127

  
108
                self.ui.label_Tub.setVisible(True)
109
                self.ui.lineEdit_Tub_Pressure_Drop.setEnabled(True)
110
                self.ui.lineEdit_Tub_Elevation.setEnabled(True)
128
                    self.ui.label_Tub.setVisible(True)
129
                    self.ui.lineEdit_Tub_Pressure_Drop.setEnabled(True)
130
                    self.ui.lineEdit_Tub_Elevation.setEnabled(True)
111 131

  
112
            if 2 in used_index or 4 in used_index:
113
                self.ui.label_Img_Shl1.setVisible(True)
114
                self.ui.label_Img_Shl2.setVisible(True)
115
                self.ui.label_Img_Shl3.setVisible(True)
132
                if 2 in used_index or 4 in used_index:
133
                    self.ui.label_Img_Shl1.setVisible(True)
134
                    self.ui.label_Img_Shl2.setVisible(True)
135
                    self.ui.label_Img_Shl3.setVisible(True)
116 136

  
117
                self.ui.label_Shl.setVisible(True)
118
                self.ui.lineEdit_Shl_Pressure_Drop.setEnabled(True)
119
                self.ui.lineEdit_Shl_Elevation.setEnabled(True)
137
                    self.ui.label_Shl.setVisible(True)
138
                    self.ui.lineEdit_Shl_Pressure_Drop.setEnabled(True)
139
                    self.ui.lineEdit_Shl_Elevation.setEnabled(True)
120 140

  
121 141
    def load_data(self):
122 142
        """ load tag no and nozzle data """
......
137 157
            if connector.data:
138 158
                pressure_drop = connector.data.pressure_drop
139 159
                if pressure_drop is not None:
140
                    if index == 1:
141
                        self.ui.lineEdit_Tub_Pressure_Drop.setText(str(convert_to_fixed_point(pressure_drop)))
142
                    elif index == 2:
143
                        self.ui.lineEdit_Shl_Pressure_Drop.setText(str(convert_to_fixed_point(pressure_drop)))
144
                    elif index == 3:
145
                        self.ui.lineEdit_Tub_Pressure_Drop.setText(str(convert_to_fixed_point(pressure_drop)))
146
                    elif index == 4:
147
                        self.ui.lineEdit_Shl_Pressure_Drop.setText(str(convert_to_fixed_point(pressure_drop)))
160
                    if self._item.name == 'HEX_H':
161
                        if index == 1:
162
                            self.ui.lineEdit_Shl_Pressure_Drop.setText(str(convert_to_fixed_point(pressure_drop)))
163
                        elif index == 2:
164
                            self.ui.lineEdit_Tub_Pressure_Drop.setText(str(convert_to_fixed_point(pressure_drop)))
165
                        elif index == 3:
166
                            self.ui.lineEdit_Shl_Pressure_Drop.setText(str(convert_to_fixed_point(pressure_drop)))
167
                        elif index == 4:
168
                            self.ui.lineEdit_Tub_Pressure_Drop.setText(str(convert_to_fixed_point(pressure_drop)))
169
                    else:
170
                        if index == 1:
171
                            self.ui.lineEdit_Tub_Pressure_Drop.setText(str(convert_to_fixed_point(pressure_drop)))
172
                        elif index == 2:
173
                            self.ui.lineEdit_Shl_Pressure_Drop.setText(str(convert_to_fixed_point(pressure_drop)))
174
                        elif index == 3:
175
                            self.ui.lineEdit_Tub_Pressure_Drop.setText(str(convert_to_fixed_point(pressure_drop)))
176
                        elif index == 4:
177
                            self.ui.lineEdit_Shl_Pressure_Drop.setText(str(convert_to_fixed_point(pressure_drop)))
148 178

  
149 179
                elevation = connector.data.elevation
150 180
                if elevation is not None:
151
                    if index == 1:
152
                        self.ui.lineEdit_Tub_Elevation.setText(str(convert_to_fixed_point(elevation)))
153
                    elif index == 2:
154
                        self.ui.lineEdit_Shl_Elevation.setText(str(convert_to_fixed_point(elevation)))
155
                    elif index == 3:
156
                        self.ui.lineEdit_Tub_Elevation.setText(str(convert_to_fixed_point(elevation)))
157
                    elif index == 4:
158
                        self.ui.lineEdit_Shl_Elevation.setText(str(convert_to_fixed_point(elevation)))
181
                    if self._item.name == 'HEX_H':
182
                        if index == 1:
183
                            self.ui.lineEdit_Shl_Elevation.setText(str(convert_to_fixed_point(elevation)))
184
                        elif index == 2:
185
                            self.ui.lineEdit_Tub_Elevation.setText(str(convert_to_fixed_point(elevation)))
186
                        elif index == 3:
187
                            self.ui.lineEdit_Shl_Elevation.setText(str(convert_to_fixed_point(elevation)))
188
                        elif index == 4:
189
                            self.ui.lineEdit_Tub_Elevation.setText(str(convert_to_fixed_point(elevation)))
190
                    else:
191
                        if index == 1:
192
                            self.ui.lineEdit_Tub_Elevation.setText(str(convert_to_fixed_point(elevation)))
193
                        elif index == 2:
194
                            self.ui.lineEdit_Shl_Elevation.setText(str(convert_to_fixed_point(elevation)))
195
                        elif index == 3:
196
                            self.ui.lineEdit_Tub_Elevation.setText(str(convert_to_fixed_point(elevation)))
197
                        elif index == 4:
198
                            self.ui.lineEdit_Shl_Elevation.setText(str(convert_to_fixed_point(elevation)))
159 199

  
160 200
    def accept(self):
161 201
        """ set tag no and nozzle data """
......
169 209
                if not connector.data:
170 210
                    connector.data = NozzleData()
171 211

  
172
                if index == 1:
173
                    if self.ui.lineEdit_Tub_Pressure_Drop.isEnabled():
174
                        pressure_drop = self.ui.lineEdit_Tub_Pressure_Drop.text()
175
                        if pressure_drop:
176
                            connector.data.pressure_drop = float(pressure_drop)
177
                        else:
178
                            connector.data.pressure_drop = 0
179

  
180
                    if self.ui.lineEdit_Tub_Elevation.isEnabled():
181
                        elevation = self.ui.lineEdit_Tub_Elevation.text()
182
                        if elevation:
183
                            connector.data.elevation = float(elevation)
184
                        else:
185
                            connector.data.elevation = 0
186
                elif index == 2:
187
                    if self.ui.lineEdit_Shl_Pressure_Drop.isEnabled():
188
                        pressure_drop = self.ui.lineEdit_Shl_Pressure_Drop.text()
189
                        if pressure_drop:
190
                            connector.data.pressure_drop = float(pressure_drop)
191
                        else:
192
                            connector.data.pressure_drop = 0
193

  
194
                    if self.ui.lineEdit_Shl_Elevation.isEnabled():
195
                        elevation = self.ui.lineEdit_Shl_Elevation.text()
196
                        if elevation:
197
                            connector.data.elevation = float(elevation)
198
                        else:
199
                            connector.data.elevation = 0
200
                elif index == 3:
201
                    if self.ui.lineEdit_Tub_Pressure_Drop.isEnabled():
202
                        pressure_drop = self.ui.lineEdit_Tub_Pressure_Drop.text()
203
                        if pressure_drop:
204
                            connector.data.pressure_drop = float(pressure_drop)
205
                        else:
206
                            connector.data.pressure_drop = 0
207

  
208
                    if self.ui.lineEdit_Tub_Elevation.isEnabled():
209
                        elevation = self.ui.lineEdit_Tub_Elevation.text()
210
                        if elevation:
211
                            connector.data.elevation = float(elevation)
212
                        else:
213
                            connector.data.elevation = 0
214
                elif index == 4:
215
                    if self.ui.lineEdit_Shl_Pressure_Drop.isEnabled():
216
                        pressure_drop = self.ui.lineEdit_Shl_Pressure_Drop.text()
217
                        if pressure_drop:
218
                            connector.data.pressure_drop = float(pressure_drop)
219
                        else:
220
                            connector.data.pressure_drop = 0
221

  
222
                    if self.ui.lineEdit_Shl_Elevation.isEnabled():
223
                        elevation = self.ui.lineEdit_Shl_Elevation.text()
224
                        if elevation:
225
                            connector.data.elevation = float(elevation)
226
                        else:
227
                            connector.data.elevation = 0
212
                if self._item.name == 'HEX_H':
213
                    if index == 1:
214
                        if self.ui.lineEdit_Shl_Pressure_Drop.isEnabled():
215
                            pressure_drop = self.ui.lineEdit_Shl_Pressure_Drop.text()
216
                            if pressure_drop:
217
                                connector.data.pressure_drop = float(pressure_drop)
218
                            else:
219
                                connector.data.pressure_drop = 0
220

  
221
                        if self.ui.lineEdit_Shl_Elevation.isEnabled():
222
                            elevation = self.ui.lineEdit_Shl_Elevation.text()
223
                            if elevation:
224
                                connector.data.elevation = float(elevation)
225
                            else:
226
                                connector.data.elevation = 0
227
                    elif index == 2:
228
                        if self.ui.lineEdit_Tub_Pressure_Drop.isEnabled():
229
                            pressure_drop = self.ui.lineEdit_Tub_Pressure_Drop.text()
230
                            if pressure_drop:
231
                                connector.data.pressure_drop = float(pressure_drop)
232
                            else:
233
                                connector.data.pressure_drop = 0
234

  
235
                        if self.ui.lineEdit_Tub_Elevation.isEnabled():
236
                            elevation = self.ui.lineEdit_Tub_Elevation.text()
237
                            if elevation:
238
                                connector.data.elevation = float(elevation)
239
                            else:
240
                                connector.data.elevation = 0
241
                    elif index == 3:
242
                        if self.ui.lineEdit_Shl_Pressure_Drop.isEnabled():
243
                            pressure_drop = self.ui.lineEdit_Shl_Pressure_Drop.text()
244
                            if pressure_drop:
245
                                connector.data.pressure_drop = float(pressure_drop)
246
                            else:
247
                                connector.data.pressure_drop = 0
248

  
249
                        if self.ui.lineEdit_Shl_Elevation.isEnabled():
250
                            elevation = self.ui.lineEdit_Tub_Elevation.text()
251
                            if elevation:
252
                                connector.data.elevation = float(elevation)
253
                            else:
254
                                connector.data.elevation = 0
255
                    elif index == 4:
256
                        if self.ui.lineEdit_Tub_Pressure_Drop.isEnabled():
257
                            pressure_drop = self.ui.lineEdit_Tub_Pressure_Drop.text()
258
                            if pressure_drop:
259
                                connector.data.pressure_drop = float(pressure_drop)
260
                            else:
261
                                connector.data.pressure_drop = 0
262

  
263
                        if self.ui.lineEdit_Tub_Elevation.isEnabled():
264
                            elevation = self.ui.lineEdit_Tub_Elevation.text()
265
                            if elevation:
266
                                connector.data.elevation = float(elevation)
267
                            else:
268
                                connector.data.elevation = 0
269
                else:
270
                    if index == 1:
271
                        if self.ui.lineEdit_Tub_Pressure_Drop.isEnabled():
272
                            pressure_drop = self.ui.lineEdit_Tub_Pressure_Drop.text()
273
                            if pressure_drop:
274
                                connector.data.pressure_drop = float(pressure_drop)
275
                            else:
276
                                connector.data.pressure_drop = 0
277

  
278
                        if self.ui.lineEdit_Tub_Elevation.isEnabled():
279
                            elevation = self.ui.lineEdit_Tub_Elevation.text()
280
                            if elevation:
281
                                connector.data.elevation = float(elevation)
282
                            else:
283
                                connector.data.elevation = 0
284
                    elif index == 2:
285
                        if self.ui.lineEdit_Shl_Pressure_Drop.isEnabled():
286
                            pressure_drop = self.ui.lineEdit_Shl_Pressure_Drop.text()
287
                            if pressure_drop:
288
                                connector.data.pressure_drop = float(pressure_drop)
289
                            else:
290
                                connector.data.pressure_drop = 0
291

  
292
                        if self.ui.lineEdit_Shl_Elevation.isEnabled():
293
                            elevation = self.ui.lineEdit_Shl_Elevation.text()
294
                            if elevation:
295
                                connector.data.elevation = float(elevation)
296
                            else:
297
                                connector.data.elevation = 0
298
                    elif index == 3:
299
                        if self.ui.lineEdit_Tub_Pressure_Drop.isEnabled():
300
                            pressure_drop = self.ui.lineEdit_Tub_Pressure_Drop.text()
301
                            if pressure_drop:
302
                                connector.data.pressure_drop = float(pressure_drop)
303
                            else:
304
                                connector.data.pressure_drop = 0
305

  
306
                        if self.ui.lineEdit_Tub_Elevation.isEnabled():
307
                            elevation = self.ui.lineEdit_Tub_Elevation.text()
308
                            if elevation:
309
                                connector.data.elevation = float(elevation)
310
                            else:
311
                                connector.data.elevation = 0
312
                    elif index == 4:
313
                        if self.ui.lineEdit_Shl_Pressure_Drop.isEnabled():
314
                            pressure_drop = self.ui.lineEdit_Shl_Pressure_Drop.text()
315
                            if pressure_drop:
316
                                connector.data.pressure_drop = float(pressure_drop)
317
                            else:
318
                                connector.data.pressure_drop = 0
319

  
320
                        if self.ui.lineEdit_Shl_Elevation.isEnabled():
321
                            elevation = self.ui.lineEdit_Shl_Elevation.text()
322
                            if elevation:
323
                                connector.data.elevation = float(elevation)
324
                            else:
325
                                connector.data.elevation = 0
228 326

  
229 327
            QDialog.accept(self)
230 328
        else:

내보내기 Unified diff

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