프로젝트

일반

사용자정보

개정판 bd210582

IDbd210582c762c0a07c5a37cccd25309a399c5304
상위 4bb59995
하위 5bb7bfdb

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

issue #1054 : 스트림 데이타 입력

Change-Id: I16d71bbff6d3b237d1347432424d0761b1f29a55

차이점 보기:

HYTOS/HYTOS/ConfigurationDialog.py
22 22

  
23 23
        self.ui = Configuration_UI.Ui_ConfigurationDialog()
24 24
        self.ui.setupUi(self)
25
     
25

  
26
        self.load_data()
27

  
28
        
29
    def load_data(self):        
30

  
31
        grouptitles = [1, 2, 3,'testing'] 
32

  
33
        rows = [
34
                    {'text': 'Row1', 'value': 1, 'group': 1},
35
                    {'text': 'Row2', 'value': 2, 'group': 1},
36
                    {'text': 'Row3', 'value': 3, 'group': 1},
37
                    {'text': 'Row4', 'value': 4, 'group': 2},
38
                    {'text': 'Row5', 'value': 5, 'group': 2},
39
                    {'text': 'Row6', 'value': 6, 'group': 3},
40
                    {'text': 'Row7', 'value': 7, 'group': 3},
41
                    {'text': 'Row8', 'value': 8, 'group': 3},
42
                    {'text': 'Row9', 'value': 9, 'group': 2},
43
                    {'text': 'Row10', 'value': 10, 'group': 'testing'}
44
                ]
45

  
46
        for t in grouptitles:                           
47
            item = QListWidgetItem('Group {}'.format(t))
48
            #item.setData(33, 'header')
49
            #item.setData(34, t)
50
            #item.setFlags(QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable)
51
            self.ui.listWidget_Symbol.addItem(item)
52
            for row in rows:
53
                if row['group'] == t:
54

  
55
                    icon = QIcon('D:\Projects\HYTOS+\HYTOS_Projects\Sample\svg\Equipment - [ Pressurized ]\Column\Dual Packed.svg')
56
                    item = QListWidgetItem(icon, 'Dual Packed')        
57

  
58
                    #item = QListWidgetItem(row['text'])                    
59
                    #item.setData(33, row['value'])
60
                    #item.setData(34, row['group'])
61

  
62
                    self.ui.listWidget_Symbol.addItem(item)
63
                else:
64
                    pass
65

  
66

  
67
        return
68
        icon = QIcon('D:/Projects/HYTOS+/HYTOS_Projects/Sample\\svg/Equipment - [ Pressure Drop ]/Air Fin Cooler/Air Fin Cooler.svg')
69
        item1 = QListWidgetItem(icon, 'Air Fin Cooler')          
70
        self.ui.listWidget_Symbol.addItem(item1)
71

  
72
        icon = QIcon('D:\Projects\HYTOS+\HYTOS_Projects\Sample\svg\Equipment - [ Pressurized ]\Column\Dual Packed.svg')
73
        item2 = QListWidgetItem(icon, 'Dual Packed')        
74
        self.ui.listWidget_Symbol.addItem(item2)
75

  
76

  
26 77
    def accept(self):
27 78
        
28 79
        QDialog.accept(self)
HYTOS/HYTOS/Configuration_UI.py
13 13
class Ui_ConfigurationDialog(object):
14 14
    def setupUi(self, ConfigurationDialog):
15 15
        ConfigurationDialog.setObjectName("ConfigurationDialog")
16
        ConfigurationDialog.resize(570, 504)
16
        ConfigurationDialog.resize(531, 474)
17 17
        font = QtGui.QFont()
18 18
        font.setFamily("맑은 고딕")
19 19
        ConfigurationDialog.setFont(font)
20 20
        icon = QtGui.QIcon()
21
        icon.addPixmap(QtGui.QPixmap(":/newPrefix/Configuration.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
21
        icon.addPixmap(QtGui.QPixmap(":/images/Configuration.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
22 22
        ConfigurationDialog.setWindowIcon(icon)
23 23
        self.formLayout = QtWidgets.QFormLayout(ConfigurationDialog)
24 24
        self.formLayout.setObjectName("formLayout")
25 25
        self.tabWidget = QtWidgets.QTabWidget(ConfigurationDialog)
26 26
        self.tabWidget.setObjectName("tabWidget")
27
        self.tab = QtWidgets.QWidget()
28
        self.tab.setObjectName("tab")
29
        self.gridLayout_3 = QtWidgets.QGridLayout(self.tab)
27
        self.Infomation = QtWidgets.QWidget()
28
        self.Infomation.setObjectName("Infomation")
29
        self.gridLayout_3 = QtWidgets.QGridLayout(self.Infomation)
30 30
        self.gridLayout_3.setObjectName("gridLayout_3")
31 31
        self.gridLayout_2 = QtWidgets.QGridLayout()
32 32
        self.gridLayout_2.setObjectName("gridLayout_2")
......
34 34
        self.verticalLayout.setObjectName("verticalLayout")
35 35
        self.gridLayout_5 = QtWidgets.QGridLayout()
36 36
        self.gridLayout_5.setObjectName("gridLayout_5")
37
        self.groupBox_2 = QtWidgets.QGroupBox(self.tab)
37
        self.groupBox_2 = QtWidgets.QGroupBox(self.Infomation)
38 38
        font = QtGui.QFont()
39 39
        font.setFamily("맑은 고딕")
40 40
        font.setBold(True)
......
170 170
        self.horizontalLayout_9.addWidget(self.lineEdit_8)
171 171
        self.gridLayout_7.addLayout(self.horizontalLayout_9, 5, 0, 1, 1)
172 172
        self.gridLayout_5.addWidget(self.groupBox_2, 0, 0, 1, 1)
173
        self.groupBox = QtWidgets.QGroupBox(self.tab)
173
        self.groupBox = QtWidgets.QGroupBox(self.Infomation)
174 174
        font = QtGui.QFont()
175 175
        font.setFamily("맑은 고딕")
176 176
        font.setBold(True)
......
258 258
        self.gridLayout_3.addLayout(self.gridLayout_2, 1, 0, 1, 1)
259 259
        self.gridLayout_8 = QtWidgets.QGridLayout()
260 260
        self.gridLayout_8.setObjectName("gridLayout_8")
261
        self.groupBox_3 = QtWidgets.QGroupBox(self.tab)
261
        self.groupBox_3 = QtWidgets.QGroupBox(self.Infomation)
262 262
        font = QtGui.QFont()
263 263
        font.setFamily("맑은 고딕")
264 264
        font.setBold(True)
......
279 279
        self.gridLayout_9.addWidget(self.tableWidget, 0, 0, 1, 1)
280 280
        self.gridLayout_8.addWidget(self.groupBox_3, 0, 0, 1, 1)
281 281
        self.gridLayout_3.addLayout(self.gridLayout_8, 2, 0, 1, 1)
282
        self.tabWidget.addTab(self.tab, "")
283
        self.tab_2 = QtWidgets.QWidget()
284
        self.tab_2.setObjectName("tab_2")
285
        self.gridLayout = QtWidgets.QGridLayout(self.tab_2)
282
        self.tabWidget.addTab(self.Infomation, "")
283
        self.Unit = QtWidgets.QWidget()
284
        self.Unit.setObjectName("Unit")
285
        self.gridLayout = QtWidgets.QGridLayout(self.Unit)
286 286
        self.gridLayout.setObjectName("gridLayout")
287
        self.groupBoxText_2 = QtWidgets.QGroupBox(self.tab_2)
287
        self.groupBoxText_2 = QtWidgets.QGroupBox(self.Unit)
288 288
        self.groupBoxText_2.setTitle("")
289 289
        self.groupBoxText_2.setObjectName("groupBoxText_2")
290 290
        self.gridLayout_4 = QtWidgets.QGridLayout(self.groupBoxText_2)
291 291
        self.gridLayout_4.setObjectName("gridLayout_4")
292
        self.horizontalLayout_10 = QtWidgets.QHBoxLayout()
293
        self.horizontalLayout_10.setObjectName("horizontalLayout_10")
294
        self.gridLayout_10 = QtWidgets.QGridLayout()
295
        self.gridLayout_10.setObjectName("gridLayout_10")
296
        self.listWidget_Symbol = QtWidgets.QListWidget(self.groupBoxText_2)
297
        self.listWidget_Symbol.setFlow(QtWidgets.QListView.TopToBottom)
298
        self.listWidget_Symbol.setViewMode(QtWidgets.QListView.IconMode)
299
        self.listWidget_Symbol.setObjectName("listWidget_Symbol")
300
        self.gridLayout_10.addWidget(self.listWidget_Symbol, 0, 1, 1, 1)
301
        self.horizontalLayout_10.addLayout(self.gridLayout_10)
302
        self.gridLayout_4.addLayout(self.horizontalLayout_10, 0, 0, 1, 1)
292 303
        self.gridLayout.addWidget(self.groupBoxText_2, 0, 0, 1, 1)
293
        self.tabWidget.addTab(self.tab_2, "")
304
        self.tabWidget.addTab(self.Unit, "")
294 305
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.SpanningRole, self.tabWidget)
295 306
        self.buttonBox = QtWidgets.QDialogButtonBox(ConfigurationDialog)
296 307
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
......
321 332
        self.radioButton_2.setText(_translate("ConfigurationDialog", "Proposal"))
322 333
        self.label_7.setText(_translate("ConfigurationDialog", "Job Name :"))
323 334
        self.groupBox_3.setTitle(_translate("ConfigurationDialog", "Sheet History"))
324
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("ConfigurationDialog", "Information"))
325
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("ConfigurationDialog", "Unit"))
335
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.Infomation), _translate("ConfigurationDialog", "Information"))
336
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.Unit), _translate("ConfigurationDialog", "Unit"))
326 337
import Resource_rc
HYTOS/HYTOS/DrawingDialog.py
1
# coding: utf-8
2

  
3
import os
4
import sys
5
import sqlite3
6
from PyQt5 import QtCore, QtGui, QtWidgets
7
from PyQt5.QtWidgets import *
8
from AppDocData import AppDocData, MessageType
9
from datetime import datetime 
10
import uuid		
11
import Drawing_UI
12

  
13
class QDrawingDialog(QDialog):    
14
    def __init__(self, uid = None):        
15
        QDialog.__init__(self, uid)
16
        #_translate = QtCore.QCoreApplication.translate
17

  
18
        self.uid = uid
19
        self.result = None
20
        self.ui = Drawing_UI.Ui_DrawingDialog()
21
        self.ui.setupUi(self)    
22
        self.ui.lineEditName.setFocus()
23
        #self.setWindowTitle(_translate('New Drawing Dialog', 'New Drawing'))
24
        
25
    def showDialog(self, uid=None):
26
        _translate = QtCore.QCoreApplication.translate
27

  
28
        self.uid = uid
29
        self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowCloseButtonHint & ~QtCore.Qt.WindowContextHelpButtonHint)
30
        self.ui.lineEditName.setFocus()
31
        if self.uid is None:
32
            self.setWindowTitle(_translate('New Drawing Dialog', 'New Drawing'))
33
        else:
34
            self.setWindowTitle(_translate('Edit Drawing Dialog', 'Edit Drawing'))
35
        self.exec_()
36
    
37
        return self.result
38

  
39
    def accept(self):
40
        drawingName = self.ui.lineEditName.text().strip()
41
        
42
        if not self.validationCheck(drawingName):            
43
            QMessageBox.warning(self, self.tr('Notice'), self.tr('Name is empty.'))
44
            self.ui.lineEditName.setFocus()
45
            return
46
        
47
        if self.uid is None:
48
            if self.exists_drawing(drawingName):
49
                QMessageBox.warning(self, self.tr('Notice'), self.tr('Name already exists.'))      
50
                self.ui.lineEditName.setFocus()      
51
                return
52
        
53
        self.saveDrawing(drawingName)
54
        
55
        self.result = drawingName
56

  
57
        QDialog.accept(self)
58

  
59
    def reject(self):
60

  
61
        self.result = None
62
        QDialog.reject(self)
63

  
64
    def validationCheck(self, drawingName):
65
        if not drawingName:
66
            return False
67
        
68
        return True 
69
        
70
    def exists_drawing(self, drawingName):
71
        return AppDocData.instance().exists_drawing(drawingName)
72

  
73
    def saveDrawing(self, drawingName):                
74
        drawing = []
75

  
76
        if self.uid is None:
77
            drawing.append([str(uuid.uuid4()), drawingName, str(datetime.now().strftime('%Y-%m-%d %H:%M:%S'))])
78
            AppDocData.instance().saveDrawing(drawing)
79
        else:
80
            drawing.append([str(self.uid), drawingName, str(datetime.now().strftime('%Y-%m-%d %H:%M:%S'))])
