프로젝트

일반

사용자정보

개정판 638dd2dd

ID638dd2dd8a9ea9f4694f7c66305c7b5ed033155c
상위 d9aa8d67
하위 c46ad1e0

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

issue #1048 화면/메뉴/툴바 개발

Change-Id: I2ffdef915e4f767d72c49eeb9131024ff30cc3c6

차이점 보기:

HYTOS/HYTOS/BatteryLimit.py
21 21
        self.ui.setupUi(self)
22 22
        self.ui.lineEdit_Pressure.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Pressure))
23 23
        self.ui.lineEdit_Elevation.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Elevation))
24
        self._item = None
24 25
        self.initialize()
25 26
                
26 27
    def showDialog(self, item):
......
55 56
    def load_data(self):
56 57
        """ load tag no and nozzle data """
57 58
        from Drawing import Drawing
58
        
59
        appDocData = AppDocData.instance()
60
        drawing = appDocData.activeDrawing    
59
        self.ui.lineEdit_TagNo.setText(self._item.tag_no)
60

  
61
        app_doc_data = AppDocData.instance()
62
        drawing = app_doc_data.activeDrawing
61 63
        if drawing:
62 64
            for attr in drawing.attrs:
63 65
                if attr[0] == 'Units':
......
79 81
        """ set tag no and nozzle data """
80 82
        from EngineeringConnectorItem import NozzleData
81 83

  
84
        self._item.tag_no = self.ui.lineEdit_TagNo.text()
85

  
82 86
        for connector in self._item.connectors:
83 87
            if not connector.data: 
84 88
                connector.data = NozzleData()
HYTOS/HYTOS/Calculation.py
51 51
                        hmb.inside_pipe_size = self.convert_pipe_diameter(hmb.inside_pipe_size)
52 52
                    if hmb.straight_length:
53 53
                        hmb.straight_length = self.convert_length(hmb.straight_length)
54
                    if hmb.equivalent_length:
55
                        hmb.equivalent_length = self.convert_length(hmb.equivalent_length)
54 56
                    if hmb.straight_length:
55 57
                        hmb.straight_length = self.convert_length(hmb.straight_length)
56 58
                    if hmb.equivalent_length_input:
......
639 641
            self.calculation_Mixed()
640 642
        '''
641 643

  
642
    def get_equivalent_length(self):
643
        if self._hmb.equivalent_length_input:
644
            return self._hmb.equivalent_length_input
645
        else:
646
            return self._hmb.equivalent_length_cal
647

  
648 644
    def validation_check_vapor(self):
649 645
        result = False
650 646

  
......
682 678
        result = False
683 679

  
684 680
        # 1.  Equivalent Length
685
        equivalent_length = self.get_equivalent_length()
686
        if equivalent_length is None:
681
        if self._hmb.equivalent_length is None:
687 682
            message = 'The equivalent length of stream <{}> is not inputted.'.format(self._hmb.stream_no)
688 683
            App.mainWnd().addMessage.emit(MessageType.Information, message)
689 684
            return result
......
1004 999
            elif length_unit == 'mm':
1005 1000
                self._hmb.pressure_drop = round(dp / 1000, 3)
1006 1001

  
1007
            equivalent_length = self.get_equivalent_length()
1008 1002
            # '100m 당 압력강하를 상당길이에 맞춰서 전체 압력강하로 넣어줌 ..
1009
            self._hmb.pressure_drop_friction = round(self._hmb.pressure_drop / 100 * equivalent_length, 3)
1003
            self._hmb.pressure_drop_friction = round(self._hmb.pressure_drop / 100 * self._hmb.equivalent_length, 3)
1010 1004

  
1011 1005
        except Exception as ex:
1012 1006

  
......
1216 1210
        elif length_unit == 'mm':
1217 1211
            self._hmb.pressure_drop = round(dp / 1000, 3)
1218 1212

  
1219
        equivalent_length = self.get_equivalent_length()
1220 1213
        # '100m 당 압력강하를 상당길이에 맞춰서 전체 압력강하로 넣어줌 ..
1221
        self._hmb.pressure_drop_friction = round(self._hmb.pressure_drop / 100 * equivalent_length, 3)
1214
        self._hmb.pressure_drop_friction = round(self._hmb.pressure_drop / 100 * self._hmb.equivalent_length, 3)
1222 1215

  
1223 1216
        # 'friction factor는 필요없음
1224 1217
        self._hmb.friction_factor = None
HYTOS/HYTOS/Configuration_UI.py
1145 1145
        self.gridLayout_15.addWidget(self.tabWidget, 1, 0, 1, 1)
1146 1146

  
1147 1147
        self.retranslateUi(ConfigurationDialog)
1148
        self.tabWidget.setCurrentIndex(2)
1148
        self.tabWidget.setCurrentIndex(0)
1149 1149
        self.buttonBox.accepted.connect(ConfigurationDialog.accept)
1150 1150
        self.buttonBox.rejected.connect(ConfigurationDialog.reject)
1151 1151
        QtCore.QMetaObject.connectSlotsByName(ConfigurationDialog)
HYTOS/HYTOS/FittingsDialog.py
38 38
        self.ui = Fittings_UI.Ui_Dialog()
39 39
        self.ui.setupUi(self)
40 40

  
41
        self.isAccepted = False
41 42
        self.pipe_diameter_unit = None
42 43
        self.fittings_length = 0
43 44
        self.total_k = 0
......
2216 2217
        self.ui.lineEdit_CraneK_Main_Size.setText(str(self.nps))
2217 2218
        self.exec_()
2218 2219

  
2219
        return self.fittings_length, self.total_k
2220
        return self.isAccepted, self.fittings_length, self.total_k
2220 2221

  
2221 2222
    def set_nominal_diameter_info(self, nominal_diameter_uid):
2222 2223
        try:
......
2545 2546
                # 2-K
2546 2547
                self.fittings_length = 0
2547 2548
                self.total_k = self.get_2_k_total_k()
2549

  
2550
            self.isAccepted = True
2548 2551
        except Exception as ex:
2549 2552
            from App import App
2550 2553
            from AppDocData import MessageType
HYTOS/HYTOS/GeometryData_MixedDialog.py
25 25
        self.units = {}
26 26
        self.isAccepted = False
27 27
        self.row_count = 0
28

  
29
        self.ui.lineEdit_Length.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Length))
30
        self.ui.lineEdit_Angle.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Angle))
31
        self.ui.lineEdit_rpd.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_rpd))
32
        self.ui.lineEdit_d1_d2.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_d1_d2))
33
        self.ui.lineEdit_k.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_k))
34

  
28 35
        self.ui.pushButton_Roughness.clicked.connect(self.roughness_clicked_event)
36
        self.ui.pushButton_Angle.clicked.connect(self.angle_clicked_event)
29 37
        self.ui.comboBox_Nominal_Pipe_Size.currentIndexChanged.connect(self.getInsideDiameter)
30 38
        self.ui.comboBox_Schedule_No.currentIndexChanged.connect(self.getInsideDiameter)
31 39

  
......
34 42
        self.ui.pushButton_rpd_Help.clicked.connect(self.show_help_dialog)
35 43
        self.ui.pushButton_K_Help.clicked.connect(self.show_help_dialog)
36 44

  
45
        self.ui.comboBox_Element.currentIndexChanged.connect(self.current_index_change_event)
46

  
37 47
        self.init_units()
38 48
        self.init_nominal_diameter()
39 49
        self.init_schedule()
40 50

  
51
    def current_index_change_event(self, index):
52
        try:
53
            self.ui.comboBox_Nominal_Pipe_Size.setCurrentIndex(-1)
54
            self.ui.comboBox_Schedule_No.setCurrentIndex(-1)
55
            self.ui.lineEdit_Inside_Pipe_Size.setEnabled(True)
56
            self.ui.lineEdit_Inside_Pipe_Size.clear()
57
            self.ui.lineEdit_Roughness.clear()
58
            self.ui.lineEdit_Length.setEnabled(True)
59
            self.ui.lineEdit_Length.clear()
60
            self.ui.pushButton_Angle.setEnabled(True)
61
            self.ui.lineEdit_Angle.setEnabled(True)
62
            self.ui.lineEdit_Angle.clear()
63
            self.ui.lineEdit_rpd.setEnabled(True)
64
            self.ui.lineEdit_rpd.clear()
65
            self.ui.lineEdit_d1_d2.setEnabled(True)
66
            self.ui.lineEdit_d1_d2.clear()
67
            self.ui.lineEdit_k.setEnabled(True)
68
            self.ui.lineEdit_k.clear()
69

  
70
            if index > -1:
71
                element = self.ui.comboBox_Element.itemText(index)
72

  
73
                if element == 'Pipe':
74
                    self.ui.lineEdit_Angle.setText('0')
75
                    self.ui.lineEdit_rpd.setEnabled(False)
76
                    self.ui.lineEdit_d1_d2.setEnabled(False)
77
                    self.ui.lineEdit_k.setEnabled(False)
78
                elif element == 'Bend':
79
                    self.ui.lineEdit_Angle.setText('90')
80
                    self.ui.lineEdit_rpd.setText('1.5')
81
                    self.ui.lineEdit_Length.setEnabled(False)
82
                    self.ui.lineEdit_d1_d2.setEnabled(False)
83
                elif element == 'Reducer' or element == 'Expander':
84
                    self.ui.lineEdit_Length.setEnabled(False)
85
                    self.ui.lineEdit_rpd.setEnabled(False)
86
                else:
87
                    self.ui.pushButton_Angle.setEnabled(False)
88
                    self.ui.lineEdit_Length.setEnabled(False)
89
                    self.ui.lineEdit_Angle.setEnabled(False)
90
                    self.ui.lineEdit_rpd.setEnabled(False)
91
                    self.ui.lineEdit_d1_d2.setEnabled(False)
92
        except Exception as ex:
93
            from App import App
94
            from AppDocData import MessageType
95

  
96
            message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)
97
            App.mainWnd().addMessage.emit(MessageType.Error, message)
98

  
41 99
    def show_dialog(self, row_count):
42 100
        self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint)
43 101
        self.row_count = row_count
44 102
        self.init_element()
45 103
        self.exec_()
46 104

  
47
        return self.isAccepted, self.ui.comboBox_Element.currentText(), self.ui.comboBox_Nominal_Pipe_Size.currentText(), self.ui.comboBox_Schedule_No.currentText()
105
        return self.isAccepted, self.ui.comboBox_Element.currentText(), self.ui.comboBox_Nominal_Pipe_Size.currentText(), \
106
               self.ui.comboBox_Schedule_No.currentText(), self.ui.lineEdit_Inside_Pipe_Size.text(), self.ui.lineEdit_Roughness.text(), \
107
               self.ui.lineEdit_Length.text(), self.ui.lineEdit_Angle.text(), self.ui.lineEdit_rpd.text(), self.ui.lineEdit_d1_d2.text(), self.ui.lineEdit_k.text()
48 108

  
49 109
    def init_element(self):
50 110
        self.ui.comboBox_Element.clear()
......
83 143
        dialog = QGeometryData_HelpDialog()
84 144
        dialog.show_dialog(name)
85 145

  
86

  
87 146
    def init_nominal_diameter(self):
88 147
        from AppDocData import AppDocData
89 148

  
......
108 167

  
109 168
        self.ui.comboBox_Schedule_No.setCurrentIndex(-1)
110 169

  
170
    def angle_clicked_event(self):
171
        from GeometryData_AngleDialog import QGeometryData_AngleDialog
172

  
173
        dialog = QGeometryData_AngleDialog()
174
        angle = dialog.show_dialog()
175

  
176
        self.ui.lineEdit_Angle.setText(str(angle))
177

  
111 178
    def roughness_clicked_event(self):
112 179
        from RoughnessDialog import QRoughnessDialog
113 180

  
......
128 195
            inside_diameter = AppDocData.instance().getInsideDiameter(nominal_diameter_uid, schedule_uid)
129 196
            if len(inside_diameter) > 0:
130 197
                if self.ui.label_Inside_Pipe_Size_Unit.text() == 'mm':
131
                    self.ui.lineEdit_Inside_Pipe_Size.setText(str(inside_diameter[0][1]))
198
                    if inside_diameter[0][1]:
199
                        self.ui.lineEdit_Inside_Pipe_Size.setText(str(inside_diameter[0][1]))
132 200
                else:
133
                    self.ui.lineEdit_Inside_Pipe_Size.setText(str(inside_diameter[0][2]))
201
                    if inside_diameter[0][2]:
202
                        self.ui.lineEdit_Inside_Pipe_Size.setText(str(inside_diameter[0][2]))
134 203

  
135 204
    def init_units(self):
136 205
        app_doc_data = AppDocData.instance()
HYTOS/HYTOS/GeometryData_Mixed_UI.py
13 13
class Ui_Dialog(object):
14 14
    def setupUi(self, Dialog):
15 15
        Dialog.setObjectName("Dialog")
16
        Dialog.resize(428, 347)
16
        Dialog.resize(338, 354)
17 17
        font = QtGui.QFont()
18 18
        font.setFamily("맑은 고딕")
19 19
        Dialog.setFont(font)
......
94 94
        self.lineEdit_Inside_Pipe_Size.setMinimumSize(QtCore.QSize(0, 0))
95 95
        self.lineEdit_Inside_Pipe_Size.setMaximumSize(QtCore.QSize(16777215, 16777215))
96 96
        self.lineEdit_Inside_Pipe_Size.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
97
        self.lineEdit_Inside_Pipe_Size.setReadOnly(True)
97 98
        self.lineEdit_Inside_Pipe_Size.setObjectName("lineEdit_Inside_Pipe_Size")
98 99
        self.horizontalLayout_9.addWidget(self.lineEdit_Inside_Pipe_Size)
99 100
        self.label_Inside_Pipe_Size_Unit = QtWidgets.QLabel(Dialog)
......
115 116
        self.lineEdit_Roughness.setMinimumSize(QtCore.QSize(0, 0))
116 117
        self.lineEdit_Roughness.setMaximumSize(QtCore.QSize(16777215, 16777215))
117 118
        self.lineEdit_Roughness.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
119
        self.lineEdit_Roughness.setReadOnly(True)
118 120
        self.lineEdit_Roughness.setObjectName("lineEdit_Roughness")
119 121
        self.horizontalLayout_10.addWidget(self.lineEdit_Roughness)
120 122
        self.label_Roughness_Unit = QtWidgets.QLabel(Dialog)
......
145 147
        self.verticalLayout.addLayout(self.horizontalLayout_7)
146 148
        self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
147 149
        self.horizontalLayout_6.setObjectName("horizontalLayout_6")
148
        self.label_7 = QtWidgets.QLabel(Dialog)
149
        self.label_7.setMinimumSize(QtCore.QSize(129, 0))
150
        self.label_7.setMaximumSize(QtCore.QSize(129, 16777215))
151
        self.label_7.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
152
        self.label_7.setObjectName("label_7")
153
        self.horizontalLayout_6.addWidget(self.label_7)
150
        spacerItem1 = QtWidgets.QSpacerItem(54, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
151
        self.horizontalLayout_6.addItem(spacerItem1)
152
        self.pushButton_Angle = QtWidgets.QPushButton(Dialog)
153
        self.pushButton_Angle.setMinimumSize(QtCore.QSize(75, 0))
154
        self.pushButton_Angle.setMaximumSize(QtCore.QSize(75, 16777215))
155
        self.pushButton_Angle.setObjectName("pushButton_Angle")
156
        self.horizontalLayout_6.addWidget(self.pushButton_Angle)
154 157
        self.lineEdit_Angle = QtWidgets.QLineEdit(Dialog)
155 158
        self.lineEdit_Angle.setMinimumSize(QtCore.QSize(0, 0))
156 159
        self.lineEdit_Angle.setMaximumSize(QtCore.QSize(16777215, 16777215))
......
235 238
        self.verticalLayout.addLayout(self.horizontalLayout_2)
236 239
        self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)
237 240
        self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
241
        self.buttonBox.setLayoutDirection(QtCore.Qt.LeftToRight)
238 242
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
239 243
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
240 244
        self.buttonBox.setObjectName("buttonBox")
241
        self.gridLayout.addWidget(self.buttonBox, 1, 0, 1, 1)
245
        self.gridLayout.addWidget(self.buttonBox, 2, 0, 1, 1)
246
        spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
247
        self.gridLayout.addItem(spacerItem2, 1, 0, 1, 1)
242 248

  
243 249
        self.retranslateUi(Dialog)
244 250
        self.buttonBox.accepted.connect(Dialog.accept)
......
258 264
        self.label_Roughness_Unit.setText(_translate("Dialog", "-"))
259 265
        self.label_6.setText(_translate("Dialog", "Length :"))
260 266
        self.label_Lengh_Unit.setText(_translate("Dialog", "-"))
261
        self.label_7.setText(_translate("Dialog", "Angle :"))
267
        self.pushButton_Angle.setText(_translate("Dialog", "Angle"))
262 268
        self.label_8.setText(_translate("Dialog", "r/D :"))
263 269
        self.label_9.setText(_translate("Dialog", "D1/D2 :"))
264 270
        self.label_10.setText(_translate("Dialog", "K :"))
HYTOS/HYTOS/HMBTable.py
28 28
        self._inside_pipe_size = None
29 29
        self._schedule_no = None
30 30
        self._straight_length = None
31
        self._equivalent_length = None
31 32
        self._equivalent_length_input = None
32 33
        self._fitting_length = None
33 34
        self._fitting_K = None
......
207 208
        self._straight_length = float(value) if value else None
208 209

  
209 210
    @property
211
    def equivalent_length(self):
212
        return self._equivalent_length
213

  
214
    @equivalent_length.setter
215
    def equivalent_length(self, value):
216
        self._equivalent_length = float(value) if value else None
217

  
218
    @property
210 219
    def equivalent_length_input(self):
211 220
        return self._equivalent_length_input
212 221

  
......
344 353
        hmb._inside_pipe_size = row[13]
345 354
        hmb._schedule_no = row[14]
346 355
        hmb._straight_length = row[15]
347
        hmb._equivalent_length_input = row[16]
348
        hmb._fitting_length = row[17]
349
        hmb._fitting_K = row[18]
350
        hmb._equivalent_length_cal = row[19]
351
        hmb._roughness = row[20]
352
        hmb._limitation_velocity = row[21]
353
        hmb._limitation_pressure_drop = row[22]
354
        hmb._velocity = row[23]
355
        hmb._reynolds = row[24]
356
        hmb._friction_factor = row[25]
357
        hmb._pressure_drop = row[26]
358
        hmb._pressure_drop_friction = row[27]
359
        hmb._pressure_drop_static = row[28]
360
        hmb._pressure_pipe_end_point = row[29]
361
        hmb._power = row[30]
356
        hmb._equivalent_length = row[16]
357
        hmb._equivalent_length_input = row[17]
358
        hmb._fitting_length = row[18]
359
        hmb._fitting_K = row[19]
360
        hmb._equivalent_length_cal = row[20]
361
        hmb._roughness = row[21]
362
        hmb._limitation_velocity = row[22]
363
        hmb._limitation_pressure_drop = row[23]
364
        hmb._velocity = row[24]
365
        hmb._reynolds = row[25]
366
        hmb._friction_factor = row[26]
367
        hmb._pressure_drop = row[27]
368
        hmb._pressure_drop_friction = row[28]
369
        hmb._pressure_drop_static = row[29]
370
        hmb._pressure_pipe_end_point = row[30]
371
        hmb._power = row[31]
362 372

  
363 373
        return hmb
364 374

  
......
436 446
                        hmb.schedule_no = values['Schedule_No']
437 447
                    if 'Straight_Length' in values:
438 448
                        hmb.straight_length = values['Straight_Length']
449
                    if 'Equivalent_Length' in values:
450
                        hmb.equivalent_length = values['Equivalent_Length']
439 451
                    if 'Equivalent_Length_Input' in values:
440 452
                        hmb.equivalent_length_input = values['Equivalent_Length_Input']
441 453
                    if 'Fitting_Length' in values:
......
510 522
                                , h.Inside_Pipe_Size
511 523
                                , h.Schedule_No
512 524
                                , h.Straight_Length
525
                                , h.Equivalent_Length
513 526
                                , h.Equivalent_Length_Input
514 527
                                , h.Fitting_Length
515 528
                                , h.Fitting_K
......
577 590
                                'Density', 'Viscosity',
578 591
                                'Temperature', 'Molecular_Weight', 'Specific_Heat_Ratio', 'Compress_Factor',
579 592
                                'Nominal_Pipe_Size', 'Inside_Pipe_Size',
580
                                'Schedule_No', 'Straight_Length', 'Equivalent_Length_Input', 'Fitting_Length',
593
                                'Schedule_No', 'Straight_Length', 'Equivalent_Length', 'Equivalent_Length_Input', 'Fitting_Length',
581 594
                                'Fitting_K', 'Equivalent_Length_Cal', 'Roughness', 'Limitation_Velocity',
582 595
                                'Limitation_Pressure_Drop',
583 596
                                'Velocity', 'Reynolds', 'Friction_Factor', 'Pressure_Drop', 'Pressure_Drop_Friction',
584 597
                                'Pressure_Drop_Static', 'Pressure_Pipe_End_Point', 'Power']
585
                        values = ['?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
598
                        values = ['?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
586 599
                                  '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?']
587 600
                        param = (
588 601
                            str(data.uid), str(data.components_uid), data.stream_no, data.phase_type,
......
590 603
                            data.flowrate_volume, data.density,
591 604
                            data.viscosity, data.temperature, data.molecular_weight, data.specific_heat_ratio,
592 605
                            data.compress_factor, data.nominal_pipe_size,
593
                            data.inside_pipe_size, data.schedule_no, data.straight_length, data.equivalent_length_input,
606
                            data.inside_pipe_size, data.schedule_no, data.straight_length, data.equivalent_length, data.equivalent_length_input,
594 607
                            data.fitting_length, data.fitting_K, data.equivalent_length_cal, data.roughness,
595 608
                            data.limitation_velocity,
596 609
                            data.limitation_pressure_drop, data.velocity, data.reynolds, data.friction_factor,
HYTOS/HYTOS/MainWindow.py
323 323
            self.tableWidgetHMB.setColumnCount(2)
324 324
        else:
325 325
            self.tableWidgetHMB.setColumnCount(0)
326
        self.tableWidgetHMB.hideRow(0)  # uid
327
        self.tableWidgetHMB.hideRow(1)  # components_uid
328
        self.tableWidgetHMB.hideRow(2)  # stream no
326

  
327
        self.tableWidgetHMB.hideRow(0)  # UID
328
        self.tableWidgetHMB.hideRow(1)  # Components_UID
329
        self.tableWidgetHMB.hideRow(2)  # Stream_No
330
        # self.tableWidgetHMB.hideRow(3)  # Phase_Type
331
        # self.tableWidgetHMB.hideRow(4)  # Flowrate_Mass
332
        # self.tableWidgetHMB.hideRow(5)  # Flowrate_Volume
333
        # self.tableWidgetHMB.hideRow(6)  # Density
334
        # self.tableWidgetHMB.hideRow(7)  # Viscosity
335
        # self.tableWidgetHMB.hideRow(8)  # Temperature
336
        # self.tableWidgetHMB.hideRow(9)  # Molecular_Weight
337
        # self.tableWidgetHMB.hideRow(10)  # Specific_Heat_Ratio
338
        # self.tableWidgetHMB.hideRow(11)  # Compress_Factor
339
        # self.tableWidgetHMB.hideRow(12)  # Nominal_Pipe_Size
340
        # self.tableWidgetHMB.hideRow(13)  # Inside_Pipe_Size
341
        # self.tableWidgetHMB.hideRow(14)  # Schedule_No
342
        # self.tableWidgetHMB.hideRow(15)  # Straight_Length
343
        # self.tableWidgetHMB.hideRow(16)  # Equivalent_Length
344
        self.tableWidgetHMB.hideRow(17)  # Equivalent_Length_Input
345
        self.tableWidgetHMB.hideRow(18)  # Fitting_Length
346
        self.tableWidgetHMB.hideRow(19)  # Fitting_K
347
        self.tableWidgetHMB.hideRow(20)  # Equivalent_Length_Cal
348
        # self.tableWidgetHMB.hideRow(21)  # Roughness
349
        # self.tableWidgetHMB.hideRow(22)  # Limitation_Velocity
350
        # self.tableWidgetHMB.hideRow(23)  # Limitation_Pressure_Drop
351
        # self.tableWidgetHMB.hideRow(24)  # Separator
352
        # self.tableWidgetHMB.hideRow(25)  # Velocity
353
        # self.tableWidgetHMB.hideRow(26)  # Reynolds
354
        # self.tableWidgetHMB.hideRow(27)  # Friction_Factor
355
        # self.tableWidgetHMB.hideRow(28)  # Pressure_Drop
356
        # self.tableWidgetHMB.hideRow(29)  # Pressure_Drop_Friction
357
        # self.tableWidgetHMB.hideRow(30)  # Pressure_Drop_Static
358
        # self.tableWidgetHMB.hideRow(31)  # Pressure_Pipe_End_Point
359
        self.tableWidgetHMB.hideRow(32)  # Power
360

  
329 361
        self.tableWidgetHMB.setEditTriggers(QAbstractItemView.NoEditTriggers)
330 362
        self.tableWidgetHMB.verticalHeader().setVisible(False)
331 363

  
......
339 371

  
340 372
            self.tableWidgetHMB.setItem(rowIndex, 0,
341 373
                                        self.setTableWidgetItemProperties(name, Qt.AlignLeft | Qt.AlignVCenter,
342
                                                                          QColor(230, 230, 230)))
374
                                                                          QColor(51, 153,
375
                                                                                 102)))  # QColor(230, 230, 230)))
343 376
            self.tableWidgetHMB.setItem(rowIndex, 1,
344 377
                                        self.setTableWidgetItemProperties(unit, Qt.AlignHCenter | Qt.AlignVCenter,
345
                                                                          QColor(230, 230, 230)))
378
                                                                          QColor(204, 255,
379
                                                                                 204)))  # QColor(230, 230, 230)))
346 380

  
347 381
            rowIndex += 1
348 382

  
......
437 471
            message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
438 472
                                                           sys.exc_info()[-1].tb_lineno)
439 473
            self.addMessage.emit(MessageType.Error, message)
474

  
440 475
    '''