81
            AppDocData.instance().updateDrawing(drawing)
82

  
83
    if __name__ == '__main__':
84
        from DrawingDialog import QDrawingDialog
85
        from App import App
86
        app = App(sys.argv)
87

  
88

  
89
        if True:
90
            dlg = QDrawingDialog()
91
            dlg.exec_()
HYTOS/HYTOS/Drawing_UI.py
18 18
        font.setFamily("맑은 고딕")
19 19
        DrawingDialog.setFont(font)
20 20
        icon = QtGui.QIcon()
21
        icon.addPixmap(QtGui.QPixmap(":/newPrefix/HYTOS.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
21
        icon.addPixmap(QtGui.QPixmap(":/images/New.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
22 22
        DrawingDialog.setWindowIcon(icon)
23 23
        DrawingDialog.setLocale(QtCore.QLocale(QtCore.QLocale.Korean, QtCore.QLocale.SouthKorea))
24 24
        self.gridLayout = QtWidgets.QGridLayout(DrawingDialog)
HYTOS/HYTOS/Fitting_2KDialog.py
1
# coding: utf-8
2
""" This is Configuratio dialog module """
3

  
4
import os
5
import sys
6
from PyQt5.QtCore import *
7
from PyQt5.QtGui import *
8
from PyQt5.QtWidgets import *
9
import sqlite3
10
from App import App
11
from AppDocData import AppDocData
12
from AppDocData import Config
13
from AppDocData import Color
14
import Fitting_2K_UI
15

  
16
class QFitting_2KDialog(QDialog):
17

  
18
    def __init__(self, parent = None):
19
        QDialog.__init__(self, parent)
20

  
21
        self.ui = Fitting_2K_UI.Ui_Dialog()
22
        self.ui.setupUi(self)
23
        self.initTableWidgetSelectedFitting()
24

  
25
        # 90 Elbow
26
        self.ui.checkBox_90_Elbow_Standard_Screw.stateChanged.connect(self.elbow_90_state_changed)
27
        self.ui.checkBox_90_Elbow_Standard_Flange_Weld.stateChanged.connect(self.elbow_90_state_changed)
28
        self.ui.checkBox_90_Elbow_Long_Radius_All.stateChanged.connect(self.elbow_90_state_changed)
29
        self.ui.checkBox_90_Elbow_1_Weld.stateChanged.connect(self.elbow_90_state_changed)
30
        self.ui.checkBox_90_Elbow_2_Weld.stateChanged.connect(self.elbow_90_state_changed)
31
        self.ui.checkBox_90_Elbow_3_Weld.stateChanged.connect(self.elbow_90_state_changed)
32
        self.ui.checkBox_90_Elbow_4_Weld.stateChanged.connect(self.elbow_90_state_changed)
33
        self.ui.checkBox_90_Elbow_5_Weld.stateChanged.connect(self.elbow_90_state_changed)
34
        # 45 Elbow
35
        self.ui.checkBox_45_Elbow_Standard_All.stateChanged.connect(self.elbow_45_state_changed)
36
        self.ui.checkBox_45_Elbow_Long_Radius_All.stateChanged.connect(self.elbow_45_state_changed)
37
        self.ui.checkBox_45_Elbow_1_Weld.stateChanged.connect(self.elbow_45_state_changed)
38
        self.ui.checkBox_45_Elbow_2_Weld.stateChanged.connect(self.elbow_45_state_changed)
39
        # 180 Elbow
40
        self.ui.checkBox_180_Elbow_Standard_Screw.stateChanged.connect(self.elbow_180_state_changed)
41
        self.ui.checkBox_180_Elbow_Standard_Flange_Weld.stateChanged.connect(self.elbow_180_state_changed)
42
        self.ui.checkBox_180_Elbow_Long_Radius_All.stateChanged.connect(self.elbow_180_state_changed)
43
        # Tees
44
        self.ui.checkBox_Tee_Elbow_Standard_Screw.stateChanged.connect(self.tee_state_changed)
45
        self.ui.checkBox_Tee_Elbow_Long_Radius_Screw.stateChanged.connect(self.tee_state_changed)
46
        self.ui.checkBox_Tee_Elbow_Standard_Flange_Weld.stateChanged.connect(self.tee_state_changed)
47
        self.ui.checkBox_Tee_Elbow_Stub_In_Branch.stateChanged.connect(self.tee_state_changed)
48
        self.ui.checkBox_Tee_Through_Screw.stateChanged.connect(self.tee_state_changed)
49
        self.ui.checkBox_Tee_Through_Flange_Weld.stateChanged.connect(self.tee_state_changed)
50
        self.ui.checkBox_Tee_Through_Stub_In_Branch.stateChanged.connect(self.tee_state_changed)
51
        # Valves
52
        self.ui.checkBox_Gate_Ball_Plug_Valve_Full.stateChanged.connect(self.valve_state_changed)
53
        self.ui.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_9.stateChanged.connect(self.valve_state_changed)
54
        self.ui.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_8.stateChanged.connect(self.valve_state_changed)
55
        self.ui.checkBox_Globe_Valve_Standard.stateChanged.connect(self.valve_state_changed)
56
        self.ui.checkBox_Globe_Valve_Angle_YType.stateChanged.connect(self.valve_state_changed)
57
        self.ui.checkBox_Diaphragm_Dam_Valve.stateChanged.connect(self.valve_state_changed)
58
        self.ui.checkBox_Butterfly_Valve.stateChanged.connect(self.valve_state_changed)
59
        # Pipe
60
        self.ui.checkBox_Pipe_Entrance_Normal.stateChanged.connect(self.pipe_state_changed)
61
        self.ui.checkBox_Pipe_Entrance_Borda.stateChanged.connect(self.pipe_state_changed)
62
        self.ui.checkBox_Pipe_Exit.stateChanged.connect(self.pipe_state_changed)
63
        # Check Valve
64
        self.ui.checkBox_Check_Valve_Lift.stateChanged.connect(self.check_valve_state_changed)
65
        self.ui.checkBox_Check_Valve_Swing.stateChanged.connect(self.check_valve_state_changed)
66
        self.ui.checkBox_Check_Valve_Tilting.stateChanged.connect(self.check_valve_state_changed)
67

  
68

  
69
    def initTableWidgetSelectedFitting(self):        
70
        self.ui.tableWidget_SelectedFitting.setColumnCount(7)
71
        self.ui.tableWidget_SelectedFitting.setHorizontalHeaderLabels(['Category', 'Type', 'Name', 'Count', 'Size', 'Angle', 'K'])        
72
        self.ui.tableWidget_SelectedFitting.horizontalHeaderItem(0).setSizeHint(QSize(25, 25))
73

  
74
        #self.ui.tableWidget_SelectedFitting.setColumnWidth(0, 30)
75
        #self.ui.tableWidget_SelectedFitting.setColumnWidth(1, 135)        
76
        self.ui.tableWidget_SelectedFitting.horizontalHeader().setStretchLastSection(True)
77

  
78
        self.ui.tableWidget_SelectedFitting.setEditTriggers(QAbstractItemView.NoEditTriggers)
79
        #self.ui.tableWidget_SelectedFitting.resizeColumnsToContents()        
80

  
81
        self.ui.tableWidget_SelectedFitting.verticalHeader().setVisible(False)
82

  
83
    def check_valve_state_changed(self, state):
84
        rowCount = self.ui.tableWidget_SelectedFitting.rowCount()
85

  
86
        if self.sender() == self.ui.checkBox_Check_Valve_Lift:
87
            if state == 2:
88
                self.add_fitting_data(rowCount, 'Check Valve', 'Swing Type', 'Lift Check Valve')
89
            else:
90
                self.del_fitting_data('Check Valve', 'Swing Type', 'Lift Check Valve')
91
        elif self.sender() == self.ui.checkBox_Check_Valve_Swing:
92
            if state == 2:
93
                self.add_fitting_data(rowCount, 'Check Valve', 'Swing Type', 'Swing Check Valve')
94
            else:
95
                self.del_fitting_data('Check Valve', 'Swing Type', 'Swing Check Valve')
96
        elif self.sender() == self.ui.checkBox_Check_Valve_Tilting:
97
            if state == 2:
98
                self.add_fitting_data(rowCount, 'Check Valve', 'Swing Type', 'Tilting-disk Check Valve')
99
            else:
100
                self.del_fitting_data('Check Valve', 'Swing Type', 'Tilting-disk Check Valve')
101

  
102
    def pipe_state_changed(self, state):
103
        rowCount = self.ui.tableWidget_SelectedFitting.rowCount()
104

  
105
        if self.sender() == self.ui.checkBox_Pipe_Entrance_Normal:
106
            if state == 2:
107
                self.add_fitting_data(rowCount, 'Pipe', 'Pipe Type', 'Pipe entrance (Normal)')
108
            else:
109
                self.del_fitting_data('Pipe', 'Pipe Type', 'Pipe entrance (Normal)')
110
        elif self.sender() == self.ui.checkBox_Pipe_Entrance_Borda:
111
            if state == 2:
112
                self.add_fitting_data(rowCount, 'Pipe', 'Pipe Type', 'Pipe entrance (Borda)')
113
            else:
114
                self.del_fitting_data('Pipe', 'Pipe Type', 'Pipe entrance (Borda)')
115
        elif self.sender() == self.ui.checkBox_Pipe_Exit:
116
            if state == 2:
117
                self.add_fitting_data(rowCount, 'Pipe', 'Pipe Type', 'Pipe exit')
118
            else:
119
                self.del_fitting_data('Pipe', 'Pipe Type', 'Pipe exit')
120

  
121

  
122
    def valve_state_changed(self, state):
123
        rowCount = self.ui.tableWidget_SelectedFitting.rowCount()
124

  
125
        if self.sender() == self.ui.checkBox_Gate_Ball_Plug_Valve_Full:
126
            if state == 2:
127
                self.add_fitting_data(rowCount, 'Valves', 'Gate, Ball, Plug Type', 'Full line size, β = 1.0')
128
            else:
129
                self.del_fitting_data('Valves', 'Gate, Ball, Plug Type', 'Full line size, β = 1.0')
130
        elif self.sender() == self.ui.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_9:
131
            if state == 2:
132
                self.add_fitting_data(rowCount, 'Valves', 'Gate, Ball, Plug Type', 'Reduced Trim, β = 0.9')
133
            else:
134
                self.del_fitting_data('Valves', 'Gate, Ball, Plug Type', 'Reduced Trim, β = 0.9')
135
        elif self.sender() == self.ui.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_8:
136
            if state == 2:
137
                self.add_fitting_data(rowCount, 'Valves', 'Gate, Ball, Plug Type', 'Reduced Trim, β = 0.8')
138
            else:
139
                self.del_fitting_data('Valves', 'Gate, Ball, Plug Type', 'Reduced Trim, β = 0.8')
140
        elif self.sender() == self.ui.checkBox_Globe_Valve_Standard:
141
            if state == 2:
142
                self.add_fitting_data(rowCount, 'Valves', 'Globe Type', 'Standard')
143
            else:
144
                self.del_fitting_data('Valves', 'Globe Type', 'Standard')
145
        elif self.sender() == self.ui.checkBox_Globe_Valve_Angle_YType:
146
            if state == 2:
147
                self.add_fitting_data(rowCount, 'Valves', 'Globe Type', 'Angle or Y-type')
148
            else:
149
                self.del_fitting_data('Valves', 'Globe Type', 'Angle or Y-type')
150
        elif self.sender() == self.ui.checkBox_Diaphragm_Dam_Valve:
151
            if state == 2:
152
                self.add_fitting_data(rowCount, 'Valves', 'Others', 'Diaphragm, dam type')
153
            else:
154
                self.del_fitting_data('Valves', 'Others', 'Diaphragm, dam type')
155
        elif self.sender() == self.ui.checkBox_Butterfly_Valve:
156
            if state == 2:
157
                self.add_fitting_data(rowCount, 'Valves', 'Others', 'Butterfly')
158
            else:
159
                self.del_fitting_data('Valves', 'Others', 'Butterfly')
160

  
161

  
162
    def tee_state_changed(self, state):
163
        rowCount = self.ui.tableWidget_SelectedFitting.rowCount()
164

  
165
        if self.sender() == self.ui.checkBox_Tee_Elbow_Standard_Screw:
166
            if state == 2:
167
                self.add_fitting_data(rowCount, 'Tees', 'Used as Elbow', 'Standard, screwed')
168
            else:
169
                self.del_fitting_data('Tees', 'Used as Elbow', 'Standard, screwed')
170
        elif self.sender() == self.ui.checkBox_Tee_Elbow_Long_Radius_Screw:
171
            if state == 2:
172
                self.add_fitting_data(rowCount, 'Tees', 'Used as Elbow', 'Long-radius, screwed')
173
            else:
174
                self.del_fitting_data('Tees', 'Used as Elbow', 'Long-radius, screwed')
175
        elif self.sender() == self.ui.checkBox_Tee_Elbow_Standard_Flange_Weld:
176
            if state == 2:
177
                self.add_fitting_data(rowCount, 'Tees', 'Used as Elbow', 'Standard, flanged or welded')
178
            else:
179
                self.del_fitting_data('Tees', 'Used as Elbow', 'Standard, flanged or welded')
180
        elif self.sender() == self.ui.checkBox_Tee_Elbow_Stub_In_Branch:
181
            if state == 2:
182
                self.add_fitting_data(rowCount, 'Tees', 'Used as Elbow', 'Stub-in-type branch')
183
            else:
184
                self.del_fitting_data('Tees', 'Used as Elbow', 'Stub-in-type branch')
185
        elif self.sender() == self.ui.checkBox_Tee_Through_Screw:
186
            if state == 2:
187
                self.add_fitting_data(rowCount, 'Tees', 'Run through tee', 'Screwed')
188
            else:
189
                self.del_fitting_data('Tees', 'Run through tee', 'Screwed')
190
        elif self.sender() == self.ui.checkBox_Tee_Through_Flange_Weld:
191
            if state == 2:
192
                self.add_fitting_data(rowCount, 'Tees', 'Run through tee', 'Flanged or welded')
193
            else:
194
                self.del_fitting_data('Tees', 'Run through tee', 'Flanged or welded')
195
        elif self.sender() == self.ui.checkBox_Tee_Through_Stub_In_Branch:
196
            if state == 2:
197
                self.add_fitting_data(rowCount, 'Tees', 'Run through tee', 'Stub-in-type branch')
198
            else:
199
                self.del_fitting_data('Tees', 'Run through tee', 'Stub-in-type branch')
200

  
201

  
202
    def elbow_180_state_changed(self, state):
203
        rowCount = self.ui.tableWidget_SelectedFitting.rowCount()
204

  
205
        if self.sender() == self.ui.checkBox_180_Elbow_Standard_Screw:
206
            if state == 2:
207
                self.add_fitting_data(rowCount, '180° Elbow', 'Bend Type', 'Standard (r/d=1), screwed')
208
            else:
209
                self.del_fitting_data('180° Elbow', 'Bend Type', 'Standard (r/d=1), screwed')
210
        elif self.sender() == self.ui.checkBox_180_Elbow_Standard_Flange_Weld:
211
            if state == 2:
212
                self.add_fitting_data(rowCount, '180° Elbow', 'Bend Type', 'Standard (r/d=1), flanged/welded')
213
            else:
214
                self.del_fitting_data('180° Elbow', 'Bend Type', 'Standard (r/d=1), flanged/welded')
215
        elif self.sender() == self.ui.checkBox_180_Elbow_Long_Radius_All:
216
            if state == 2:
217
                self.add_fitting_data(rowCount, '180° Elbow', 'Bend Type', 'Long-radius (r/d=1.5), all types')
218
            else:
219
                self.del_fitting_data('180° Elbow', 'Bend Type', 'Long-radius (r/d=1.5), all types')
220

  
221
    def elbow_45_state_changed(self, state):
222
        rowCount = self.ui.tableWidget_SelectedFitting.rowCount()
223

  
224
        if self.sender() == self.ui.checkBox_45_Elbow_Standard_All:
225
            if state == 2:
226
                self.add_fitting_data(rowCount, '45° Elbow', 'Bend Type', 'Standard (r/d=1), all types')
227
            else:
228
                self.del_fitting_data('45° Elbow', 'Bend Type', 'Standard (r/d=1), all types')
229
        elif self.sender() == self.ui.checkBox_45_Elbow_Long_Radius_All:
230
            if state == 2:
231
                self.add_fitting_data(rowCount, '45° Elbow', 'Bend Type', 'Long-radius (r/d=1.5), all types')
232
            else:
233
                self.del_fitting_data('45° Elbow', 'Bend Type', 'Long-radius (r/d=1.5), all types')
234
        elif self.sender() == self.ui.checkBox_45_Elbow_1_Weld:
235
            if state == 2:
236
                self.add_fitting_data(rowCount, '45° Elbow', 'Miter Type', '1 weld (45 angle)')
237
            else:
238
                self.del_fitting_data('45° Elbow', 'Miter Type', '1 weld (45 angle)')
239
        elif self.sender() == self.ui.checkBox_45_Elbow_2_Weld:
240
            if state == 2:
241
                self.add_fitting_data(rowCount, '45° Elbow', 'Miter Type', '2 welds (22.5 angle)')
242
            else:
243
                self.del_fitting_data('45° Elbow', 'Miter Type', '2 welds (22.5 angle)')
244

  
245

  
246
    def elbow_90_state_changed(self, state):
247
        rowCount = self.ui.tableWidget_SelectedFitting.rowCount()
248

  
249
        if self.sender() == self.ui.checkBox_90_Elbow_Standard_Screw:
250
            if state == 2:
251
                self.add_fitting_data(rowCount, '90° Elbow', 'Bend Type', 'Standard (r/d=1), screwed')
252
            else:
253
                self.del_fitting_data('90° Elbow', 'Bend Type', 'Standard (r/d=1), screwed')
254
        elif self.sender() == self.ui.checkBox_90_Elbow_Standard_Flange_Weld:
255
            if state == 2:
256
                self.add_fitting_data(rowCount, '90° Elbow', 'Bend Type', 'Standard (r/d=1), flanged/weled')
257
            else:
258
                self.del_fitting_data('90° Elbow', 'Bend Type', 'Standard (r/d=1), flanged/weled')
259
        elif self.sender() == self.ui.checkBox_90_Elbow_Long_Radius_All:
260
            if state == 2:
261
                self.add_fitting_data(rowCount, '90° Elbow', 'Bend Type', 'Long-radius (r/d=1.5), all')
262
            else:
263
                self.del_fitting_data('90° Elbow', 'Bend Type', 'Long-radius (r/d=1.5), all')
264
        elif self.sender() == self.ui.checkBox_90_Elbow_1_Weld:
265
            if state == 2:
266
                self.add_fitting_data(rowCount, '90° Elbow', 'Miter Type', '1 weld (90 angle)')
267
            else:
268
                self.del_fitting_data('90° Elbow', 'Miter Type', '1 weld (90 angle)')
269
        elif self.sender() == self.ui.checkBox_90_Elbow_2_Weld:
270
            if state == 2:
271
                self.add_fitting_data(rowCount, '90° Elbow', 'Miter Type', '2 welds (45 angle)')
272
            else:
273
                self.del_fitting_data('90° Elbow', 'Miter Type', '2 welds (45 angle)')
274
        elif self.sender() == self.ui.checkBox_90_Elbow_3_Weld:
275
            if state == 2:
276
                self.add_fitting_data(rowCount, '90° Elbow', 'Miter Type', '3 welds (30 angle)')
277
            else:
278
                self.del_fitting_data('90° Elbow', 'Miter Type', '3 welds (30 angle)')
279
        elif self.sender() == self.ui.checkBox_90_Elbow_4_Weld:
280
            if state == 2:
281
                self.add_fitting_data(rowCount, '90° Elbow', 'Miter Type', '4 welds (22.5 angle)')
282
            else:
283
                self.del_fitting_data('90° Elbow', 'Miter Type', '4 welds (22.5 angle)')
284
        elif self.sender() == self.ui.checkBox_90_Elbow_5_Weld:
285
            if state == 2:
286
                self.add_fitting_data(rowCount, '90° Elbow', 'Miter Type', '5 welds (18 angle)')
287
            else:
288
                self.del_fitting_data('90° Elbow', 'Miter Type', '5 welds (18 angle)')
289

  
290

  
291

  
292
    def del_fitting_data(self, category, type, name):
293
        rowCount = self.ui.tableWidget_SelectedFitting.rowCount()
294
        for row in range(rowCount):
295
            if self.ui.tableWidget_SelectedFitting.item(row, 0).text() == category and self.ui.tableWidget_SelectedFitting.item(row, 1).text() == type and self.ui.tableWidget_SelectedFitting.item(row, 2).text() == name:
296
               self.ui.tableWidget_SelectedFitting.removeRow(row)
297
               break
298

  
299
    def add_fitting_data(self, row, category, type, name):
300
        self.ui.tableWidget_SelectedFitting.setRowCount(row+1)
301

  
302
        self.ui.tableWidget_SelectedFitting.setItem(row, 0, QTableWidgetItem(category))
303
        self.ui.tableWidget_SelectedFitting.setItem(row, 1, QTableWidgetItem(type))
304
        self.ui.tableWidget_SelectedFitting.setItem(row, 2, QTableWidgetItem(name))
305
        self.ui.tableWidget_SelectedFitting.setItem(row, 3, QTableWidgetItem('1'))
306

  
307

  
308
    def accept(self):
309
        
310
        QDialog.accept(self)
311

  
312
    def reject(self):
313
        QDialog.reject(self)
314

  
315

  
316

  
317
    if __name__ == '__main__':
318
        from Fitting_2KDialog import QFitting_2KDialog
319
        from App import App
320
        app = App(sys.argv)
321

  
322

  
323
        if True:
324
            dlg = QFitting_2KDialog()
325
            dlg.exec_()        
HYTOS/HYTOS/Fitting_2K_UI.py
1
# -*- coding: utf-8 -*-
2

  
3
# Form implementation generated from reading ui file '.\UI\Fitting_2K.ui'
4
#
5
# Created by: PyQt5 UI code generator 5.13.0
6
#
7
# WARNING! All changes made in this file will be lost!
8

  
9

  
10
from PyQt5 import QtCore, QtGui, QtWidgets
11

  
12

  
13
class Ui_Dialog(object):
14
    def setupUi(self, Dialog):
15
        Dialog.setObjectName("Dialog")
16
        Dialog.resize(942, 499)
17
        font = QtGui.QFont()
18
        font.setFamily("맑은 고딕")
19
        Dialog.setFont(font)
20
        icon = QtGui.QIcon()
21
        icon.addPixmap(QtGui.QPixmap(":/newPrefix/HYTOS.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
22
        Dialog.setWindowIcon(icon)
23
        self.gridLayout = QtWidgets.QGridLayout(Dialog)
24
        self.gridLayout.setObjectName("gridLayout")
25
        self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
26
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
27
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
28
        self.buttonBox.setObjectName("buttonBox")
29
        self.gridLayout.addWidget(self.buttonBox, 1, 0, 1, 1)
30
        self.verticalLayout = QtWidgets.QVBoxLayout()
31
        self.verticalLayout.setObjectName("verticalLayout")
32
        self.gridLayout_3 = QtWidgets.QGridLayout()
33
        self.gridLayout_3.setObjectName("gridLayout_3")
34
        self.tabWidget = QtWidgets.QTabWidget(Dialog)
35
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
36
        sizePolicy.setHorizontalStretch(0)
37
        sizePolicy.setVerticalStretch(0)
38
        sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth())
39
        self.tabWidget.setSizePolicy(sizePolicy)
40
        self.tabWidget.setMinimumSize(QtCore.QSize(0, 256))
41
        self.tabWidget.setMaximumSize(QtCore.QSize(16777215, 256))
42
        self.tabWidget.setTabPosition(QtWidgets.QTabWidget.North)
43
        self.tabWidget.setTabShape(QtWidgets.QTabWidget.Rounded)
44
        self.tabWidget.setObjectName("tabWidget")
45
        self.tab_90_Elbow = QtWidgets.QWidget()
46
        self.tab_90_Elbow.setObjectName("tab_90_Elbow")
47
        self.groupBox_2 = QtWidgets.QGroupBox(self.tab_90_Elbow)
48
        self.groupBox_2.setGeometry(QtCore.QRect(4, 8, 877, 56))
49
        font = QtGui.QFont()
50
        font.setBold(True)
51
        font.setWeight(75)
52
        self.groupBox_2.setFont(font)
53
        self.groupBox_2.setObjectName("groupBox_2")
54
        self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_2)
55
        self.gridLayout_2.setObjectName("gridLayout_2")
56
        self.gridLayout_4 = QtWidgets.QGridLayout()
57
        self.gridLayout_4.setObjectName("gridLayout_4")
58
        self.checkBox_90_Elbow_Standard_Flange_Weld = QtWidgets.QCheckBox(self.groupBox_2)
59
        font = QtGui.QFont()
60
        font.setBold(False)
61
        font.setWeight(50)
62
        self.checkBox_90_Elbow_Standard_Flange_Weld.setFont(font)
63
        self.checkBox_90_Elbow_Standard_Flange_Weld.setObjectName("checkBox_90_Elbow_Standard_Flange_Weld")
64
        self.gridLayout_4.addWidget(self.checkBox_90_Elbow_Standard_Flange_Weld, 0, 1, 1, 1)
65
        self.checkBox_90_Elbow_Long_Radius_All = QtWidgets.QCheckBox(self.groupBox_2)
66
        font = QtGui.QFont()
67
        font.setBold(False)
68
        font.setWeight(50)
69
        self.checkBox_90_Elbow_Long_Radius_All.setFont(font)
70
        self.checkBox_90_Elbow_Long_Radius_All.setObjectName("checkBox_90_Elbow_Long_Radius_All")
71
        self.gridLayout_4.addWidget(self.checkBox_90_Elbow_Long_Radius_All, 0, 2, 1, 1)
72
        self.checkBox_90_Elbow_Standard_Screw = QtWidgets.QCheckBox(self.groupBox_2)
73
        font = QtGui.QFont()
74
        font.setBold(False)
75
        font.setWeight(50)
76
        self.checkBox_90_Elbow_Standard_Screw.setFont(font)
77
        self.checkBox_90_Elbow_Standard_Screw.setObjectName("checkBox_90_Elbow_Standard_Screw")
78
        self.gridLayout_4.addWidget(self.checkBox_90_Elbow_Standard_Screw, 0, 0, 1, 1)
79
        self.gridLayout_2.addLayout(self.gridLayout_4, 2, 0, 1, 1)
80
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
81
        self.gridLayout_2.addItem(spacerItem, 2, 1, 1, 1)
82
        self.groupBox_3 = QtWidgets.QGroupBox(self.tab_90_Elbow)
83
        self.groupBox_3.setGeometry(QtCore.QRect(4, 72, 877, 56))
84
        font = QtGui.QFont()
85
        font.setBold(True)
86
        font.setWeight(75)
87
        self.groupBox_3.setFont(font)
88
        self.groupBox_3.setObjectName("groupBox_3")
89
        self.gridLayout_8 = QtWidgets.QGridLayout(self.groupBox_3)
90
        self.gridLayout_8.setObjectName("gridLayout_8")
91
        self.gridLayout_7 = QtWidgets.QGridLayout()
92
        self.gridLayout_7.setObjectName("gridLayout_7")
93
        self.checkBox_90_Elbow_2_Weld = QtWidgets.QCheckBox(self.groupBox_3)
94
        font = QtGui.QFont()
95
        font.setBold(False)
96
        font.setWeight(50)
97
        self.checkBox_90_Elbow_2_Weld.setFont(font)
98
        self.checkBox_90_Elbow_2_Weld.setObjectName("checkBox_90_Elbow_2_Weld")
99
        self.gridLayout_7.addWidget(self.checkBox_90_Elbow_2_Weld, 0, 1, 1, 1)
100
        self.checkBox_90_Elbow_5_Weld = QtWidgets.QCheckBox(self.groupBox_3)
101
        font = QtGui.QFont()
102
        font.setBold(False)
103
        font.setWeight(50)
104
        self.checkBox_90_Elbow_5_Weld.setFont(font)
105
        self.checkBox_90_Elbow_5_Weld.setObjectName("checkBox_90_Elbow_5_Weld")
106
        self.gridLayout_7.addWidget(self.checkBox_90_Elbow_5_Weld, 0, 4, 1, 1)
107
        self.checkBox_90_Elbow_1_Weld = QtWidgets.QCheckBox(self.groupBox_3)
108
        font = QtGui.QFont()
109
        font.setBold(False)
110
        font.setWeight(50)
111
        self.checkBox_90_Elbow_1_Weld.setFont(font)
112
        self.checkBox_90_Elbow_1_Weld.setObjectName("checkBox_90_Elbow_1_Weld")
113
        self.gridLayout_7.addWidget(self.checkBox_90_Elbow_1_Weld, 0, 0, 1, 1)
114
        self.checkBox_90_Elbow_3_Weld = QtWidgets.QCheckBox(self.groupBox_3)
115
        font = QtGui.QFont()
116
        font.setBold(False)
117
        font.setWeight(50)
118
        self.checkBox_90_Elbow_3_Weld.setFont(font)
119
        self.checkBox_90_Elbow_3_Weld.setObjectName("checkBox_90_Elbow_3_Weld")
120
        self.gridLayout_7.addWidget(self.checkBox_90_Elbow_3_Weld, 0, 2, 1, 1)
121
        self.checkBox_90_Elbow_4_Weld = QtWidgets.QCheckBox(self.groupBox_3)
122
        font = QtGui.QFont()
123
        font.setBold(False)
124
        font.setWeight(50)
125
        self.checkBox_90_Elbow_4_Weld.setFont(font)
126
        self.checkBox_90_Elbow_4_Weld.setObjectName("checkBox_90_Elbow_4_Weld")
127
        self.gridLayout_7.addWidget(self.checkBox_90_Elbow_4_Weld, 0, 3, 1, 1)
128
        self.gridLayout_8.addLayout(self.gridLayout_7, 0, 0, 1, 1)
129
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
130
        self.gridLayout_8.addItem(spacerItem1, 0, 1, 1, 1)
131
        icon1 = QtGui.QIcon()
132
        icon1.addPixmap(QtGui.QPixmap(":/newPrefix/Fitting_90_Elbow.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
133
        self.tabWidget.addTab(self.tab_90_Elbow, icon1, "")
134
        self.tab_45_Elbow = QtWidgets.QWidget()
135
        self.tab_45_Elbow.setObjectName("tab_45_Elbow")
136
        self.groupBox_5 = QtWidgets.QGroupBox(self.tab_45_Elbow)
137
        self.groupBox_5.setGeometry(QtCore.QRect(4, 8, 877, 56))
138
        font = QtGui.QFont()
139
        font.setBold(True)
140
        font.setWeight(75)
141
        self.groupBox_5.setFont(font)
142
        self.groupBox_5.setObjectName("groupBox_5")
143
        self.gridLayout_10 = QtWidgets.QGridLayout(self.groupBox_5)
144
        self.gridLayout_10.setObjectName("gridLayout_10")
145
        self.gridLayout_11 = QtWidgets.QGridLayout()
146
        self.gridLayout_11.setObjectName("gridLayout_11")
147
        self.checkBox_45_Elbow_Standard_All = QtWidgets.QCheckBox(self.groupBox_5)
148
        font = QtGui.QFont()
149
        font.setBold(False)
150
        font.setWeight(50)
151
        self.checkBox_45_Elbow_Standard_All.setFont(font)
152
        self.checkBox_45_Elbow_Standard_All.setObjectName("checkBox_45_Elbow_Standard_All")
153
        self.gridLayout_11.addWidget(self.checkBox_45_Elbow_Standard_All, 0, 0, 1, 1)
154
        self.checkBox_45_Elbow_Long_Radius_All = QtWidgets.QCheckBox(self.groupBox_5)
155
        font = QtGui.QFont()
156
        font.setBold(False)
157
        font.setWeight(50)
158
        self.checkBox_45_Elbow_Long_Radius_All.setFont(font)
159
        self.checkBox_45_Elbow_Long_Radius_All.setObjectName("checkBox_45_Elbow_Long_Radius_All")
160
        self.gridLayout_11.addWidget(self.checkBox_45_Elbow_Long_Radius_All, 0, 1, 1, 1)
161
        self.gridLayout_10.addLayout(self.gridLayout_11, 0, 0, 1, 1)
162
        spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
163
        self.gridLayout_10.addItem(spacerItem2, 0, 1, 1, 1)
164
        self.groupBox_4 = QtWidgets.QGroupBox(self.tab_45_Elbow)
165
        self.groupBox_4.setGeometry(QtCore.QRect(4, 72, 877, 56))
166
        font = QtGui.QFont()
167
        font.setBold(True)
168
        font.setWeight(75)
169
        self.groupBox_4.setFont(font)
170
        self.groupBox_4.setObjectName("groupBox_4")
171
        self.gridLayout_9 = QtWidgets.QGridLayout(self.groupBox_4)
172
        self.gridLayout_9.setObjectName("gridLayout_9")
173
        self.gridLayout_12 = QtWidgets.QGridLayout()
174
        self.gridLayout_12.setObjectName("gridLayout_12")
175
        self.checkBox_45_Elbow_1_Weld = QtWidgets.QCheckBox(self.groupBox_4)
176
        font = QtGui.QFont()
177
        font.setBold(False)
178
        font.setWeight(50)
179
        self.checkBox_45_Elbow_1_Weld.setFont(font)
180
        self.checkBox_45_Elbow_1_Weld.setObjectName("checkBox_45_Elbow_1_Weld")
181
        self.gridLayout_12.addWidget(self.checkBox_45_Elbow_1_Weld, 0, 0, 1, 1)
182
        self.checkBox_45_Elbow_2_Weld = QtWidgets.QCheckBox(self.groupBox_4)
183
        font = QtGui.QFont()
184
        font.setBold(False)
185
        font.setWeight(50)
186
        self.checkBox_45_Elbow_2_Weld.setFont(font)
187
        self.checkBox_45_Elbow_2_Weld.setObjectName("checkBox_45_Elbow_2_Weld")
188
        self.gridLayout_12.addWidget(self.checkBox_45_Elbow_2_Weld, 0, 1, 1, 1)
189
        self.gridLayout_9.addLayout(self.gridLayout_12, 0, 0, 1, 1)
190
        spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
191
        self.gridLayout_9.addItem(spacerItem3, 0, 1, 1, 1)
192
        icon2 = QtGui.QIcon()
193
        icon2.addPixmap(QtGui.QPixmap(":/newPrefix/Fitting_45_Elbow.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
194
        self.tabWidget.addTab(self.tab_45_Elbow, icon2, "")
195
        self.tab_180_Elbow = QtWidgets.QWidget()
196
        self.tab_180_Elbow.setObjectName("tab_180_Elbow")
197
        self.groupBox_6 = QtWidgets.QGroupBox(self.tab_180_Elbow)
198
        self.groupBox_6.setGeometry(QtCore.QRect(4, 8, 877, 56))
199
        font = QtGui.QFont()
200
        font.setBold(True)
201
        font.setWeight(75)
202
        self.groupBox_6.setFont(font)
203
        self.groupBox_6.setObjectName("groupBox_6")
204
        self.gridLayout_13 = QtWidgets.QGridLayout(self.groupBox_6)
205
        self.gridLayout_13.setObjectName("gridLayout_13")
206
        self.gridLayout_14 = QtWidgets.QGridLayout()
207
        self.gridLayout_14.setObjectName("gridLayout_14")
208
        self.checkBox_180_Elbow_Standard_Flange_Weld = QtWidgets.QCheckBox(self.groupBox_6)
209
        font = QtGui.QFont()
210
        font.setBold(False)
211
        font.setWeight(50)
212
        self.checkBox_180_Elbow_Standard_Flange_Weld.setFont(font)
213
        self.checkBox_180_Elbow_Standard_Flange_Weld.setObjectName("checkBox_180_Elbow_Standard_Flange_Weld")
214
        self.gridLayout_14.addWidget(self.checkBox_180_Elbow_Standard_Flange_Weld, 0, 1, 1, 1)
215
        self.checkBox_180_Elbow_Standard_Screw = QtWidgets.QCheckBox(self.groupBox_6)
216
        font = QtGui.QFont()
217
        font.setBold(False)
218
        font.setWeight(50)
219
        self.checkBox_180_Elbow_Standard_Screw.setFont(font)
220
        self.checkBox_180_Elbow_Standard_Screw.setObjectName("checkBox_180_Elbow_Standard_Screw")
221
        self.gridLayout_14.addWidget(self.checkBox_180_Elbow_Standard_Screw, 0, 0, 1, 1)
222
        self.checkBox_180_Elbow_Long_Radius_All = QtWidgets.QCheckBox(self.groupBox_6)
223
        font = QtGui.QFont()
224
        font.setBold(False)
225
        font.setWeight(50)
226
        self.checkBox_180_Elbow_Long_Radius_All.setFont(font)
227
        self.checkBox_180_Elbow_Long_Radius_All.setObjectName("checkBox_180_Elbow_Long_Radius_All")
228
        self.gridLayout_14.addWidget(self.checkBox_180_Elbow_Long_Radius_All, 0, 2, 1, 1)
229
        self.gridLayout_13.addLayout(self.gridLayout_14, 2, 0, 1, 1)
230
        spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
231
        self.gridLayout_13.addItem(spacerItem4, 2, 1, 1, 1)
232
        icon3 = QtGui.QIcon()
233
        icon3.addPixmap(QtGui.QPixmap(":/newPrefix/Fitting_180_Elbow.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
234
        self.tabWidget.addTab(self.tab_180_Elbow, icon3, "")
235
        self.tab_Tees = QtWidgets.QWidget()
236
        self.tab_Tees.setObjectName("tab_Tees")
237
        self.groupBox_9 = QtWidgets.QGroupBox(self.tab_Tees)
238
        self.groupBox_9.setGeometry(QtCore.QRect(4, 8, 877, 56))
239
        font = QtGui.QFont()
240
        font.setBold(True)
241
        font.setWeight(75)
242
        self.groupBox_9.setFont(font)
243
        self.groupBox_9.setObjectName("groupBox_9")
244
        self.gridLayout_19 = QtWidgets.QGridLayout(self.groupBox_9)
245
        self.gridLayout_19.setObjectName("gridLayout_19")
246
        self.gridLayout_20 = QtWidgets.QGridLayout()
247
        self.gridLayout_20.setObjectName("gridLayout_20")
248
        self.checkBox_Tee_Elbow_Standard_Flange_Weld = QtWidgets.QCheckBox(self.groupBox_9)
249
        font = QtGui.QFont()
250
        font.setBold(False)
251
        font.setWeight(50)
252
        self.checkBox_Tee_Elbow_Standard_Flange_Weld.setFont(font)
253
        self.checkBox_Tee_Elbow_Standard_Flange_Weld.setObjectName("checkBox_Tee_Elbow_Standard_Flange_Weld")
254
        self.gridLayout_20.addWidget(self.checkBox_Tee_Elbow_Standard_Flange_Weld, 0, 2, 1, 1)
255
        self.checkBox_Tee_Elbow_Standard_Screw = QtWidgets.QCheckBox(self.groupBox_9)
256
        font = QtGui.QFont()
257
        font.setBold(False)
258
        font.setWeight(50)
259
        self.checkBox_Tee_Elbow_Standard_Screw.setFont(font)
260
        self.checkBox_Tee_Elbow_Standard_Screw.setObjectName("checkBox_Tee_Elbow_Standard_Screw")
261
        self.gridLayout_20.addWidget(self.checkBox_Tee_Elbow_Standard_Screw, 0, 0, 1, 1)
262
        self.checkBox_Tee_Elbow_Long_Radius_Screw = QtWidgets.QCheckBox(self.groupBox_9)
263
        font = QtGui.QFont()
264
        font.setBold(False)
265
        font.setWeight(50)
266
        self.checkBox_Tee_Elbow_Long_Radius_Screw.setFont(font)
267
        self.checkBox_Tee_Elbow_Long_Radius_Screw.setObjectName("checkBox_Tee_Elbow_Long_Radius_Screw")
268
        self.gridLayout_20.addWidget(self.checkBox_Tee_Elbow_Long_Radius_Screw, 0, 1, 1, 1)
269
        self.checkBox_Tee_Elbow_Stub_In_Branch = QtWidgets.QCheckBox(self.groupBox_9)
270
        font = QtGui.QFont()
271
        font.setBold(False)
272
        font.setWeight(50)
273
        self.checkBox_Tee_Elbow_Stub_In_Branch.setFont(font)
274
        self.checkBox_Tee_Elbow_Stub_In_Branch.setObjectName("checkBox_Tee_Elbow_Stub_In_Branch")
275
        self.gridLayout_20.addWidget(self.checkBox_Tee_Elbow_Stub_In_Branch, 0, 3, 1, 1)
276
        self.gridLayout_19.addLayout(self.gridLayout_20, 0, 0, 1, 1)
277
        spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
278
        self.gridLayout_19.addItem(spacerItem5, 0, 2, 1, 1)
279
        self.groupBox = QtWidgets.QGroupBox(self.tab_Tees)
280
        self.groupBox.setGeometry(QtCore.QRect(4, 72, 877, 56))
281
        font = QtGui.QFont()
282
        font.setBold(True)
283
        font.setWeight(75)
284
        self.groupBox.setFont(font)
285
        self.groupBox.setObjectName("groupBox")
286
        self.gridLayout_5 = QtWidgets.QGridLayout(self.groupBox)
287
        self.gridLayout_5.setObjectName("gridLayout_5")
288
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
289
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
290
        self.checkBox_Tee_Through_Screw = QtWidgets.QCheckBox(self.groupBox)
291
        font = QtGui.QFont()
292
        font.setBold(False)
293
        font.setWeight(50)
294
        self.checkBox_Tee_Through_Screw.setFont(font)
295
        self.checkBox_Tee_Through_Screw.setObjectName("checkBox_Tee_Through_Screw")
296
        self.horizontalLayout_2.addWidget(self.checkBox_Tee_Through_Screw)
297
        self.checkBox_Tee_Through_Flange_Weld = QtWidgets.QCheckBox(self.groupBox)
298
        font = QtGui.QFont()
299
        font.setBold(False)
300
        font.setWeight(50)
301
        self.checkBox_Tee_Through_Flange_Weld.setFont(font)
302
        self.checkBox_Tee_Through_Flange_Weld.setObjectName("checkBox_Tee_Through_Flange_Weld")
303
        self.horizontalLayout_2.addWidget(self.checkBox_Tee_Through_Flange_Weld)
304
        self.checkBox_Tee_Through_Stub_In_Branch = QtWidgets.QCheckBox(self.groupBox)
305
        font = QtGui.QFont()
306
        font.setBold(False)
307
        font.setWeight(50)
308
        self.checkBox_Tee_Through_Stub_In_Branch.setFont(font)
309
        self.checkBox_Tee_Through_Stub_In_Branch.setObjectName("checkBox_Tee_Through_Stub_In_Branch")
310
        self.horizontalLayout_2.addWidget(self.checkBox_Tee_Through_Stub_In_Branch)
311
        self.gridLayout_5.addLayout(self.horizontalLayout_2, 0, 0, 1, 1)
312
        spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
313
        self.gridLayout_5.addItem(spacerItem6, 0, 1, 1, 1)
314
        icon4 = QtGui.QIcon()
315
        icon4.addPixmap(QtGui.QPixmap(":/newPrefix/Fitting_Tees.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
316
        self.tabWidget.addTab(self.tab_Tees, icon4, "")
317
        self.tab_Valves = QtWidgets.QWidget()
318
        self.tab_Valves.setObjectName("tab_Valves")
319
        self.groupBox_12 = QtWidgets.QGroupBox(self.tab_Valves)
320
        self.groupBox_12.setGeometry(QtCore.QRect(4, 72, 429, 56))
321
        font = QtGui.QFont()
322
        font.setBold(True)
323
        font.setWeight(75)
324
        self.groupBox_12.setFont(font)
325
        self.groupBox_12.setObjectName("groupBox_12")
326
        self.gridLayout_25 = QtWidgets.QGridLayout(self.groupBox_12)
327
        self.gridLayout_25.setObjectName("gridLayout_25")
328
        self.gridLayout_26 = QtWidgets.QGridLayout()
329
        self.gridLayout_26.setObjectName("gridLayout_26")
330
        self.checkBox_Globe_Valve_Angle_YType = QtWidgets.QCheckBox(self.groupBox_12)
331
        font = QtGui.QFont()
332
        font.setBold(False)
333
        font.setWeight(50)
334
        self.checkBox_Globe_Valve_Angle_YType.setFont(font)
335
        self.checkBox_Globe_Valve_Angle_YType.setObjectName("checkBox_Globe_Valve_Angle_YType")
336
        self.gridLayout_26.addWidget(self.checkBox_Globe_Valve_Angle_YType, 0, 1, 1, 1)
337
        self.checkBox_Globe_Valve_Standard = QtWidgets.QCheckBox(self.groupBox_12)
338
        font = QtGui.QFont()
339
        font.setBold(False)
340
        font.setWeight(50)
341
        self.checkBox_Globe_Valve_Standard.setFont(font)
342
        self.checkBox_Globe_Valve_Standard.setObjectName("checkBox_Globe_Valve_Standard")
343
        self.gridLayout_26.addWidget(self.checkBox_Globe_Valve_Standard, 0, 0, 1, 1)
344
        self.gridLayout_25.addLayout(self.gridLayout_26, 0, 0, 1, 1)
345
        spacerItem7 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
346
        self.gridLayout_25.addItem(spacerItem7, 0, 1, 1, 1)
347
        self.groupBox_13 = QtWidgets.QGroupBox(self.tab_Valves)
348
        self.groupBox_13.setGeometry(QtCore.QRect(452, 72, 429, 56))
349
        font = QtGui.QFont()
350
        font.setBold(True)
351
        font.setWeight(75)
352
        self.groupBox_13.setFont(font)
353
        self.groupBox_13.setObjectName("groupBox_13")
354
        self.gridLayout_27 = QtWidgets.QGridLayout(self.groupBox_13)
355
        self.gridLayout_27.setObjectName("gridLayout_27")
356
        self.gridLayout_28 = QtWidgets.QGridLayout()
357
        self.gridLayout_28.setObjectName("gridLayout_28")
358
        self.checkBox_Butterfly_Valve = QtWidgets.QCheckBox(self.groupBox_13)
359
        font = QtGui.QFont()
360
        font.setBold(False)
361
        font.setWeight(50)
362
        self.checkBox_Butterfly_Valve.setFont(font)
363
        self.checkBox_Butterfly_Valve.setObjectName("checkBox_Butterfly_Valve")
364
        self.gridLayout_28.addWidget(self.checkBox_Butterfly_Valve, 0, 1, 1, 1)
365
        self.checkBox_Diaphragm_Dam_Valve = QtWidgets.QCheckBox(self.groupBox_13)
366
        font = QtGui.QFont()
367
        font.setBold(False)
368
        font.setWeight(50)
369
        self.checkBox_Diaphragm_Dam_Valve.setFont(font)
370
        self.checkBox_Diaphragm_Dam_Valve.setObjectName("checkBox_Diaphragm_Dam_Valve")
371
        self.gridLayout_28.addWidget(self.checkBox_Diaphragm_Dam_Valve, 0, 0, 1, 1)
372
        self.gridLayout_27.addLayout(self.gridLayout_28, 0, 0, 1, 1)
373
        spacerItem8 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
374
        self.gridLayout_27.addItem(spacerItem8, 0, 1, 1, 1)
375
        self.groupBox_7 = QtWidgets.QGroupBox(self.tab_Valves)
376
        self.groupBox_7.setGeometry(QtCore.QRect(4, 8, 877, 57))
377
        font = QtGui.QFont()
378
        font.setBold(True)
379
        font.setWeight(75)
380
        self.groupBox_7.setFont(font)
381
        self.groupBox_7.setObjectName("groupBox_7")
382
        self.gridLayout_6 = QtWidgets.QGridLayout(self.groupBox_7)
383
        self.gridLayout_6.setObjectName("gridLayout_6")
384
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
385
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
386
        self.checkBox_Gate_Ball_Plug_Valve_Full = QtWidgets.QCheckBox(self.groupBox_7)
387
        font = QtGui.QFont()
388
        font.setBold(False)
389
        font.setWeight(50)
390
        self.checkBox_Gate_Ball_Plug_Valve_Full.setFont(font)
391
        self.checkBox_Gate_Ball_Plug_Valve_Full.setObjectName("checkBox_Gate_Ball_Plug_Valve_Full")
392
        self.horizontalLayout_3.addWidget(self.checkBox_Gate_Ball_Plug_Valve_Full)
393
        self.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_9 = QtWidgets.QCheckBox(self.groupBox_7)
394
        font = QtGui.QFont()
395
        font.setBold(False)
396
        font.setWeight(50)
397
        self.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_9.setFont(font)
398
        self.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_9.setObjectName("checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_9")
399
        self.horizontalLayout_3.addWidget(self.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_9)
400
        self.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_8 = QtWidgets.QCheckBox(self.groupBox_7)
401
        font = QtGui.QFont()
402
        font.setBold(False)
403
        font.setWeight(50)
404
        self.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_8.setFont(font)
405
        self.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_8.setObjectName("checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_8")
406
        self.horizontalLayout_3.addWidget(self.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_8)
407
        self.gridLayout_6.addLayout(self.horizontalLayout_3, 0, 0, 1, 1)
408
        spacerItem9 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
409
        self.gridLayout_6.addItem(spacerItem9, 0, 1, 1, 1)
410
        icon5 = QtGui.QIcon()
411
        icon5.addPixmap(QtGui.QPixmap(":/newPrefix/Fitting_Valves.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
412
        self.tabWidget.addTab(self.tab_Valves, icon5, "")
413
        self.tab_Pipe = QtWidgets.QWidget()
414
        self.tab_Pipe.setObjectName("tab_Pipe")
415
        self.groupBox_16 = QtWidgets.QGroupBox(self.tab_Pipe)
416
        self.groupBox_16.setGeometry(QtCore.QRect(4, 8, 877, 56))
417
        font = QtGui.QFont()
418
        font.setBold(True)
419
        font.setWeight(75)
420
        self.groupBox_16.setFont(font)
421
        self.groupBox_16.setObjectName("groupBox_16")
422
        self.gridLayout_33 = QtWidgets.QGridLayout(self.groupBox_16)
423
        self.gridLayout_33.setObjectName("gridLayout_33")
424
        self.gridLayout_34 = QtWidgets.QGridLayout()
425
        self.gridLayout_34.setObjectName("gridLayout_34")
426
        self.checkBox_Pipe_Exit = QtWidgets.QCheckBox(self.groupBox_16)
427
        font = QtGui.QFont()
428
        font.setBold(False)
429
        font.setWeight(50)
430
        self.checkBox_Pipe_Exit.setFont(font)
431
        self.checkBox_Pipe_Exit.setObjectName("checkBox_Pipe_Exit")
432
        self.gridLayout_34.addWidget(self.checkBox_Pipe_Exit, 0, 2, 1, 1)
433
        self.checkBox_Pipe_Entrance_Normal = QtWidgets.QCheckBox(self.groupBox_16)
434
        font = QtGui.QFont()
435
        font.setBold(False)
436
        font.setWeight(50)
437
        self.checkBox_Pipe_Entrance_Normal.setFont(font)
438
        self.checkBox_Pipe_Entrance_Normal.setObjectName("checkBox_Pipe_Entrance_Normal")
439
        self.gridLayout_34.addWidget(self.checkBox_Pipe_Entrance_Normal, 0, 0, 1, 1)
440
        self.checkBox_Pipe_Entrance_Borda = QtWidgets.QCheckBox(self.groupBox_16)
441
        font = QtGui.QFont()
442
        font.setBold(False)
443
        font.setWeight(50)
444
        self.checkBox_Pipe_Entrance_Borda.setFont(font)
445
        self.checkBox_Pipe_Entrance_Borda.setObjectName("checkBox_Pipe_Entrance_Borda")
446
        self.gridLayout_34.addWidget(self.checkBox_Pipe_Entrance_Borda, 0, 1, 1, 1)
447
        self.gridLayout_33.addLayout(self.gridLayout_34, 2, 0, 1, 1)
448
        spacerItem10 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
449
        self.gridLayout_33.addItem(spacerItem10, 2, 1, 1, 1)
450
        icon6 = QtGui.QIcon()
451
        icon6.addPixmap(QtGui.QPixmap(":/newPrefix/Fitting_pipe.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
452
        self.tabWidget.addTab(self.tab_Pipe, icon6, "")
453
        self.tab_Check_Valve = QtWidgets.QWidget()
454
        self.tab_Check_Valve.setObjectName("tab_Check_Valve")
455
        self.groupBox_18 = QtWidgets.QGroupBox(self.tab_Check_Valve)
456
        self.groupBox_18.setGeometry(QtCore.QRect(4, 8, 877, 56))
457
        font = QtGui.QFont()
458
        font.setBold(True)
459
        font.setWeight(75)
460
        self.groupBox_18.setFont(font)
461
        self.groupBox_18.setObjectName("groupBox_18")
462
        self.gridLayout_37 = QtWidgets.QGridLayout(self.groupBox_18)
463
        self.gridLayout_37.setObjectName("gridLayout_37")
464
        self.gridLayout_38 = QtWidgets.QGridLayout()
465
        self.gridLayout_38.setObjectName("gridLayout_38")
466
        self.checkBox_Check_Valve_Tilting = QtWidgets.QCheckBox(self.groupBox_18)
467
        font = QtGui.QFont()
468
        font.setBold(False)
469
        font.setWeight(50)
470
        self.checkBox_Check_Valve_Tilting.setFont(font)
471
        self.checkBox_Check_Valve_Tilting.setObjectName("checkBox_Check_Valve_Tilting")
472
        self.gridLayout_38.addWidget(self.checkBox_Check_Valve_Tilting, 0, 2, 1, 1)
473
        self.checkBox_Check_Valve_Lift = QtWidgets.QCheckBox(self.groupBox_18)
474
        font = QtGui.QFont()
475
        font.setBold(False)
476
        font.setWeight(50)
477
        self.checkBox_Check_Valve_Lift.setFont(font)
478
        self.checkBox_Check_Valve_Lift.setObjectName("checkBox_Check_Valve_Lift")
479
        self.gridLayout_38.addWidget(self.checkBox_Check_Valve_Lift, 0, 0, 1, 1)
480
        self.checkBox_Check_Valve_Swing = QtWidgets.QCheckBox(self.groupBox_18)
481
        font = QtGui.QFont()
482
        font.setBold(False)
483
        font.setWeight(50)
484
        self.checkBox_Check_Valve_Swing.setFont(font)
485
        self.checkBox_Check_Valve_Swing.setObjectName("checkBox_Check_Valve_Swing")
486
        self.gridLayout_38.addWidget(self.checkBox_Check_Valve_Swing, 0, 1, 1, 1)
487
        self.gridLayout_37.addLayout(self.gridLayout_38, 0, 0, 1, 1)
488
        spacerItem11 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
489
        self.gridLayout_37.addItem(spacerItem11, 0, 1, 1, 1)
490
        icon7 = QtGui.QIcon()
491
        icon7.addPixmap(QtGui.QPixmap(":/newPrefix/Fitting_Check_Valves.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
492
        self.tabWidget.addTab(self.tab_Check_Valve, icon7, "")
493
        self.gridLayout_3.addWidget(self.tabWidget, 0, 0, 1, 1)
494
        self.verticalLayout.addLayout(self.gridLayout_3)
495
        self.horizontalLayout = QtWidgets.QHBoxLayout()
496
        self.horizontalLayout.setObjectName("horizontalLayout")
497
        self.groupBox_24 = QtWidgets.QGroupBox(Dialog)
498
        font = QtGui.QFont()
499
        font.setBold(True)
500
        font.setWeight(75)
501
        self.groupBox_24.setFont(font)
502
        self.groupBox_24.setObjectName("groupBox_24")
503
        self.gridLayout_50 = QtWidgets.QGridLayout(self.groupBox_24)
504
        self.gridLayout_50.setObjectName("gridLayout_50")
505
        self.label_TotalK = QtWidgets.QLabel(self.groupBox_24)
506
        self.label_TotalK.setMinimumSize(QtCore.QSize(0, 0))
507
        self.label_TotalK.setMaximumSize(QtCore.QSize(16777215, 16777215))
508
        self.label_TotalK.setSizeIncrement(QtCore.QSize(0, 0))
509
        self.label_TotalK.setBaseSize(QtCore.QSize(0, 0))
510
        font = QtGui.QFont()
511
        font.setBold(True)
512
        font.setWeight(75)
513
        self.label_TotalK.setFont(font)
514
        self.label_TotalK.setText("")
515
        self.label_TotalK.setTextFormat(QtCore.Qt.AutoText)
516
        self.label_TotalK.setScaledContents(True)
517
        self.label_TotalK.setAlignment(QtCore.Qt.AlignCenter)
518
        self.label_TotalK.setObjectName("label_TotalK")
519
        self.gridLayout_50.addWidget(self.label_TotalK, 0, 0, 1, 1)
520
        self.horizontalLayout.addWidget(self.groupBox_24)
521
        self.groupBox_25 = QtWidgets.QGroupBox(Dialog)
522
        font = QtGui.QFont()
523
        font.setBold(True)
524
        font.setWeight(75)
525
        self.groupBox_25.setFont(font)
526
        self.groupBox_25.setObjectName("groupBox_25")
527
        self.gridLayout_49 = QtWidgets.QGridLayout(self.groupBox_25)
528
        self.gridLayout_49.setObjectName("gridLayout_49")
529
        self.tableWidget_SelectedFitting = QtWidgets.QTableWidget(self.groupBox_25)
530
        font = QtGui.QFont()
531
        font.setBold(False)
532
        font.setWeight(50)
533
        self.tableWidget_SelectedFitting.setFont(font)
534
        self.tableWidget_SelectedFitting.setObjectName("tableWidget_SelectedFitting")
535
        self.tableWidget_SelectedFitting.setColumnCount(0)
536
        self.tableWidget_SelectedFitting.setRowCount(0)
537
        self.gridLayout_49.addWidget(self.tableWidget_SelectedFitting, 0, 0, 1, 1)
538
        self.horizontalLayout.addWidget(self.groupBox_25)
539
        self.verticalLayout.addLayout(self.horizontalLayout)
540
        self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)
541

  
542
        self.retranslateUi(Dialog)
543
        self.tabWidget.setCurrentIndex(0)
544
        self.buttonBox.accepted.connect(Dialog.accept)
545
        self.buttonBox.rejected.connect(Dialog.reject)
546
        QtCore.QMetaObject.connectSlotsByName(Dialog)
547
        Dialog.setTabOrder(self.tabWidget, self.checkBox_90_Elbow_Standard_Screw)
548
        Dialog.setTabOrder(self.checkBox_90_Elbow_Standard_Screw, self.checkBox_90_Elbow_Standard_Flange_Weld)
549
        Dialog.setTabOrder(self.checkBox_90_Elbow_Standard_Flange_Weld, self.checkBox_90_Elbow_Long_Radius_All)
550
        Dialog.setTabOrder(self.checkBox_90_Elbow_Long_Radius_All, self.checkBox_90_Elbow_1_Weld)
551
        Dialog.setTabOrder(self.checkBox_90_Elbow_1_Weld, self.checkBox_90_Elbow_2_Weld)
552
        Dialog.setTabOrder(self.checkBox_90_Elbow_2_Weld, self.checkBox_90_Elbow_3_Weld)
553
        Dialog.setTabOrder(self.checkBox_90_Elbow_3_Weld, self.checkBox_90_Elbow_4_Weld)
554
        Dialog.setTabOrder(self.checkBox_90_Elbow_4_Weld, self.checkBox_90_Elbow_5_Weld)
555
        Dialog.setTabOrder(self.checkBox_90_Elbow_5_Weld, self.checkBox_45_Elbow_Standard_All)
556
        Dialog.setTabOrder(self.checkBox_45_Elbow_Standard_All, self.checkBox_45_Elbow_Long_Radius_All)
557
        Dialog.setTabOrder(self.checkBox_45_Elbow_Long_Radius_All, self.checkBox_45_Elbow_1_Weld)
558
        Dialog.setTabOrder(self.checkBox_45_Elbow_1_Weld, self.checkBox_45_Elbow_2_Weld)
559
        Dialog.setTabOrder(self.checkBox_45_Elbow_2_Weld, self.checkBox_180_Elbow_Standard_Screw)
560
        Dialog.setTabOrder(self.checkBox_180_Elbow_Standard_Screw, self.checkBox_180_Elbow_Standard_Flange_Weld)
561
        Dialog.setTabOrder(self.checkBox_180_Elbow_Standard_Flange_Weld, self.checkBox_180_Elbow_Long_Radius_All)
562
        Dialog.setTabOrder(self.checkBox_180_Elbow_Long_Radius_All, self.checkBox_Tee_Elbow_Standard_Screw)
563
        Dialog.setTabOrder(self.checkBox_Tee_Elbow_Standard_Screw, self.checkBox_Tee_Elbow_Long_Radius_Screw)
564
        Dialog.setTabOrder(self.checkBox_Tee_Elbow_Long_Radius_Screw, self.checkBox_Tee_Elbow_Standard_Flange_Weld)
565
        Dialog.setTabOrder(self.checkBox_Tee_Elbow_Standard_Flange_Weld, self.checkBox_Tee_Elbow_Stub_In_Branch)
566
        Dialog.setTabOrder(self.checkBox_Tee_Elbow_Stub_In_Branch, self.checkBox_Tee_Through_Screw)
567
        Dialog.setTabOrder(self.checkBox_Tee_Through_Screw, self.checkBox_Tee_Through_Flange_Weld)
568
        Dialog.setTabOrder(self.checkBox_Tee_Through_Flange_Weld, self.checkBox_Tee_Through_Stub_In_Branch)
569
        Dialog.setTabOrder(self.checkBox_Tee_Through_Stub_In_Branch, self.checkBox_Gate_Ball_Plug_Valve_Full)
570
        Dialog.setTabOrder(self.checkBox_Gate_Ball_Plug_Valve_Full, self.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_9)
571
        Dialog.setTabOrder(self.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_9, self.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_8)
572
        Dialog.setTabOrder(self.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_8, self.checkBox_Globe_Valve_Standard)
573
        Dialog.setTabOrder(self.checkBox_Globe_Valve_Standard, self.checkBox_Globe_Valve_Angle_YType)
574
        Dialog.setTabOrder(self.checkBox_Globe_Valve_Angle_YType, self.checkBox_Diaphragm_Dam_Valve)
575
        Dialog.setTabOrder(self.checkBox_Diaphragm_Dam_Valve, self.checkBox_Butterfly_Valve)
576
        Dialog.setTabOrder(self.checkBox_Butterfly_Valve, self.checkBox_Pipe_Entrance_Normal)
577
        Dialog.setTabOrder(self.checkBox_Pipe_Entrance_Normal, self.checkBox_Pipe_Entrance_Borda)
578
        Dialog.setTabOrder(self.checkBox_Pipe_Entrance_Borda, self.checkBox_Pipe_Exit)
579
        Dialog.setTabOrder(self.checkBox_Pipe_Exit, self.checkBox_Check_Valve_Lift)
580
        Dialog.setTabOrder(self.checkBox_Check_Valve_Lift, self.checkBox_Check_Valve_Swing)
581
        Dialog.setTabOrder(self.checkBox_Check_Valve_Swing, self.checkBox_Check_Valve_Tilting)
582
        Dialog.setTabOrder(self.checkBox_Check_Valve_Tilting, self.tableWidget_SelectedFitting)
583

  
584
    def retranslateUi(self, Dialog):
585
        _translate = QtCore.QCoreApplication.translate
586
        Dialog.setWindowTitle(_translate("Dialog", "Resistance Coefficient K Calculation ... Crane 2-K Method"))
587
        self.groupBox_2.setTitle(_translate("Dialog", "Bend Type"))
588
        self.checkBox_90_Elbow_Standard_Flange_Weld.setText(_translate("Dialog", "Standard (r/d=1), flanged/weled"))
589
        self.checkBox_90_Elbow_Long_Radius_All.setText(_translate("Dialog", "Long-radius (r/d=1.5), all"))
590
        self.checkBox_90_Elbow_Standard_Screw.setText(_translate("Dialog", "Standard (r/d=1), screwed"))
591
        self.groupBox_3.setTitle(_translate("Dialog", "Miter Type"))
592
        self.checkBox_90_Elbow_2_Weld.setText(_translate("Dialog", "2 welds (45 angle)"))
593
        self.checkBox_90_Elbow_5_Weld.setText(_translate("Dialog", "5 welds (18 angle)"))
594
        self.checkBox_90_Elbow_1_Weld.setText(_translate("Dialog", "1 weld (90 angle)"))
595
        self.checkBox_90_Elbow_3_Weld.setText(_translate("Dialog", "3 welds (30 angle)"))
596
        self.checkBox_90_Elbow_4_Weld.setText(_translate("Dialog", "4 welds (22.5 angle)"))
597
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_90_Elbow), _translate("Dialog", "90° Elbow"))
598
        self.groupBox_5.setTitle(_translate("Dialog", "Bend Type"))
599
        self.checkBox_45_Elbow_Standard_All.setText(_translate("Dialog", "Standard (r/d=1), all types"))
600
        self.checkBox_45_Elbow_Long_Radius_All.setText(_translate("Dialog", "Long-radius (r/d=1.5), all types"))
601
        self.groupBox_4.setTitle(_translate("Dialog", "Miter Type"))
602
        self.checkBox_45_Elbow_1_Weld.setText(_translate("Dialog", "1 weld (45 angle)"))
603
        self.checkBox_45_Elbow_2_Weld.setText(_translate("Dialog", "2 welds (22.5 angle)"))
604
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_45_Elbow), _translate("Dialog", "45° Elbow"))
605
        self.groupBox_6.setTitle(_translate("Dialog", "Bend Type"))
606
        self.checkBox_180_Elbow_Standard_Flange_Weld.setText(_translate("Dialog", "Standard (r/d=1), flanged/welded"))
607
        self.checkBox_180_Elbow_Standard_Screw.setText(_translate("Dialog", "Standard (r/d=1), screwed"))
608
        self.checkBox_180_Elbow_Long_Radius_All.setText(_translate("Dialog", "Long-radius (r/d=1.5), all types"))
609
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_180_Elbow), _translate("Dialog", "180° Elbow"))
610
        self.groupBox_9.setTitle(_translate("Dialog", "Used as Elbow"))
611
        self.checkBox_Tee_Elbow_Standard_Flange_Weld.setText(_translate("Dialog", "Standard, flanged or welded"))
612
        self.checkBox_Tee_Elbow_Standard_Screw.setText(_translate("Dialog", "Standard, screwed"))
613
        self.checkBox_Tee_Elbow_Long_Radius_Screw.setText(_translate("Dialog", "Long-radius, screwed"))
614
        self.checkBox_Tee_Elbow_Stub_In_Branch.setText(_translate("Dialog", "Stub-in-type branch"))
615
        self.groupBox.setTitle(_translate("Dialog", "Run through tee"))
616
        self.checkBox_Tee_Through_Screw.setText(_translate("Dialog", "Screwed"))
617
        self.checkBox_Tee_Through_Flange_Weld.setText(_translate("Dialog", "Flanged or welded"))
618
        self.checkBox_Tee_Through_Stub_In_Branch.setText(_translate("Dialog", "Stub-in-type branch"))
619
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_Tees), _translate("Dialog", "Tees"))
620
        self.groupBox_12.setTitle(_translate("Dialog", "Globe Type"))
621
        self.checkBox_Globe_Valve_Angle_YType.setText(_translate("Dialog", "Angle or Y-type"))
622
        self.checkBox_Globe_Valve_Standard.setText(_translate("Dialog", "Standard"))
623
        self.groupBox_13.setTitle(_translate("Dialog", "Others"))
624
        self.checkBox_Butterfly_Valve.setText(_translate("Dialog", "Butterfly"))
625
        self.checkBox_Diaphragm_Dam_Valve.setText(_translate("Dialog", "Diaphragm, dam type"))
626
        self.groupBox_7.setTitle(_translate("Dialog", "Gate, Ball, Plug Type"))
627
        self.checkBox_Gate_Ball_Plug_Valve_Full.setText(_translate("Dialog", "Full line size, β = 1.0"))
628
        self.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_9.setText(_translate("Dialog", "Reduced Trim, β = 0.9"))
629
        self.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_8.setText(_translate("Dialog", "Reduced Trim, β = 0.8"))
630
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_Valves), _translate("Dialog", "Valves"))
631
        self.groupBox_16.setTitle(_translate("Dialog", "Pipe"))
632
        self.checkBox_Pipe_Exit.setText(_translate("Dialog", "Pipe exit"))
633
        self.checkBox_Pipe_Entrance_Normal.setText(_translate("Dialog", "Pipe entrance (Normal)"))
634
        self.checkBox_Pipe_Entrance_Borda.setText(_translate("Dialog", "Pipe entrance (Borda)"))
635
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_Pipe), _translate("Dialog", "Pipe"))
636
        self.groupBox_18.setTitle(_translate("Dialog", "Swing Type"))
637
        self.checkBox_Check_Valve_Tilting.setText(_translate("Dialog", "Tilting-disk Check Valve"))
638
        self.checkBox_Check_Valve_Lift.setText(_translate("Dialog", "Lift Check Valve"))
639
        self.checkBox_Check_Valve_Swing.setText(_translate("Dialog", "Swing Check Valve"))
640
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_Check_Valve), _translate("Dialog", "Check Valve"))
641
        self.groupBox_24.setTitle(_translate("Dialog", "Total K Value"))
642
        self.groupBox_25.setTitle(_translate("Dialog", "Selected Fitting"))
643
import Resource_rc
HYTOS/HYTOS/Fitting_CraneKDialog.py
1
# coding: utf-8
2
""" This is Configuratio dialog module """
3

  
4
import os
5
import sys
6
from PyQt5.QtCore import *
7
from PyQt5.QtGui import *
8
from PyQt5.QtWidgets import *
9
import sqlite3
10
from App import App
11
from AppDocData import AppDocData
12
from AppDocData import Config
13
from AppDocData import Color
14
import Fitting_CraneK_UI
15

  
16
class QFitting_CraneKDialog(QDialog):
17

  
18
    def __init__(self, parent = None):
19
        QDialog.__init__(self, parent)
20

  
21
        self.ui = Fitting_CraneK_UI.Ui_Dialog()
22
        self.ui.setupUi(self)
23
        self.initTableWidgetSelectedFitting()
24
        
25
        # 90 Elbow
26
        self.ui.checkBox_90_Elbow_Standard_Screw.stateChanged.connect(self.elbow_90_state_changed)
27
        self.ui.checkBox_90_Elbow_Long_Radius_1.stateChanged.connect(self.elbow_90_state_changed)
28
        self.ui.checkBox_90_Elbow_Long_Radius_1_5.stateChanged.connect(self.elbow_90_state_changed)
29
        self.ui.checkBox_90_Elbow_Long_Radius_2.stateChanged.connect(self.elbow_90_state_changed)
30
        self.ui.checkBox_90_Elbow_Long_Radius_3.stateChanged.connect(self.elbow_90_state_changed)
31
        self.ui.checkBox_90_Elbow_Long_Radius_4.stateChanged.connect(self.elbow_90_state_changed)
32
        self.ui.checkBox_90_Elbow_Long_Radius_6.stateChanged.connect(self.elbow_90_state_changed)
33
        self.ui.checkBox_90_Elbow_Long_Radius_8.stateChanged.connect(self.elbow_90_state_changed)
34
        self.ui.checkBox_90_Elbow_Long_Radius_10.stateChanged.connect(self.elbow_90_state_changed)
35
        self.ui.checkBox_90_Elbow_Long_Radius_12.stateChanged.connect(self.elbow_90_state_changed)
36
        self.ui.checkBox_90_Elbow_Long_Radius_14.stateChanged.connect(self.elbow_90_state_changed)
37
        self.ui.checkBox_90_Elbow_Long_Radius_16.stateChanged.connect(self.elbow_90_state_changed)
38
        self.ui.checkBox_90_Elbow_Long_Radius_20.stateChanged.connect(self.elbow_90_state_changed)
39
        self.ui.checkBox_90_Elbow_1_Weld.stateChanged.connect(self.elbow_90_state_changed)
40
        self.ui.checkBox_90_Elbow_2_Weld.stateChanged.connect(self.elbow_90_state_changed)
41
        self.ui.checkBox_90_Elbow_3_Weld.stateChanged.connect(self.elbow_90_state_changed)
42
        self.ui.checkBox_90_Elbow_6_Weld.stateChanged.connect(self.elbow_90_state_changed)
43
        # 45 Elbow
44
        self.ui.checkBox_45_Elbow_Standard_Screw.stateChanged.connect(self.elbow_45_state_changed)
45
        self.ui.checkBox_45_Elbow_1_Weld.stateChanged.connect(self.elbow_45_state_changed)
46
        self.ui.checkBox_45_Elbow_3_Weld.stateChanged.connect(self.elbow_45_state_changed)
47
        # 180 Elbow
48
        self.ui.checkBox_180_Elbow_Standard_Screw.stateChanged.connect(self.elbow_180_state_changed)
49
        self.ui.checkBox_180_Elbow_Long_Radius_1.stateChanged.connect(self.elbow_180_state_changed)
50
        self.ui.checkBox_180_Elbow_Long_Radius_1_5.stateChanged.connect(self.elbow_180_state_changed)        
51
        self.ui.checkBox_180_Elbow_Long_Radius_2.stateChanged.connect(self.elbow_180_state_changed)
52
        self.ui.checkBox_180_Elbow_Long_Radius_3.stateChanged.connect(self.elbow_180_state_changed)
53
        self.ui.checkBox_180_Elbow_Long_Radius_4.stateChanged.connect(self.elbow_180_state_changed)
54
        self.ui.checkBox_180_Elbow_Long_Radius_6.stateChanged.connect(self.elbow_180_state_changed)
55
        self.ui.checkBox_180_Elbow_Long_Radius_8.stateChanged.connect(self.elbow_180_state_changed)
56
        self.ui.checkBox_180_Elbow_Long_Radius_10.stateChanged.connect(self.elbow_180_state_changed)
57
        self.ui.checkBox_180_Elbow_Long_Radius_12.stateChanged.connect(self.elbow_180_state_changed)
58
        self.ui.checkBox_180_Elbow_Long_Radius_14.stateChanged.connect(self.elbow_180_state_changed)
59
        self.ui.checkBox_180_Elbow_Long_Radius_16.stateChanged.connect(self.elbow_180_state_changed)
60
        self.ui.checkBox_180_Elbow_Long_Radius_20.stateChanged.connect(self.elbow_180_state_changed)
61
        self.ui.checkBox_180_Elbow_2_Weld.stateChanged.connect(self.elbow_180_state_changed)
62
        self.ui.checkBox_180_Elbow_3_Weld.stateChanged.connect(self.elbow_180_state_changed)
63
        self.ui.checkBox_180_Elbow_4_Weld.stateChanged.connect(self.elbow_180_state_changed)
64
        self.ui.checkBox_180_Elbow_6_Weld.stateChanged.connect(self.elbow_180_state_changed)
65
        self.ui.checkBox_180_Elbow_12_Weld.stateChanged.connect(self.elbow_180_state_changed)
66
        # Tees
67
        self.ui.checkBox_Tee_Through.stateChanged.connect(self.tee_state_changed)
68
        self.ui.checkBox_Tee_Elbow.stateChanged.connect(self.tee_state_changed)
69

  
70
        # Expander/Reducer
71
        self.ui.checkBox_Expander.stateChanged.connect(self.expaner_reducer_state_changed)
72
        self.ui.checkBox_Reducer.stateChanged.connect(self.expaner_reducer_state_changed)
73

  
74
        # Valves
75
        self.ui.checkBox_Globe_Valve_Standard.stateChanged.connect(self.valve_state_changed)
76
        self.ui.checkBox_Globe_Valve_45_Angle.stateChanged.connect(self.valve_state_changed)
77
        self.ui.checkBox_Globe_Valve_90_Angle.stateChanged.connect(self.valve_state_changed)
78
        self.ui.checkBox_Plug_Valve_1_Way.stateChanged.connect(self.valve_state_changed)
79
        self.ui.checkBox_Plug_Valve_3_Way_Elbow.stateChanged.connect(self.valve_state_changed)
80
        self.ui.checkBox_Plug_Valve_3_Way_Through.stateChanged.connect(self.valve_state_changed)
81
        self.ui.checkBox_Foot_Valve_Poppet_Disc.stateChanged.connect(self.valve_state_changed)
82
        self.ui.checkBox_Foot_Valve_Hinged_Disc.stateChanged.connect(self.valve_state_changed)
83
        self.ui.checkBox_Gate_Valve.stateChanged.connect(self.valve_state_changed)
84
        self.ui.checkBox_Ball_Valve.stateChanged.connect(self.valve_state_changed)
85
        self.ui.checkBox_Butterfly_Valve.stateChanged.connect(self.valve_state_changed)
86

  
87
        # Pipe
88
        self.ui.checkBox_Pipe_Enterance_Projecting.stateChanged.connect(self.pipe_state_changed)
89
        self.ui.checkBox_Pipe_Enterance_Flush_0.stateChanged.connect(self.pipe_state_changed)
90
        self.ui.checkBox_Pipe_Enterance_Flush_2.stateChanged.connect(self.pipe_state_changed)
91
        self.ui.checkBox_Pipe_Enterance_Flush_4.stateChanged.connect(self.pipe_state_changed)
92
        self.ui.checkBox_Pipe_Enterance_Flush_6.stateChanged.connect(self.pipe_state_changed)
93
        self.ui.checkBox_Pipe_Enterance_Flush_10.stateChanged.connect(self.pipe_state_changed)
94
        self.ui.checkBox_Pipe_Enterance_Flush_15.stateChanged.connect(self.pipe_state_changed)
95
        self.ui.checkBox_Pipe_Exit_Projecting.stateChanged.connect(self.pipe_state_changed)
96
        self.ui.checkBox_Pipe_Exit_Sharp_Edged.stateChanged.connect(self.pipe_state_changed)
97
        self.ui.checkBox_Pipe_Exit_Rounded.stateChanged.connect(self.pipe_state_changed)
98

  
99
        # Check Valve
100
        self.ui.checkBox_Check_Valve_Swing_Vertical.stateChanged.connect(self.check_valve_state_changed)
101
        self.ui.checkBox_Check_Valve_Swing_Angled.stateChanged.connect(self.check_valve_state_changed)
102
        self.ui.checkBox_Check_Valve_Lift_Straight.stateChanged.connect(self.check_valve_state_changed)
103
        self.ui.checkBox_Check_Valve_Lift_Angled.stateChanged.connect(self.check_valve_state_changed)
104
        self.ui.checkBox_Check_Valve_Tilting_Alpha_5.stateChanged.connect(self.check_valve_state_changed)
105
        self.ui.checkBox_Check_Valve_Tilting_Alpha_15.stateChanged.connect(self.check_valve_state_changed)
106
        self.ui.checkBox_Check_Valve_Globe_Stop.stateChanged.connect(self.check_valve_state_changed)
107
        self.ui.checkBox_Check_Valve_Globe_Stop_45_Angle.stateChanged.connect(self.check_valve_state_changed)
108
        self.ui.checkBox_Check_Valve_Globe_Stop_Inline.stateChanged.connect(self.check_valve_state_changed)
109
        self.ui.checkBox_Check_Valve_Angled_Stop.stateChanged.connect(self.check_valve_state_changed)
110
        self.ui.checkBox_Check_Valve_Angled_Stop_45_Angle.stateChanged.connect(self.check_valve_state_changed)
111
        self.ui.checkBox_Check_Valve_Angled_Stop_Inline.stateChanged.connect(self.check_valve_state_changed)
112

  
113
        #Manual K
114
        self.ui.checkBox_User_Input.stateChanged.connect(self.manual_k_state_changed)
115

  
116
        
117

  
118

  
119
    def initTableWidgetSelectedFitting(self):        
120
        self.ui.tableWidget_SelectedFitting.setColumnCount(7)
121
        self.ui.tableWidget_SelectedFitting.setHorizontalHeaderLabels(['Category', 'Type', 'Name', 'Count', 'Size', 'Angle', 'K'])        
122
        self.ui.tableWidget_SelectedFitting.horizontalHeaderItem(0).setSizeHint(QSize(25, 25))
123

  
124
        #self.ui.tableWidget_SelectedFitting.setColumnWidth(0, 30)
125
        #self.ui.tableWidget_SelectedFitting.setColumnWidth(1, 135)        
126
        self.ui.tableWidget_SelectedFitting.horizontalHeader().setStretchLastSection(True)
127

  
128
        self.ui.tableWidget_SelectedFitting.setEditTriggers(QAbstractItemView.NoEditTriggers)
129
        #self.ui.tableWidget_SelectedFitting.resizeColumnsToContents()        
130

  
131
        self.ui.tableWidget_SelectedFitting.verticalHeader().setVisible(False)
132

  
133
    def manual_k_state_changed(self, state):
134
        rowCount = self.ui.tableWidget_SelectedFitting.rowCount()
135

  
136
        if self.sender() == self.ui.checkBox_User_Input:
137
            if state == 2:
138
                self.add_fitting_data(rowCount, 'Manual K', 'Manual K', 'User Input')
139
            else:
140
                self.del_fitting_data('Manual K', 'Manual K', 'User Input')
141

  
142

  
143
    def check_valve_state_changed(self, state):
144
        rowCount = self.ui.tableWidget_SelectedFitting.rowCount()
145

  
146
        if self.sender() == self.ui.checkBox_Check_Valve_Swing_Vertical:
147
            if state == 2:
148
                self.add_fitting_data(rowCount, 'Check Valve', 'Swing Type', 'Swing Check Valve (Vertical)')
149
            else:
150
                self.del_fitting_data('Check Valve', 'Swing Type', 'Swing Check Valve (Vertical)')
151
        elif self.sender() == self.ui.checkBox_Check_Valve_Swing_Angled:
152
            if state == 2:
153
                self.add_fitting_data(rowCount, 'Check Valve', 'Swing Type', 'Swing Check Valve (Angled)')
154
            else:
155
                self.del_fitting_data('Check Valve', 'Swing Type', 'Swing Check Valve (Angled)')
156
        elif self.sender() == self.ui.checkBox_Check_Valve_Lift_Straight:
157
            if state == 2:
158
                self.add_fitting_data(rowCount, 'Check Valve', 'Lift Type', 'Lift Check Valve')
159
            else:
160
                self.del_fitting_data('Check Valve', 'Lift Type', 'Lift Check Valve')
161
        elif self.sender() == self.ui.checkBox_Check_Valve_Lift_Angled:
162
            if state == 2:
163
                self.add_fitting_data(rowCount, 'Check Valve', 'Lift Type', 'Lift Check Valve (Angled)')
164
            else:
165
                self.del_fitting_data('Check Valve', 'Lift Type', 'Lift Check Valve (Angled)')
166
        elif self.sender() == self.ui.checkBox_Check_Valve_Tilting_Alpha_5:
167
            if state == 2:
168
                self.add_fitting_data(rowCount, 'Check Valve', 'Tilting Type', 'Tilting-disk  Check Valve (α=5˚)')
169
            else:
170
                self.del_fitting_data('Check Valve', 'Tilting Type', 'Tilting-disk  Check Valve (α=5˚)')
171
        elif self.sender() == self.ui.checkBox_Check_Valve_Tilting_Alpha_15:
172
            if state == 2:
173
                self.add_fitting_data(rowCount, 'Check Valve', 'Tilting Type', 'Tilting-disk  Check Valve (α=15˚)')
174
            else:
175
                self.del_fitting_data('Check Valve', 'Tilting Type', 'Tilting-disk  Check Valve (α=15˚)')
176
        elif self.sender() == self.ui.checkBox_Check_Valve_Globe_Stop:
177
            if state == 2:
178
                self.add_fitting_data(rowCount, 'Check Valve', 'Stop Type (Globe)', 'Globe Stop Check Valve')
179
            else:
180
                self.del_fitting_data('Check Valve', 'Stop Type (Globe)', 'Globe Stop Check Valve')
181
        elif self.sender() == self.ui.checkBox_Check_Valve_Globe_Stop_45_Angle:
182
            if state == 2:
183
                self.add_fitting_data(rowCount, 'Check Valve', 'Stop Type (Globe)', 'Globe Stop Check Valve (45˚)')
184
            else:
185
                self.del_fitting_data('Check Valve', 'Stop Type (Globe)', 'Globe Stop Check Valve (45˚)')
186
        elif self.sender() == self.ui.checkBox_Check_Valve_Globe_Stop_Inline:
187
            if state == 2:
188
                self.add_fitting_data(rowCount, 'Check Valve', 'Stop Type (Globe)', 'Globe Stop Check Valve (inline)')
189
            else:
190
                self.del_fitting_data('Check Valve', 'Stop Type (Globe)', 'Globe Stop Check Valve (inline)')
191
        elif self.sender() == self.ui.checkBox_Check_Valve_Angled_Stop:
192
            if state == 2:
193
                self.add_fitting_data(rowCount, 'Check Valve', 'Stop Type (Angle)', 'Angle Stop Check Valve')
194
            else:
195
                self.del_fitting_data('Check Valve', 'Stop Type (Angle)', 'Angle Stop Check Valve')
196
        elif self.sender() == self.ui.checkBox_Check_Valve_Angled_Stop_45_Angle:
197
            if state == 2:
198
                self.add_fitting_data(rowCount, 'Check Valve', 'Stop Type (Angle)', 'Angle Stop Check Valve (45˚)')
199
            else:
200
                self.del_fitting_data('Check Valve', 'Stop Type (Angle)', 'Angle Stop Check Valve (45˚)')
201
        elif self.sender() == self.ui.checkBox_Check_Valve_Angled_Stop_Inline:
202
            if state == 2:
203
                self.add_fitting_data(rowCount, 'Check Valve', 'Stop Type (Angle)', 'Angle Stop Check Valve (inline)')
204
            else:
205
                self.del_fitting_data('Check Valve', 'Stop Type (Angle)', 'Angle Stop Check Valve (inline)')
206

  
207

  
208

  
209

  
210
    def pipe_state_changed(self, state):
211
        rowCount = self.ui.tableWidget_SelectedFitting.rowCount()
212

  
213
        if self.sender() == self.ui.checkBox_Pipe_Enterance_Projecting:
214
            if state == 2:
215
                self.add_fitting_data(rowCount, 'Pipe', 'Entrance', 'Pipe entrance (projection)')
216
            else:
217
                self.del_fitting_data('Pipe', 'Entrance', 'Pipe entrance (projection)')
218
        elif self.sender() == self.ui.checkBox_Pipe_Enterance_Flush_0:
219
            if state == 2:
220
                self.add_fitting_data(rowCount, 'Pipe', 'Entrance', 'Pipe entrance (flush) r/d=0.00')
221
            else:
222
                self.del_fitting_data('Pipe', 'Entrance', 'Pipe entrance (flush) r/d=0.00')
223
        elif self.sender() == self.ui.checkBox_Pipe_Enterance_Flush_2:
224
            if state == 2:
225
                self.add_fitting_data(rowCount, 'Pipe', 'Entrance', 'Pipe entrance (flush) r/d=0.02')
226
            else:
227
                self.del_fitting_data('Pipe', 'Entrance', 'Pipe entrance (flush) r/d=0.02')
228
        elif self.sender() == self.ui.checkBox_Pipe_Enterance_Flush_4:
229
            if state == 2:
... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.

내보내기 Unified diff

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