441 476
        @brief      action save click event
442 477
        @author     kyouho
......
731 766
                    self.progress.setValue(self.progress.maximum())
732 767
                    self.progress.hide()
733 768
        except Exception as ex:
734
            message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)
769
            message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
770
                                                           sys.exc_info()[-1].tb_lineno)
735 771
            self.addMessage.emit(MessageType.Error, message)
736 772

  
737 773
    def display_loops(self, loops):
......
779 815

  
780 816
            self.tableWidgetLoop.resizeColumnsToContents()
781 817
            self.tableWidgetLoop.resizeRowsToContents()
818

  
782 819
    '''
783 820
        @brief  configuration
784 821
    '''
......
898 935

  
899 936
                self.tableWidgetHMB.setItem(rowIndex, 0,
900 937
                                            self.setTableWidgetItemProperties(name, Qt.AlignLeft | Qt.AlignVCenter,
901
                                                                              QColor(230, 230, 230)))
938
                                                                              QColor(51, 153,
939
                                                                                     102)))
940
                # QColor(230, 230, 230)))
902 941
                self.tableWidgetHMB.setItem(rowIndex, 1,
903 942
                                            self.setTableWidgetItemProperties(unit, Qt.AlignHCenter | Qt.AlignVCenter,
904
                                                                              QColor(230, 230, 230)))
943
                                                                              QColor(204, 255, 204)))
944
                # QColor(230, 230, 230)))
905 945

  
906 946
                rowIndex += 1
907 947

  
......
1136 1176
                stream_line.stream_no = stream_no
1137 1177
                drawing.hmbTable.add(components_uid, stream_no)
1138 1178
        except Exception as ex:
1139
            message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)
1179
            message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
1180
                                                           sys.exc_info()[-1].tb_lineno)
1140 1181
            self.addMessage.emit(MessageType.Error, message)
1141 1182

  
1142 1183
    def get_next_stream_no(self, drawing):
......
1198 1239
                                                                                               Qt.AlignHCenter | Qt.AlignVCenter))
1199 1240
                self.tableWidgetHMB.setItem(15, columnCount, self.setTableWidgetItemProperties(hmb.straight_length,
1200 1241
                                                                                               Qt.AlignHCenter | Qt.AlignVCenter))
1201
                self.tableWidgetHMB.setItem(16, columnCount,
1242
                self.tableWidgetHMB.setItem(16, columnCount, self.setTableWidgetItemProperties(hmb.equivalent_length,
1243
                                                                                               Qt.AlignHCenter | Qt.AlignVCenter))
1244

  
1245
                self.tableWidgetHMB.setItem(17, columnCount,
1202 1246
                                            self.setTableWidgetItemProperties(hmb.equivalent_length_input,
1203 1247
                                                                              Qt.AlignHCenter | Qt.AlignVCenter))
1204
                self.tableWidgetHMB.setItem(17, columnCount, self.setTableWidgetItemProperties(hmb.fitting_length,
1248
                self.tableWidgetHMB.setItem(18, columnCount, self.setTableWidgetItemProperties(hmb.fitting_length,
1205 1249
                                                                                               Qt.AlignHCenter | Qt.AlignVCenter))
1206
                self.tableWidgetHMB.setItem(18, columnCount, self.setTableWidgetItemProperties(hmb.fitting_K,
1250
                self.tableWidgetHMB.setItem(19, columnCount, self.setTableWidgetItemProperties(hmb.fitting_K,
1207 1251
                                                                                               Qt.AlignHCenter | Qt.AlignVCenter))
1208
                self.tableWidgetHMB.setItem(19, columnCount,
1252
                self.tableWidgetHMB.setItem(20, columnCount,
1209 1253
                                            self.setTableWidgetItemProperties(hmb.equivalent_length_cal,
1210 1254
                                                                              Qt.AlignHCenter | Qt.AlignVCenter))
1211
                self.tableWidgetHMB.setItem(20, columnCount, self.setTableWidgetItemProperties(hmb.roughness,
1255
                self.tableWidgetHMB.setItem(21, columnCount, self.setTableWidgetItemProperties(hmb.roughness,
1212 1256
                                                                                               Qt.AlignHCenter | Qt.AlignVCenter))
1213
                self.tableWidgetHMB.setItem(21, columnCount, self.setTableWidgetItemProperties(hmb.limitation_velocity,
1257
                self.tableWidgetHMB.setItem(22, columnCount, self.setTableWidgetItemProperties(hmb.limitation_velocity,
1214 1258
                                                                                               Qt.AlignHCenter | Qt.AlignVCenter))
1215
                self.tableWidgetHMB.setItem(22, columnCount,
1259
                self.tableWidgetHMB.setItem(23, columnCount,
1216 1260
                                            self.setTableWidgetItemProperties(hmb.limitation_pressure_drop,
1217 1261
                                                                              Qt.AlignHCenter | Qt.AlignVCenter))
1218
                self.tableWidgetHMB.setItem(23, columnCount, self.setTableWidgetItemProperties(hmb.velocity,
1262

  
1263
                self.tableWidgetHMB.setItem(24, columnCount, self.setTableWidgetItemProperties(None,
1264
                                                                                               Qt.AlignHCenter | Qt.AlignVCenter,
1265
                                                                                               QColor(153, 204, 255)))
1266

  
1267
                self.tableWidgetHMB.setItem(25, columnCount, self.setTableWidgetItemProperties(hmb.velocity,
1219 1268
                                                                                               Qt.AlignHCenter | Qt.AlignVCenter))
1220
                self.tableWidgetHMB.setItem(24, columnCount, self.setTableWidgetItemProperties(hmb.reynolds,
1269
                self.tableWidgetHMB.setItem(26, columnCount, self.setTableWidgetItemProperties(hmb.reynolds,
1221 1270
                                                                                               Qt.AlignHCenter | Qt.AlignVCenter))
1222
                self.tableWidgetHMB.setItem(25, columnCount, self.setTableWidgetItemProperties(hmb.friction_factor,
1271
                self.tableWidgetHMB.setItem(27, columnCount, self.setTableWidgetItemProperties(hmb.friction_factor,
1223 1272
                                                                                               Qt.AlignHCenter | Qt.AlignVCenter))
1224
                self.tableWidgetHMB.setItem(26, columnCount, self.setTableWidgetItemProperties(hmb.pressure_drop,
1273
                self.tableWidgetHMB.setItem(28, columnCount, self.setTableWidgetItemProperties(hmb.pressure_drop,
1225 1274
                                                                                               Qt.AlignHCenter | Qt.AlignVCenter))
1226
                self.tableWidgetHMB.setItem(27, columnCount,
1275
                self.tableWidgetHMB.setItem(29, columnCount,
1227 1276
                                            self.setTableWidgetItemProperties(hmb.pressure_drop_friction,
1228 1277
                                                                              Qt.AlignHCenter | Qt.AlignVCenter))
1229
                self.tableWidgetHMB.setItem(28, columnCount, self.setTableWidgetItemProperties(hmb.pressure_drop_static,
1278
                self.tableWidgetHMB.setItem(30, columnCount, self.setTableWidgetItemProperties(hmb.pressure_drop_static,
1230 1279
                                                                                               Qt.AlignHCenter | Qt.AlignVCenter))
1231
                self.tableWidgetHMB.setItem(29, columnCount,
1280
                self.tableWidgetHMB.setItem(31, columnCount,
1232 1281
                                            self.setTableWidgetItemProperties(hmb.pressure_pipe_end_point,
1233 1282
                                                                              Qt.AlignHCenter | Qt.AlignVCenter))
1234
                self.tableWidgetHMB.setItem(30, columnCount, self.setTableWidgetItemProperties(hmb.power,
1283
                self.tableWidgetHMB.setItem(32, columnCount, self.setTableWidgetItemProperties(hmb.power,
1235 1284
                                                                                               Qt.AlignHCenter | Qt.AlignVCenter))
1236 1285

  
1237 1286
                if hmb.isDeleted: self.tableWidgetHMB.hideColumn(columnCount)
HYTOS/HYTOS/Shapes/EngineeringStreamlineItem.py
705 705

  
706 706
            dialog = QStreamDataDialog()
707 707
            res = dialog.showDialog(self)
708
            if res == True:
708
            if res:
709 709
                self.load_HMB()
710 710

  
711 711
        except Exception as ex:
HYTOS/HYTOS/Shapes/SymbolSvgItem.py
60 60
        # attributeType uid
61 61
        self.attribute = ''
62 62
        self._properties = {SymbolProp(None, 'Supplied By', 'String'): None}
63

  
63
        self._tag_no = None
64 64
        self.setAcceptDrops(True)
65 65
        self.setAcceptHoverEvents(True)
66 66
        self.setAcceptedMouseButtons(Qt.LeftButton)
......
96 96
        """ return string represent uuid """
97 97
        return str(self.uid)
98 98

  
99

  
100
    @property
101
    def tag_no(self):
102
        return self._tag_no
103

  
104
    @tag_no.setter
105
    def tag_no(self, value):
106
        self._tag_no = value
107

  
99 108
    '''
100 109
        @breif  getter owner
101 110
        @author humkyung
HYTOS/HYTOS/StreamDataDialog.py
26 26
    return item
27 27

  
28 28

  
29
def is_not_blank(s):
30
    return bool(s and s.strip())
31

  
32

  
29 33
class QStreamDataDialog(QDialog):
30 34
    def __init__(self):
31 35
        QDialog.__init__(self)
......
35 39
        self.result = False
36 40
        self.liquid_drop_method = None
37 41

  
38
        self.ui.lineEdit_Fitting_K.setVisible(False)
39

  
40 42
        self.ui.lineEdit_DisplayNo.setFocus()
41 43

  
42 44
        self.ui.lineEdit_Flowrate_Mass_Liquid.setValidator(
......
60 62
        self.ui.lineEdit_Temperature.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Temperature))
61 63
        self.ui.lineEdit_Compress_Factor.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Compress_Factor))
62 64

  
63
        self.ui.radioButton_Flowrate_Mass.clicked.connect(self.clickedEvent)
64
        self.ui.radioButton_Flowrate_Volume.clicked.connect(self.clickedEvent)
65
        self.ui.radioButton_Equivalent_Length_Input.clicked.connect(self.clickedEvent)
66
        self.ui.radioButton_Equivalent_Length_Cal.clicked.connect(self.clickedEvent)
65
        self.ui.lineEdit_Mixed_Flowrate_Mass_Vapor.setValidator(
66
            QtGui.QDoubleValidator(self.ui.lineEdit_Mixed_Flowrate_Mass_Vapor))
67
        self.ui.lineEdit_Mixed_Density_Vapor.setValidator(QtGui.QDoubleValidator(self.ui.lineEdit_Mixed_Density_Vapor))
68
        self.ui.lineEdit_Mixed_Viscosity_Vapor.setValidator(
69
            QtGui.QDoubleValidator(self.ui.lineEdit_Mixed_Viscosity_Vapor))
70
        self.ui.lineEdit_Mixed_Pressure_Vapor.setValidator(
71
            QtGui.QDoubleValidator(self.ui.lineEdit_Mixed_Pressure_Vapor))
72
        self.ui.lineEdit_Mixed_Temperature_Vapor.setValidator(
73
            QtGui.QDoubleValidator(self.ui.lineEdit_Mixed_Temperature_Vapor))
74
        self.ui.lineEdit_Mixed_Molecular_Weight_Vapor.setValidator(
75
            QtGui.QDoubleValidator(self.ui.lineEdit_Mixed_Molecular_Weight_Vapor))
76
        self.ui.lineEdit_Mixed_Compress_Factor_Vapor.setValidator(
77
            QtGui.QDoubleValidator(self.ui.lineEdit_Mixed_Compress_Factor_Vapor))
78
        self.ui.lineEdit_Mixed_Flowrate_Mass_Liquid.setValidator(
79
            QtGui.QDoubleValidator(self.ui.lineEdit_Mixed_Flowrate_Mass_Liquid))
80
        self.ui.lineEdit_Mixed_Density_Liquid.setValidator(
81
            QtGui.QDoubleValidator(self.ui.lineEdit_Mixed_Density_Liquid))
82
        self.ui.lineEdit_Mixed_Viscosity_Liquid.setValidator(
83
            QtGui.QDoubleValidator(self.ui.lineEdit_Mixed_Viscosity_Liquid))
67 84
        self.ui.pushButton_Roughness.clicked.connect(self.roughness_clicked_event)
68 85
        self.ui.pushButton_Fitting.clicked.connect(self.show_fitting_dialog)
69 86
        self.ui.comboBox_Nominal_Pipe_Size.currentIndexChanged.connect(self.getInsideDiameter)
......
71 88
        self.ui.comboBox_PhaseType.currentIndexChanged.connect(self.on_change_phase_type)
72 89
        self.ui.pushButton_Line_Sizing.clicked.connect(self.show_line_sizing_dialog)
73 90
        self.ui.pushButton_Add_GeometryData_Mixed.clicked.connect(self.show_geometry_data_dialog)
91
        self.ui.lineEdit_Equivalent_Length_Input.textChanged.connect(self.equivalent_length_change_event)
92
        self.ui.lineEdit_Flowrate_Mass_Liquid.textChanged.connect(self.flowrate_change_event)
93
        self.ui.lineEdit_Flowrate_Volume.textChanged.connect(self.flowrate_change_event)
94
        self.ui.lineEdit_Mixed_Density_Vapor.textChanged.connect(self.mixed_density_vapor_change_event)
74 95

  
75 96
        self.initialize()
76 97
        self.init_liquid_drop_method()
......
79 100
        self.init_nominal_diameter()
80 101
        self.init_schedule()
81 102

  
103
    def mixed_density_vapor_change_event(self, text):
104
        if is_not_blank(text):
105
            self.ui.lineEdit_Mixed_Temperature_Vapor.setText('-')
106
            self.ui.lineEdit_Mixed_Temperature_Vapor.setEnabled(False)
107
            self.ui.lineEdit_Mixed_Molecular_Weight_Vapor.setText('-')
108
            self.ui.lineEdit_Mixed_Molecular_Weight_Vapor.setEnabled(False)
109
            self.ui.lineEdit_Mixed_Compress_Factor_Vapor.setText('-')
110
            self.ui.lineEdit_Mixed_Compress_Factor_Vapor.setEnabled(False)
111
        else:
112
            self.ui.lineEdit_Mixed_Temperature_Vapor.clear()
113
            self.ui.lineEdit_Mixed_Temperature_Vapor.setEnabled(True)
114
            self.ui.lineEdit_Mixed_Molecular_Weight_Vapor.clear()
115
            self.ui.lineEdit_Mixed_Molecular_Weight_Vapor.setEnabled(True)
116
            self.ui.lineEdit_Mixed_Compress_Factor_Vapor.clear()
117
            self.ui.lineEdit_Mixed_Compress_Factor_Vapor.setEnabled(True)
118

  
119
    def equivalent_length_change_event(self, text):
120
        if is_not_blank(text):
121
            # Equivalent Length Cal Clear
122
            self.ui.lineEdit_Fitting_Length.clear()
123
            self.ui.lineEdit_Fitting_K.clear()
124
            self.ui.lineEdit_Equivalent_Length_Cal.clear()
125

  
126
    def flowrate_change_event(self, text):
127
        if self.sender() == self.ui.lineEdit_Flowrate_Mass_Liquid:
128
            if is_not_blank(text):
129
                self.ui.lineEdit_Flowrate_Volume.clear()
130
                # self.ui.lineEdit_Flowrate_Volume.setStyleSheet('QLineEdit {background-color: gray;}')
131
                # self.ui.lineEdit_Flowrate_Mass_Liquid.setStyleSheet('QLineEdit {background-color: white;}')
132
        else:
133
            if is_not_blank(text):
134
                self.ui.lineEdit_Flowrate_Mass_Liquid.clear()
135
                # self.ui.lineEdit_Flowrate_Mass_Liquid.setStyleSheet('QLineEdit {background-color: gray;}')
136
                # self.ui.lineEdit_Flowrate_Volume.setStyleSheet('QLineEdit {background-color: white;}')
137

  
82 138
    def initialize(self):
83
        self.ui.tableWidget_GeometryData_Mixed.setColumnCount(9)
139

  
140
        self.ui.tableWidget_GeometryData_Mixed.setColumnCount(10)
84 141
        self.ui.tableWidget_GeometryData_Mixed.horizontalHeader().setStretchLastSection(True)
85 142
        self.ui.tableWidget_GeometryData_Mixed.setHorizontalHeaderLabels(
86
            [self.tr('Element'), self.tr('ND'), self.tr('Sch.'), self.tr('ID'), self.tr('Rough'), self.tr('Angle'),
143
            [self.tr('Element'), self.tr('Nominal Diameter'), self.tr('Schedule No.'), self.tr('Inside Diameter'),
144
             self.tr('Roughness'), self.tr('Length'), self.tr('Angle'),
87 145
             self.tr('r/D'), self.tr('D1/D2'), self.tr('K')])
88 146

  
147
        self.ui.tableWidget_GeometryData_Mixed.setEditTriggers(QAbstractItemView.NoEditTriggers)
89 148
        self.ui.tableWidget_GeometryData_Mixed.verticalHeader().setVisible(True)
149
        self.ui.tableWidget_GeometryData_Mixed.resizeColumnsToContents()
150
        self.ui.tableWidget_GeometryData_Mixed.resizeRowsToContents()
90 151

  
91 152
    def init_liquid_drop_method(self):
92 153
        app_doc_data = AppDocData.instance()
......
111 172
        roughness = dialog.show_dialog()
112 173
        self.ui.lineEdit_Roughness.setText(str(roughness))
113 174

  
114
    def clickedEvent(self):
115
        if self.sender() == self.ui.radioButton_Flowrate_Mass:
116
            self.ui.lineEdit_Flowrate_Mass_Liquid.setEnabled(True)
117
            self.ui.lineEdit_Flowrate_Volume.setEnabled(False)
118
            self.ui.lineEdit_Flowrate_Volume.clear()
119
        elif self.sender() == self.ui.radioButton_Flowrate_Volume:
120
            self.ui.lineEdit_Flowrate_Mass_Liquid.setEnabled(False)
121
            self.ui.lineEdit_Flowrate_Volume.setEnabled(True)
122
            self.ui.lineEdit_Flowrate_Mass_Liquid.clear()
123
        elif self.sender() == self.ui.radioButton_Equivalent_Length_Input:
124
            self.ui.lineEdit_Equivalent_Length_Input.setEnabled(True)
125
            self.ui.pushButton_Fitting.setEnabled(False)
126
            self.ui.lineEdit_Fitting_Length.clear()
127
            self.ui.lineEdit_Fitting_K.clear()
128
            self.ui.lineEdit_Equivalent_Length_Cal.clear()
129
        elif self.sender() == self.ui.radioButton_Equivalent_Length_Cal:
130
            self.ui.lineEdit_Equivalent_Length_Input.setEnabled(False)
131
            self.ui.pushButton_Fitting.setEnabled(True)
132
            self.ui.lineEdit_Equivalent_Length_Input.clear()
133

  
134 175
    def validation_check_vapor(self):
135 176
        message = None
136 177

  
......
207 248
        try:
208 249
            row_count = self.ui.tableWidget_GeometryData_Mixed.rowCount()
209 250
            dialog = QGeometryData_MixedDialog()
210
            (isAccepted, element, nominal_pipe_size, schedule_no) = dialog.show_dialog(row_count)
251
            (
252
                isAccepted, element, nominal_pipe_size, schedule_no, inside_pipe_size, roughness, length, angle, rpd,
253
                d1_d2,
254
                k) = dialog.show_dialog(row_count)
211 255

  
212 256
            if isAccepted:
213 257
                self.ui.tableWidget_GeometryData_Mixed.setRowCount(row_count + 1)
......
215 259
                self.ui.tableWidget_GeometryData_Mixed.setItem(row_count, 0, set_table_widget_item_properties(element,
216 260
                                                                                                              Qt.AlignLeft | Qt.AlignVCenter))
217 261

  
262
                self.ui.tableWidget_GeometryData_Mixed.setItem(row_count, 1,
263
                                                               set_table_widget_item_properties(nominal_pipe_size,
264
                                                                                                Qt.AlignRight | Qt.AlignVCenter))
265

  
266
                self.ui.tableWidget_GeometryData_Mixed.setItem(row_count, 2,
267
                                                               set_table_widget_item_properties(schedule_no,
268
                                                                                                Qt.AlignRight | Qt.AlignVCenter))
269

  
270
                self.ui.tableWidget_GeometryData_Mixed.setItem(row_count, 3,
271
                                                               set_table_widget_item_properties(inside_pipe_size,
272
                                                                                                Qt.AlignRight | Qt.AlignVCenter))
273

  
274
                self.ui.tableWidget_GeometryData_Mixed.setItem(row_count, 4,
275
                                                               set_table_widget_item_properties(roughness,
276
                                                                                                Qt.AlignRight | Qt.AlignVCenter))
277

  
278
                self.ui.tableWidget_GeometryData_Mixed.setItem(row_count, 5,
279
                                                               set_table_widget_item_properties(length,
280
                                                                                                Qt.AlignRight | Qt.AlignVCenter))
281

  
282
                self.ui.tableWidget_GeometryData_Mixed.setItem(row_count, 6,
283
                                                               set_table_widget_item_properties(angle,
284
                                                                                                Qt.AlignRight | Qt.AlignVCenter))
285

  
286
                self.ui.tableWidget_GeometryData_Mixed.setItem(row_count, 7,
287
                                                               set_table_widget_item_properties(rpd,
288
                                                                                                Qt.AlignRight | Qt.AlignVCenter))
289

  
290
                self.ui.tableWidget_GeometryData_Mixed.setItem(row_count, 8,
291
                                                               set_table_widget_item_properties(d1_d2,
292
                                                                                                Qt.AlignRight | Qt.AlignVCenter))
293

  
294
                self.ui.tableWidget_GeometryData_Mixed.setItem(row_count, 9,
295
                                                               set_table_widget_item_properties(k,
296
                                                                                                Qt.AlignRight | Qt.AlignVCenter))
297

  
298
                self.ui.tableWidget_GeometryData_Mixed.resizeColumnsToContents()
218 299
                self.ui.tableWidget_GeometryData_Mixed.resizeRowsToContents()
219 300

  
220 301
        except Exception as ex:
......
263 344

  
264 345
            nominal_diameter_uid = self.ui.comboBox_Nominal_Pipe_Size.currentData()
265 346
            dialog = QFittingsDialog()
266
            (fittings_length, total_k) = dialog.show_dialog(nominal_diameter_uid)
267
            if fittings_length > 0:
268
                # Equivalent Length Method
269
                self.ui.lineEdit_Fitting_Length.setText(str(fittings_length))
270
                self.ui.lineEdit_Fitting_K.setText(str(total_k))
271

  
272
                straight_length = 0
273
                if self.ui.lineEdit_Straight_Length.text():
274
                    straight_length = float(self.ui.lineEdit_Straight_Length.text())
275

  
276
                equivalent_length_cal = fittings_length + straight_length
277
                self.ui.lineEdit_Equivalent_Length_Cal.setText(str(equivalent_length_cal))
278
            elif total_k > 0:
279
                # CraneK Method or 2-K Method
280
                if phase_type == 'Vapor':
281
                    fittings_length = self.get_equivalent_length_vapor(total_k)
282
                elif phase_type == 'Liquid':
283
                    fittings_length = self.get_equivalent_length_liquid(total_k)
284

  
285
                self.ui.lineEdit_Fitting_Length.setText(str(fittings_length))
286
                self.ui.lineEdit_Fitting_K.setText(str(total_k))
287

  
288
                straight_length = 0
289
                if self.ui.lineEdit_Straight_Length.text():
290
                    straight_length = float(self.ui.lineEdit_Straight_Length.text())
291

  
292
                equivalent_length_cal = fittings_length + straight_length
293
                self.ui.lineEdit_Equivalent_Length_Cal.setText(str(equivalent_length_cal))
347
            (isAccepted, fittings_length, total_k) = dialog.show_dialog(nominal_diameter_uid)
348
            if isAccepted:
349
                self.ui.lineEdit_Equivalent_Length_Input.clear()
350

  
351
                if fittings_length > 0:
352
                    # Equivalent Length Method
353
                    self.ui.lineEdit_Fitting_Length.setText(str(fittings_length))
354
                    self.ui.lineEdit_Fitting_K.setText(str(total_k))
355

  
356
                    straight_length = 0
357
                    if self.ui.lineEdit_Straight_Length.text():
358
                        straight_length = float(self.ui.lineEdit_Straight_Length.text())
359

  
360
                    equivalent_length_cal = fittings_length + straight_length
361
                    self.ui.lineEdit_Equivalent_Length_Cal.setText(str(equivalent_length_cal))
362
                elif total_k > 0:
363
                    # CraneK Method or 2-K Method
364
                    if phase_type == 'Vapor':
365
                        fittings_length = self.get_equivalent_length_vapor(total_k)
366
                    elif phase_type == 'Liquid':
367
                        fittings_length = self.get_equivalent_length_liquid(total_k)
368

  
369
                    self.ui.lineEdit_Fitting_Length.setText(str(fittings_length))
370
                    self.ui.lineEdit_Fitting_K.setText(str(total_k))
371

  
372
                    straight_length = 0
373
                    if self.ui.lineEdit_Straight_Length.text():
374
                        straight_length = float(self.ui.lineEdit_Straight_Length.text())
375

  
376
                    equivalent_length_cal = fittings_length + straight_length
377
                    self.ui.lineEdit_Equivalent_Length_Cal.setText(str(equivalent_length_cal))
294 378
        except Exception as ex:
295 379
            from App import App
296 380
            from AppDocData import MessageType
......
527 611
    def init_phase_type(self):
528 612
        self.ui.comboBox_PhaseType.clear()
529 613

  
530
        self.ui.comboBox_PhaseType.addItem('Vapor', 'Vapor')
531
        self.ui.comboBox_PhaseType.addItem('Liquid', 'Liquid')
532
        self.ui.comboBox_PhaseType.addItem('2-Phase', 'Mixed')
614
        self.ui.comboBox_PhaseType.addItem('Vapor (Compressible)', 'Vapor')
615
        self.ui.comboBox_PhaseType.addItem('Liquid (Incompressible)', 'Liquid')
616
        self.ui.comboBox_PhaseType.addItem('Mixed (Vapor + Liquid)', 'Mixed')
533 617

  
534 618
        self.ui.comboBox_PhaseType.setCurrentIndex(0)
535 619

  
......
577 661

  
578 662
            self.ui.groupBox_ProcessData_Mixed.setVisible(False)
579 663
            self.ui.groupBox_GeometryData_Mixed.setVisible(False)
664
            self.ui.pushButton_Add_GeometryData_Mixed.setVisible(False)
580 665
            self.ui.pushButton_Calculation.setVisible(False)
581

  
666
            self.ui.pushButton_View_Result.setVisible(False)
582 667
        elif phase_type == 'Liquid':
583 668
            self.ui.groupBox_ProcessData_Liquid.setVisible(True)
584 669
            self.ui.groupBox_Line_Sizing_Data.setVisible(True)
......
589 674

  
590 675
            self.ui.groupBox_ProcessData_Mixed.setVisible(False)
591 676
            self.ui.groupBox_GeometryData_Mixed.setVisible(False)
677
            self.ui.pushButton_Add_GeometryData_Mixed.setVisible(False)
592 678
            self.ui.pushButton_Calculation.setVisible(False)
679
            self.ui.pushButton_View_Result.setVisible(False)
593 680
        elif phase_type == 'Mixed':
594 681
            self.ui.groupBox_ProcessData_Mixed.setVisible(True)
595 682
            self.ui.groupBox_GeometryData_Mixed.setVisible(True)
683
            self.ui.pushButton_Add_GeometryData_Mixed.setVisible(True)
596 684
            self.ui.pushButton_Calculation.setVisible(True)
685
            self.ui.pushButton_View_Result.setVisible(True)
597 686

  
598 687
            self.ui.groupBox_ProcessData_Vapor.setVisible(False)
599 688
            self.ui.groupBox_ProcessData_Liquid.setVisible(False)
......
613 702
            inside_diameter = AppDocData.instance().getInsideDiameter(nominal_diameter_uid, schedule_uid)
614 703
            if len(inside_diameter) > 0:
615 704
                if self.ui.label_Inside_Pipe_Size_Unit.text() == 'mm':
616
                    self.ui.lineEdit_Inside_Pipe_Size.setText(str(inside_diameter[0][1]))
705
                    if inside_diameter[0][1]:
706
                        self.ui.lineEdit_Inside_Pipe_Size.setText(str(inside_diameter[0][1]))
617 707
                else:
618
                    self.ui.lineEdit_Inside_Pipe_Size.setText(str(inside_diameter[0][2]))
708
                    if inside_diameter[0][2]:
709
                        self.ui.lineEdit_Inside_Pipe_Size.setText(str(inside_diameter[0][2]))
619 710

  
620 711
    def init_nominal_diameter(self):
621 712
        from AppDocData import AppDocData
......
666 757
                            if index > -1:
667 758
                                self.ui.comboBox_PhaseType.setCurrentIndex(index)
668 759
                        if hmb.flowrate_mass:
669
                            self.ui.radioButton_Flowrate_Mass.setChecked(True)
670
                            self.ui.lineEdit_Flowrate_Mass_Liquid.setEnabled(True)
671
                            self.ui.lineEdit_Flowrate_Volume.setEnabled(False)
672 760
                            self.ui.lineEdit_Flowrate_Mass_Liquid.setText(str(hmb.flowrate_mass))
673 761
                            self.ui.lineEdit_Flowrate_Mass_Vapor.setText(str(hmb.flowrate_mass))
674 762
                        if hmb.flowrate_volume:
675
                            self.ui.radioButton_Flowrate_Volume.setChecked(True)
676
                            self.ui.lineEdit_Flowrate_Mass_Liquid.setEnabled(False)
677
                            self.ui.lineEdit_Flowrate_Volume.setEnabled(True)
678 763
                            self.ui.lineEdit_Flowrate_Volume.setText(str(hmb.flowrate_volume))
679 764
                        if hmb.viscosity:
680 765
                            self.ui.lineEdit_Viscosity_Liquid.setText(str(hmb.viscosity))
......
731 816
                values = {}
732 817

  
733 818
                phase_type = self.ui.comboBox_PhaseType.currentData()
819
                values['Phase_Type'] = phase_type
734 820
                if phase_type == 'Vapor':
735 821
                    values['Flowrate_Mass'] = self.ui.lineEdit_Flowrate_Mass_Vapor.text()
736 822
                    values['Viscosity'] = self.ui.lineEdit_Viscosity_Vapor.text()
......
738 824
                    values['Molecular_Weight'] = self.ui.lineEdit_Molecular_Weight.text()
739 825
                    values['Temperature'] = self.ui.lineEdit_Temperature.text()
740 826
                    values['Compress_Factor'] = self.ui.lineEdit_Compress_Factor.text()
827
                    values['Limitation_Velocity'] = self.ui.lineEdit_Limitation_Velocity.text()
828
                    values['Limitation_Pressure_Drop'] = self.ui.lineEdit_Limitation_Pressure_Drop.text()
829
                    values['Nominal_Pipe_Size'] = self.ui.comboBox_Nominal_Pipe_Size.currentText()
830
                    values['Inside_Pipe_Size'] = self.ui.lineEdit_Inside_Pipe_Size.text()
831
                    values['Schedule_No'] = self.ui.comboBox_Schedule_No.currentText()
832
                    values['Roughness'] = self.ui.lineEdit_Roughness.text()
833
                    values['Straight_Length'] = self.ui.lineEdit_Straight_Length.text()
834
                    values['Equivalent_Length'] = self.get_equivalent_length()
835
                    values['Equivalent_Length_Input'] = self.ui.lineEdit_Equivalent_Length_Input.text()
836
                    values['Fitting_Length'] = self.ui.lineEdit_Fitting_Length.text()
837
                    values['Fitting_K'] = self.ui.lineEdit_Fitting_K.text()
838
                    values['Equivalent_Length_Cal'] = self.ui.lineEdit_Equivalent_Length_Cal.text()
839
                    values['Flowrate_Volume'] = None
840
                    values['Density'] = None
741 841
                elif phase_type == 'Liquid':
742
                    if self.ui.radioButton_Flowrate_Mass.isChecked():
743
                        values['Flowrate_Mass'] = self.ui.lineEdit_Flowrate_Mass_Liquid.text()
744
                        values['Flowrate_Volume'] = None
745
                    elif self.ui.radioButton_Flowrate_Volume.isChecked():
746
                        values['Flowrate_Mass'] = None
747
                        values['Flowrate_Volume'] = self.ui.lineEdit_Flowrate_Volume.text()
842
                    values['Flowrate_Mass'] = self.ui.lineEdit_Flowrate_Mass_Liquid.text()
843
                    values['Flowrate_Volume'] = self.ui.lineEdit_Flowrate_Volume.text()
748 844
                    values['Density'] = self.ui.lineEdit_Density.text()
749 845
                    values['Viscosity'] = self.ui.lineEdit_Viscosity_Liquid.text()
750

  
751
                values['Phase_Type'] = phase_type
752
                values['Limitation_Velocity'] = self.ui.lineEdit_Limitation_Velocity.text()
753
                values['Limitation_Pressure_Drop'] = self.ui.lineEdit_Limitation_Pressure_Drop.text()
754
                values['Nominal_Pipe_Size'] = self.ui.comboBox_Nominal_Pipe_Size.currentText()
755
                values['Inside_Pipe_Size'] = self.ui.lineEdit_Inside_Pipe_Size.text()
756
                values['Schedule_No'] = self.ui.comboBox_Schedule_No.currentText()
757
                values['Roughness'] = self.ui.lineEdit_Roughness.text()
758
                values['Straight_Length'] = self.ui.lineEdit_Straight_Length.text()
759

  
760
                if self.ui.radioButton_Equivalent_Length_Input.isChecked():
846
                    values['Limitation_Velocity'] = self.ui.lineEdit_Limitation_Velocity.text()
847
                    values['Limitation_Pressure_Drop'] = self.ui.lineEdit_Limitation_Pressure_Drop.text()
848
                    values['Nominal_Pipe_Size'] = self.ui.comboBox_Nominal_Pipe_Size.currentText()
849
                    values['Inside_Pipe_Size'] = self.ui.lineEdit_Inside_Pipe_Size.text()
850
                    values['Schedule_No'] = self.ui.comboBox_Schedule_No.currentText()
851
                    values['Roughness'] = self.ui.lineEdit_Roughness.text()
852
                    values['Straight_Length'] = self.ui.lineEdit_Straight_Length.text()
853
                    values['Equivalent_Length'] = self.get_equivalent_length()
761 854
                    values['Equivalent_Length_Input'] = self.ui.lineEdit_Equivalent_Length_Input.text()
762
                    values['Fitting_Length'] = None
763
                    values['Fitting_K'] = None
764
                    values['Equivalent_Length_Cal'] = None
765
                else:
766
                    values['Equivalent_Length_Input'] = None
767 855
                    values['Fitting_Length'] = self.ui.lineEdit_Fitting_Length.text()
768 856
                    values['Fitting_K'] = self.ui.lineEdit_Fitting_K.text()
769 857
                    values['Equivalent_Length_Cal'] = self.ui.lineEdit_Equivalent_Length_Cal.text()
858
                    values['Specific_Heat_Ratio'] = None
859
                    values['Molecular_Weight'] = None
860
                    values['Temperature'] = None
861
                    values['Compress_Factor'] = None
862
                elif phase_type == 'Mixed':
863
                    flowrate_mass_vapor = float(
864
                        self.ui.lineEdit_Mixed_Flowrate_Mass_Vapor.text()) if self.ui.lineEdit_Mixed_Flowrate_Mass_Vapor.text() else 0.0
865
                    flowrate_mass_liquid = float(
866
                        self.ui.lineEdit_Mixed_Flowrate_Mass_Liquid.text()) if self.ui.lineEdit_Mixed_Flowrate_Mass_Liquid.text() else 0.0
867
                    values['Flowrate_Mass'] = flowrate_mass_vapor + flowrate_mass_liquid
868
                    values['Temperature'] = self.ui.lineEdit_Mixed_Temperature_Vapor.text()
869
                    values['Molecular_Weight'] = self.ui.lineEdit_Mixed_Molecular_Weight_Vapor.text()
870
                    values['Specific_Heat_Ratio'] = self.ui.lineEdit_Mixed_Compress_Factor_Vapor.text()
871
                    if self.ui.tableWidget_GeometryData_Mixed.rowCount() > 0:
872
                        values['Nominal_Pipe_Size'] = self.ui.tableWidget_GeometryData_Mixed.item(0, 1).text()
873
                        values['Inside_Pipe_Size'] = self.ui.tableWidget_GeometryData_Mixed.item(0, 3).text()
874
                        values['Schedule_No'] = self.ui.tableWidget_GeometryData_Mixed.item(0, 2).text()
875
                        values['Equivalent_Length_Cal'] = self.get_equivalent_length_mixed()
876
                        values['Roughness'] = self.ui.tableWidget_GeometryData_Mixed.item(0, 5).text()
877

  
878

  
770 879

  
771 880
                drawing.hmbTable.updateByUID(self.components_uid, values)
881

  
772 882
        except Exception as ex:
773 883
            from App import App
774 884
            from AppDocData import MessageType
......
777 887
                                                           sys.exc_info()[-1].tb_lineno)
778 888
            App.mainWnd().addMessage.emit(MessageType.Error, message)
779 889

  
890
    def get_equivalent_length_mixed(self):
891
        equivalent_length = 0
892

  
893
        for row in range(self.ui.tableWidget_GeometryData_Mixed.rowCount()):
894
            length = self.ui.tableWidget_GeometryData_Mixed.item(row, 5).text()
895
            if length:
896
                equivalent_length += float(length)
897

  
898
        return equivalent_length
899

  
900
    def get_equivalent_length(self):
901
        if self.ui.lineEdit_Equivalent_Length_Input.text():
902
            self.ui.lineEdit_Fitting_Length.clear()
903
            self.ui.lineEdit_Fitting_K.clear()
904
            self.ui.lineEdit_Equivalent_Length_Cal.clear()
905
            return self.ui.lineEdit_Equivalent_Length_Input.text()
906
        else:
907
            self.ui.lineEdit_Equivalent_Length_Input.clear()
908
            return self.ui.lineEdit_Equivalent_Length_Cal.text()
909

  
780 910
    def accept(self):
781 911
        self.update_HMB()
782 912

  
......
792 922
    if __name__ == '__main__':
793 923
        from StreamDataDialog import QStreamDataDialog
794 924
        from App import App
925

  
795 926
        app = App(sys.argv)
796 927

  
797 928
        if True:
HYTOS/HYTOS/StreamData_UI.py
26 26
        icon.addPixmap(QtGui.QPixmap(":/images/HYTOS.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
27 27
        Dialog.setWindowIcon(icon)
28 28
        self.groupBox_StreamNo = QtWidgets.QGroupBox(Dialog)
29
        self.groupBox_StreamNo.setGeometry(QtCore.QRect(8, 8, 669, 60))
29
        self.groupBox_StreamNo.setGeometry(QtCore.QRect(8, 8, 493, 60))
30 30
        font = QtGui.QFont()
31 31
        font.setFamily("맑은 고딕")
32 32
        font.setBold(True)
33 33
        font.setWeight(75)
34 34
        self.groupBox_StreamNo.setFont(font)
35 35
        self.groupBox_StreamNo.setObjectName("groupBox_StreamNo")
36
        self.buttonBox = QtWidgets.QDialogButtonBox(self.groupBox_StreamNo)
37
        self.buttonBox.setGeometry(QtCore.QRect(500, 28, 156, 23))
38
        font = QtGui.QFont()
39
        font.setFamily("맑은 고딕")
40
        font.setBold(False)
41
        font.setWeight(50)
42
        self.buttonBox.setFont(font)
43
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
44
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
45
        self.buttonBox.setObjectName("buttonBox")
46 36
        self.label_14 = QtWidgets.QLabel(self.groupBox_StreamNo)
47 37
        self.label_14.setGeometry(QtCore.QRect(236, 30, 77, 16))
48 38
        font = QtGui.QFont()
......
52 42
        self.label_14.setFont(font)
53 43
        self.label_14.setObjectName("label_14")
54 44
        self.comboBox_PhaseType = QtWidgets.QComboBox(self.groupBox_StreamNo)
55
        self.comboBox_PhaseType.setGeometry(QtCore.QRect(312, 28, 105, 22))
45
        self.comboBox_PhaseType.setGeometry(QtCore.QRect(312, 28, 169, 22))
56 46
        self.comboBox_PhaseType.setObjectName("comboBox_PhaseType")
57 47
        self.label_5 = QtWidgets.QLabel(self.groupBox_StreamNo)
58 48
        self.label_5.setGeometry(QtCore.QRect(12, 30, 77, 16))
......
81 71
        self.groupBox_GeometryData.setObjectName("groupBox_GeometryData")
82 72
        self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.groupBox_GeometryData)
83 73
        self.verticalLayout_4.setObjectName("verticalLayout_4")
84
        self.horizontalLayout_15 = QtWidgets.QHBoxLayout()
85
        self.horizontalLayout_15.setObjectName("horizontalLayout_15")
86
        self.label_13 = QtWidgets.QLabel(self.groupBox_GeometryData)
87
        self.label_13.setMinimumSize(QtCore.QSize(129, 0))
88
        self.label_13.setMaximumSize(QtCore.QSize(129, 16777215))
89
        font = QtGui.QFont()
90
        font.setBold(False)
91
        font.setWeight(50)
92
        self.label_13.setFont(font)
93
        self.label_13.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
94
        self.label_13.setObjectName("label_13")
95
        self.horizontalLayout_15.addWidget(self.label_13)
96
        self.radioButton_Equivalent_Length_Input = QtWidgets.QRadioButton(self.groupBox_GeometryData)
97
        font = QtGui.QFont()
98
        font.setBold(False)
99
        font.setWeight(50)
100
        self.radioButton_Equivalent_Length_Input.setFont(font)
101
        self.radioButton_Equivalent_Length_Input.setChecked(True)
102
        self.radioButton_Equivalent_Length_Input.setObjectName("radioButton_Equivalent_Length_Input")
103
        self.horizontalLayout_15.addWidget(self.radioButton_Equivalent_Length_Input)
104
        self.radioButton_Equivalent_Length_Cal = QtWidgets.QRadioButton(self.groupBox_GeometryData)
105
        font = QtGui.QFont()
106
        font.setBold(False)
107
        font.setWeight(50)
108
        self.radioButton_Equivalent_Length_Cal.setFont(font)
109
        self.radioButton_Equivalent_Length_Cal.setObjectName("radioButton_Equivalent_Length_Cal")
110
        self.horizontalLayout_15.addWidget(self.radioButton_Equivalent_Length_Cal)
111
        self.verticalLayout_4.addLayout(self.horizontalLayout_15)
112 74
        self.horizontalLayout_7 = QtWidgets.QHBoxLayout()
113 75
        self.horizontalLayout_7.setObjectName("horizontalLayout_7")
114 76
        self.label_8 = QtWidgets.QLabel(self.groupBox_GeometryData)
......
183 145
        font.setWeight(50)
184 146
        self.lineEdit_Inside_Pipe_Size.setFont(font)
185 147
        self.lineEdit_Inside_Pipe_Size.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
148
        self.lineEdit_Inside_Pipe_Size.setReadOnly(True)
186 149
        self.lineEdit_Inside_Pipe_Size.setObjectName("lineEdit_Inside_Pipe_Size")
187 150
        self.horizontalLayout_5.addWidget(self.lineEdit_Inside_Pipe_Size)
188 151
        self.label_Inside_Pipe_Size_Unit = QtWidgets.QLabel(self.groupBox_GeometryData)
......
210 173
        self.lineEdit_Roughness.setMinimumSize(QtCore.QSize(80, 0))
211 174
        self.lineEdit_Roughness.setMaximumSize(QtCore.QSize(80, 16777215))
212 175
        self.lineEdit_Roughness.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
176
        self.lineEdit_Roughness.setReadOnly(True)
213 177
        self.lineEdit_Roughness.setObjectName("lineEdit_Roughness")
214 178
        self.horizontalLayout_19.addWidget(self.lineEdit_Roughness)
215 179
        self.label_Roughness_Unit = QtWidgets.QLabel(self.groupBox_GeometryData)
......
286 250
        spacerItem2 = QtWidgets.QSpacerItem(54, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
287 251
        self.horizontalLayout_16.addItem(spacerItem2)
288 252
        self.pushButton_Fitting = QtWidgets.QPushButton(self.groupBox_GeometryData)
289
        self.pushButton_Fitting.setEnabled(False)
253
        self.pushButton_Fitting.setEnabled(True)
290 254
        self.pushButton_Fitting.setMinimumSize(QtCore.QSize(75, 0))
291 255
        self.pushButton_Fitting.setMaximumSize(QtCore.QSize(75, 16777215))
292 256
        font = QtGui.QFont()
......
296 260
        self.pushButton_Fitting.setObjectName("pushButton_Fitting")
297 261
        self.horizontalLayout_16.addWidget(self.pushButton_Fitting)
298 262
        self.lineEdit_Fitting_Length = QtWidgets.QLineEdit(self.groupBox_GeometryData)
299
        self.lineEdit_Fitting_Length.setEnabled(False)
263
        self.lineEdit_Fitting_Length.setEnabled(True)
300 264
        self.lineEdit_Fitting_Length.setMinimumSize(QtCore.QSize(80, 0))
301 265
        self.lineEdit_Fitting_Length.setMaximumSize(QtCore.QSize(80, 16777215))
302 266
        font = QtGui.QFont()
......
304 268
        font.setWeight(50)
305 269
        self.lineEdit_Fitting_Length.setFont(font)
306 270
        self.lineEdit_Fitting_Length.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
271
        self.lineEdit_Fitting_Length.setReadOnly(True)
307 272
        self.lineEdit_Fitting_Length.setObjectName("lineEdit_Fitting_Length")
308 273
        self.horizontalLayout_16.addWidget(self.lineEdit_Fitting_Length)
309 274
        self.label_Fitting_Length_Unit = QtWidgets.QLabel(self.groupBox_GeometryData)
......
313 278
        self.label_Fitting_Length_Unit.setFont(font)
314 279
        self.label_Fitting_Length_Unit.setObjectName("label_Fitting_Length_Unit")
315 280
        self.horizontalLayout_16.addWidget(self.label_Fitting_Length_Unit)
281
        self.verticalLayout_4.addLayout(self.horizontalLayout_16)
282
        self.horizontalLayout_15 = QtWidgets.QHBoxLayout()
283
        self.horizontalLayout_15.setObjectName("horizontalLayout_15")
284
        self.label_13 = QtWidgets.QLabel(self.groupBox_GeometryData)
285
        self.label_13.setMinimumSize(QtCore.QSize(129, 0))
286
        self.label_13.setMaximumSize(QtCore.QSize(129, 16777215))
287
        font = QtGui.QFont()
288
        font.setBold(False)
289
        font.setWeight(50)
290
        self.label_13.setFont(font)
291
        self.label_13.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
292
        self.label_13.setObjectName("label_13")
293
        self.horizontalLayout_15.addWidget(self.label_13)
316 294
        self.lineEdit_Fitting_K = QtWidgets.QLineEdit(self.groupBox_GeometryData)
317
        self.lineEdit_Fitting_K.setEnabled(False)
318
        self.lineEdit_Fitting_K.setMinimumSize(QtCore.QSize(30, 0))
319
        self.lineEdit_Fitting_K.setMaximumSize(QtCore.QSize(30, 16777215))
295
        self.lineEdit_Fitting_K.setEnabled(True)
296
        self.lineEdit_Fitting_K.setMinimumSize(QtCore.QSize(80, 0))
297
        self.lineEdit_Fitting_K.setMaximumSize(QtCore.QSize(80, 16777215))
320 298
        font = QtGui.QFont()
321 299
        font.setBold(False)
322 300
        font.setWeight(50)
323 301
        self.lineEdit_Fitting_K.setFont(font)
324
        self.lineEdit_Fitting_K.setAlignment(QtCore.Qt.AlignCenter)
302
        self.lineEdit_Fitting_K.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
303
        self.lineEdit_Fitting_K.setReadOnly(True)
325 304
        self.lineEdit_Fitting_K.setObjectName("lineEdit_Fitting_K")
326
        self.horizontalLayout_16.addWidget(self.lineEdit_Fitting_K)
327
        self.verticalLayout_4.addLayout(self.horizontalLayout_16)
305
        self.horizontalLayout_15.addWidget(self.lineEdit_Fitting_K)
306
        self.label_30 = QtWidgets.QLabel(self.groupBox_GeometryData)
307
        font = QtGui.QFont()
308
        font.setBold(False)
309
        font.setWeight(50)
310
        self.label_30.setFont(font)
311
        self.label_30.setText("")
312
        self.label_30.setObjectName("label_30")
313
        self.horizontalLayout_15.addWidget(self.label_30)
314
        self.verticalLayout_4.addLayout(self.horizontalLayout_15)
328 315
        self.horizontalLayout_9 = QtWidgets.QHBoxLayout()
329 316
        self.horizontalLayout_9.setObjectName("horizontalLayout_9")
330 317
        self.label_9 = QtWidgets.QLabel(self.groupBox_GeometryData)
......
338 325
        self.label_9.setObjectName("label_9")
339 326
        self.horizontalLayout_9.addWidget(self.label_9)
340 327
        self.lineEdit_Equivalent_Length_Cal = QtWidgets.QLineEdit(self.groupBox_GeometryData)
341
        self.lineEdit_Equivalent_Length_Cal.setEnabled(False)
328
        self.lineEdit_Equivalent_Length_Cal.setEnabled(True)
342 329
        self.lineEdit_Equivalent_Length_Cal.setMinimumSize(QtCore.QSize(80, 0))
343 330
        self.lineEdit_Equivalent_Length_Cal.setMaximumSize(QtCore.QSize(80, 16777215))
344 331
        font = QtGui.QFont()
......
346 333
        font.setWeight(50)
347 334
        self.lineEdit_Equivalent_Length_Cal.setFont(font)
348 335
        self.lineEdit_Equivalent_Length_Cal.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
336
        self.lineEdit_Equivalent_Length_Cal.setReadOnly(True)
349 337
        self.lineEdit_Equivalent_Length_Cal.setObjectName("lineEdit_Equivalent_Length_Cal")
350 338
        self.horizontalLayout_9.addWidget(self.lineEdit_Equivalent_Length_Cal)
351 339
        self.label_Equivalent_Lenght_Cal_Unit = QtWidgets.QLabel(self.groupBox_GeometryData)
......
382 370
        self.verticalLayout_5.setObjectName("verticalLayout_5")
383 371
        self.horizontalLayout_8 = QtWidgets.QHBoxLayout()
384 372
        self.horizontalLayout_8.setObjectName("horizontalLayout_8")
385
        spacerItem4 = QtWidgets.QSpacerItem(27, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
386
        self.horizontalLayout_8.addItem(spacerItem4)
387
        self.radioButton_Flowrate_Mass = QtWidgets.QRadioButton(self.groupBox_ProcessData_Liquid)
388
        self.radioButton_Flowrate_Mass.setMinimumSize(QtCore.QSize(0, 0))
389
        self.radioButton_Flowrate_Mass.setMaximumSize(QtCore.QSize(16777215, 16777215))
390
        self.radioButton_Flowrate_Mass.setSizeIncrement(QtCore.QSize(0, 0))
373
        self.label_31 = QtWidgets.QLabel(self.groupBox_ProcessData_Liquid)
374
        self.label_31.setMinimumSize(QtCore.QSize(148, 0))
375
        self.label_31.setMaximumSize(QtCore.QSize(148, 16777215))
391 376
        font = QtGui.QFont()
392 377
        font.setBold(False)
393 378
        font.setWeight(50)
394
        self.radioButton_Flowrate_Mass.setFont(font)
395
        self.radioButton_Flowrate_Mass.setLayoutDirection(QtCore.Qt.LeftToRight)
396
        self.radioButton_Flowrate_Mass.setChecked(True)
397
        self.radioButton_Flowrate_Mass.setObjectName("radioButton_Flowrate_Mass")
398
        self.horizontalLayout_8.addWidget(self.radioButton_Flowrate_Mass)
379
        self.label_31.setFont(font)
380
        self.label_31.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
381
        self.label_31.setObjectName("label_31")
382
        self.horizontalLayout_8.addWidget(self.label_31)
399 383
        self.lineEdit_Flowrate_Mass_Liquid = QtWidgets.QLineEdit(self.groupBox_ProcessData_Liquid)
400 384
        self.lineEdit_Flowrate_Mass_Liquid.setMinimumSize(QtCore.QSize(80, 0))
401 385
        self.lineEdit_Flowrate_Mass_Liquid.setMaximumSize(QtCore.QSize(80, 16777215))
......
416 400
        self.verticalLayout_5.addLayout(self.horizontalLayout_8)
417 401
        self.horizontalLayout_10 = QtWidgets.QHBoxLayout()
418 402
        self.horizontalLayout_10.setObjectName("horizontalLayout_10")
419
        spacerItem5 = QtWidgets.QSpacerItem(16, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
420
        self.horizontalLayout_10.addItem(spacerItem5)
421
        self.radioButton_Flowrate_Volume = QtWidgets.QRadioButton(self.groupBox_ProcessData_Liquid)
422
        self.radioButton_Flowrate_Volume.setMinimumSize(QtCore.QSize(0, 0))
423
        self.radioButton_Flowrate_Volume.setMaximumSize(QtCore.QSize(16777215, 16777215))
403
        self.label_32 = QtWidgets.QLabel(self.groupBox_ProcessData_Liquid)
404
        self.label_32.setMinimumSize(QtCore.QSize(148, 0))
405
        self.label_32.setMaximumSize(QtCore.QSize(148, 16777215))
424 406
        font = QtGui.QFont()
425 407
        font.setBold(False)
426 408
        font.setWeight(50)
427
        self.radioButton_Flowrate_Volume.setFont(font)
428
        self.radioButton_Flowrate_Volume.setLayoutDirection(QtCore.Qt.LeftToRight)
429
        self.radioButton_Flowrate_Volume.setObjectName("radioButton_Flowrate_Volume")
430
        self.horizontalLayout_10.addWidget(self.radioButton_Flowrate_Volume)
409
        self.label_32.setFont(font)
410
        self.label_32.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
411
        self.label_32.setObjectName("label_32")
412
        self.horizontalLayout_10.addWidget(self.label_32)
431 413
        self.lineEdit_Flowrate_Volume = QtWidgets.QLineEdit(self.groupBox_ProcessData_Liquid)
432
        self.lineEdit_Flowrate_Volume.setEnabled(False)
414
        self.lineEdit_Flowrate_Volume.setEnabled(True)
433 415
        self.lineEdit_Flowrate_Volume.setMinimumSize(QtCore.QSize(80, 0))
434 416
        self.lineEdit_Flowrate_Volume.setMaximumSize(QtCore.QSize(80, 16777215))
435 417
        font = QtGui.QFont()
......
507 489
        self.label_Viscosity_Unit_Liquid.setObjectName("label_Viscosity_Unit_Liquid")
508 490
        self.horizontalLayout_12.addWidget(self.label_Viscosity_Unit_Liquid)
509 491
        self.verticalLayout_5.addLayout(self.horizontalLayout_12)
510
        spacerItem6 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
511
        self.verticalLayout_5.addItem(spacerItem6)
492
        spacerItem4 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
493
        self.verticalLayout_5.addItem(spacerItem4)
512 494
        self.groupBox_Line_Sizing_Data = QtWidgets.QGroupBox(Dialog)
513 495
        self.groupBox_Line_Sizing_Data.setGeometry(QtCore.QRect(8, 312, 328, 97))
514 496
        font = QtGui.QFont()
......
578 560
        self.label_DropPressure_Unit.setObjectName("label_DropPressure_Unit")
579 561
        self.horizontalLayout_3.addWidget(self.label_DropPressure_Unit)
580 562
        self.verticalLayout_3.addLayout(self.horizontalLayout_3)
581
        spacerItem7 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
582
        self.verticalLayout_3.addItem(spacerItem7)
563
        spacerItem5 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
564
        self.verticalLayout_3.addItem(spacerItem5)
583 565
        self.groupBox_ProcessData_Vapor = QtWidgets.QGroupBox(Dialog)
584 566
        self.groupBox_ProcessData_Vapor.setGeometry(QtCore.QRect(8, 80, 328, 221))
585 567
        self.groupBox_ProcessData_Vapor.setMinimumSize(QtCore.QSize(0, 221))
......
775 757
        self.label_Compress_Factor_Unit.setObjectName("label_Compress_Factor_Unit")
776 758
        self.horizontalLayout_25.addWidget(self.label_Compress_Factor_Unit)
777 759
        self.verticalLayout_6.addLayout(self.horizontalLayout_25)
778
        spacerItem8 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
779
        self.verticalLayout_6.addItem(spacerItem8)
760
        spacerItem6 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
761
        self.verticalLayout_6.addItem(spacerItem6)
780 762
        self.pushButton_Line_Sizing = QtWidgets.QPushButton(Dialog)
781
        self.pushButton_Line_Sizing.setGeometry(QtCore.QRect(8, 420, 149, 23))
763
        self.pushButton_Line_Sizing.setGeometry(QtCore.QRect(8, 420, 149, 24))
782 764
        self.pushButton_Line_Sizing.setObjectName("pushButton_Line_Sizing")
783 765
        self.groupBox_ProcessData_Mixed = QtWidgets.QGroupBox(Dialog)
784 766
        self.groupBox_ProcessData_Mixed.setGeometry(QtCore.QRect(8, 80, 669, 133))
......
970 952
        self.label_36.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
971 953
        self.label_36.setObjectName("label_36")
972 954
        self.horizontalLayout_20.addWidget(self.label_36)
973
        self.lineEdit = QtWidgets.QLineEdit(self.groupBox_ProcessData_Mixed)
974
        self.lineEdit.setMinimumSize(QtCore.QSize(80, 0))
975
        self.lineEdit.setMaximumSize(QtCore.QSize(80, 16777215))
976
        self.lineEdit.setAlignment(QtCore.Qt.AlignCenter)
977
        self.lineEdit.setObjectName("lineEdit")
978
        self.horizontalLayout_20.addWidget(self.lineEdit)
979
        self.lineEdit_3 = QtWidgets.QLineEdit(self.groupBox_ProcessData_Mixed)
980
        self.lineEdit_3.setMinimumSize(QtCore.QSize(80, 0))
981
        self.lineEdit_3.setMaximumSize(QtCore.QSize(80, 16777215))
982
        self.lineEdit_3.setAlignment(QtCore.Qt.AlignCenter)
983
        self.lineEdit_3.setObjectName("lineEdit_3")
984
        self.horizontalLayout_20.addWidget(self.lineEdit_3)
985
        self.lineEdit_5 = QtWidgets.QLineEdit(self.groupBox_ProcessData_Mixed)
986
        self.lineEdit_5.setMinimumSize(QtCore.QSize(80, 0))
987
        self.lineEdit_5.setMaximumSize(QtCore.QSize(80, 16777215))
988
        self.lineEdit_5.setAlignment(QtCore.Qt.AlignCenter)
989
        self.lineEdit_5.setObjectName("lineEdit_5")
990
        self.horizontalLayout_20.addWidget(self.lineEdit_5)
991
        self.lineEdit_6 = QtWidgets.QLineEdit(self.groupBox_ProcessData_Mixed)
992
        self.lineEdit_6.setMinimumSize(QtCore.QSize(80, 0))
993
        self.lineEdit_6.setMaximumSize(QtCore.QSize(80, 16777215))
994
        self.lineEdit_6.setAlignment(QtCore.Qt.AlignCenter)
995
        self.lineEdit_6.setObjectName("lineEdit_6")
996
        self.horizontalLayout_20.addWidget(self.lineEdit_6)
997
        self.lineEdit_7 = QtWidgets.QLineEdit(self.groupBox_ProcessData_Mixed)
998
        self.lineEdit_7.setMinimumSize(QtCore.QSize(80, 0))
999
        self.lineEdit_7.setMaximumSize(QtCore.QSize(80, 16777215))
1000
        self.lineEdit_7.setAlignment(QtCore.Qt.AlignCenter)
1001
        self.lineEdit_7.setObjectName("lineEdit_7")
1002
        self.horizontalLayout_20.addWidget(self.lineEdit_7)
1003
        self.lineEdit_4 = QtWidgets.QLineEdit(self.groupBox_ProcessData_Mixed)
1004
        self.lineEdit_4.setMinimumSize(QtCore.QSize(80, 0))
1005
        self.lineEdit_4.setMaximumSize(QtCore.QSize(80, 16777215))
1006
        self.lineEdit_4.setAlignment(QtCore.Qt.AlignCenter)
1007
        self.lineEdit_4.setObjectName("lineEdit_4")
1008
        self.horizontalLayout_20.addWidget(self.lineEdit_4)
1009
        self.lineEdit_2 = QtWidgets.QLineEdit(self.groupBox_ProcessData_Mixed)
1010
        self.lineEdit_2.setMinimumSize(QtCore.QSize(80, 0))
1011
        self.lineEdit_2.setMaximumSize(QtCore.QSize(80, 16777215))
1012
        self.lineEdit_2.setAlignment(QtCore.Qt.AlignCenter)
1013
        self.lineEdit_2.setObjectName("lineEdit_2")
1014
        self.horizontalLayout_20.addWidget(self.lineEdit_2)
955
        self.lineEdit_Mixed_Flowrate_Mass_Vapor = QtWidgets.QLineEdit(self.groupBox_ProcessData_Mixed)
956
        self.lineEdit_Mixed_Flowrate_Mass_Vapor.setMinimumSize(QtCore.QSize(80, 0))
957
        self.lineEdit_Mixed_Flowrate_Mass_Vapor.setMaximumSize(QtCore.QSize(80, 16777215))
958
        self.lineEdit_Mixed_Flowrate_Mass_Vapor.setAlignment(QtCore.Qt.AlignCenter)
959
        self.lineEdit_Mixed_Flowrate_Mass_Vapor.setObjectName("lineEdit_Mixed_Flowrate_Mass_Vapor")
960
        self.horizontalLayout_20.addWidget(self.lineEdit_Mixed_Flowrate_Mass_Vapor)
961
        self.lineEdit_Mixed_Density_Vapor = QtWidgets.QLineEdit(self.groupBox_ProcessData_Mixed)
962
        self.lineEdit_Mixed_Density_Vapor.setMinimumSize(QtCore.QSize(80, 0))
963
        self.lineEdit_Mixed_Density_Vapor.setMaximumSize(QtCore.QSize(80, 16777215))
964
        self.lineEdit_Mixed_Density_Vapor.setAlignment(QtCore.Qt.AlignCenter)
965
        self.lineEdit_Mixed_Density_Vapor.setObjectName("lineEdit_Mixed_Density_Vapor")
966
        self.horizontalLayout_20.addWidget(self.lineEdit_Mixed_Density_Vapor)
967
        self.lineEdit_Mixed_Viscosity_Vapor = QtWidgets.QLineEdit(self.groupBox_ProcessData_Mixed)
968
        self.lineEdit_Mixed_Viscosity_Vapor.setMinimumSize(QtCore.QSize(80, 0))
969
        self.lineEdit_Mixed_Viscosity_Vapor.setMaximumSize(QtCore.QSize(80, 16777215))
970
        self.lineEdit_Mixed_Viscosity_Vapor.setAlignment(QtCore.Qt.AlignCenter)
971
        self.lineEdit_Mixed_Viscosity_Vapor.setObjectName("lineEdit_Mixed_Viscosity_Vapor")
972
        self.horizontalLayout_20.addWidget(self.lineEdit_Mixed_Viscosity_Vapor)
973
        self.lineEdit_Mixed_Pressure_Vapor = QtWidgets.QLineEdit(self.groupBox_ProcessData_Mixed)
974
        self.lineEdit_Mixed_Pressure_Vapor.setMinimumSize(QtCore.QSize(80, 0))
975
        self.lineEdit_Mixed_Pressure_Vapor.setMaximumSize(QtCore.QSize(80, 16777215))
976
        self.lineEdit_Mixed_Pressure_Vapor.setAlignment(QtCore.Qt.AlignCenter)
977
        self.lineEdit_Mixed_Pressure_Vapor.setObjectName("lineEdit_Mixed_Pressure_Vapor")
978
        self.horizontalLayout_20.addWidget(self.lineEdit_Mixed_Pressure_Vapor)
979
        self.lineEdit_Mixed_Temperature_Vapor = QtWidgets.QLineEdit(self.groupBox_ProcessData_Mixed)
980
        self.lineEdit_Mixed_Temperature_Vapor.setMinimumSize(QtCore.QSize(80, 0))
981
        self.lineEdit_Mixed_Temperature_Vapor.setMaximumSize(QtCore.QSize(80, 16777215))
982
        self.lineEdit_Mixed_Temperature_Vapor.setAlignment(QtCore.Qt.AlignCenter)
983
        self.lineEdit_Mixed_Temperature_Vapor.setObjectName("lineEdit_Mixed_Temperature_Vapor")
984
        self.horizontalLayout_20.addWidget(self.lineEdit_Mixed_Temperature_Vapor)
985
        self.lineEdit_Mixed_Molecular_Weight_Vapor = QtWidgets.QLineEdit(self.groupBox_ProcessData_Mixed)
986
        self.lineEdit_Mixed_Molecular_Weight_Vapor.setMinimumSize(QtCore.QSize(80, 0))
987
        self.lineEdit_Mixed_Molecular_Weight_Vapor.setMaximumSize(QtCore.QSize(80, 16777215))
988
        self.lineEdit_Mixed_Molecular_Weight_Vapor.setAlignment(QtCore.Qt.AlignCenter)
989
        self.lineEdit_Mixed_Molecular_Weight_Vapor.setObjectName("lineEdit_Mixed_Molecular_Weight_Vapor")
990
        self.horizontalLayout_20.addWidget(self.lineEdit_Mixed_Molecular_Weight_Vapor)
991
        self.lineEdit_Mixed_Compress_Factor_Vapor = QtWidgets.QLineEdit(self.groupBox_ProcessData_Mixed)
992
        self.lineEdit_Mixed_Compress_Factor_Vapor.setMinimumSize(QtCore.QSize(80, 0))
993
        self.lineEdit_Mixed_Compress_Factor_Vapor.setMaximumSize(QtCore.QSize(80, 16777215))
994
        self.lineEdit_Mixed_Compress_Factor_Vapor.setAlignment(QtCore.Qt.AlignCenter)
995
        self.lineEdit_Mixed_Compress_Factor_Vapor.setObjectName("lineEdit_Mixed_Compress_Factor_Vapor")
996
        self.horizontalLayout_20.addWidget(self.lineEdit_Mixed_Compress_Factor_Vapor)
... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.

내보내기 Unified diff

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