개정판 4b848033
issue #1048 : 화면/메뉴/툴바 개발 => 불필요한 화면 삭제
Change-Id: Iac525946fd91a123f08497982daaa2c7492cd121
HYTOS/HYTOS/FittingMethodDialog.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
|
|
3 |
# Form implementation generated from reading ui file 'ProjectDialog.ui' |
|
4 |
# |
|
5 |
# Created by: PyQt5 UI code generator 5.6 |
|
6 |
# |
|
7 |
# WARNING! All changes made in this file will be lost! |
|
8 |
import os |
|
9 |
import sys |
|
10 |
from PyQt5 import QtCore, QtGui, QtWidgets |
|
11 |
from PyQt5.QtWidgets import * |
|
12 |
from AppDocData import AppDocData |
|
13 |
import FittingMethod_UI |
|
14 |
import math |
|
15 |
|
|
16 |
class QFittingMethodDialog(QDialog): |
|
17 |
def __init__(self): |
|
18 |
QDialog.__init__(self) |
|
19 |
|
|
20 |
self.ui = FittingMethod_UI.Ui_FittingMethodDialog() |
|
21 |
self.ui.setupUi(self) |
|
22 |
self.selectedFittingMethod = None |
|
23 |
self.initFittingMethod() |
|
24 |
|
|
25 |
def initFittingMethod(self): |
|
26 |
self.ui.comboBox_FittingMethod.clear() |
|
27 |
|
|
28 |
self.ui.comboBox_FittingMethod.addItem('Equivalent Length Method', 'EquivalentLength') |
|
29 |
self.ui.comboBox_FittingMethod.addItem('Crane K Method', 'CraneK') |
|
30 |
self.ui.comboBox_FittingMethod.addItem('2-K Method', '2K') |
|
31 |
|
|
32 |
self.ui.comboBox_FittingMethod.setCurrentIndex(0) |
|
33 |
|
|
34 |
def showDialog(self, item): |
|
35 |
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint) |
|
36 |
self.exec_() |
|
37 |
|
|
38 |
return self.selectedFittingMethod |
|
39 |
|
|
40 |
def accept(self): |
|
41 |
index = self.ui.comboBox_FittingMethod.currentIndex() |
|
42 |
FittingMethod = self.ui.comboBox_FittingMethod.itemData(index) |
|
43 |
self.selectedFittingMethod = FittingMethod |
|
44 |
QDialog.accept(self) |
|
45 |
|
|
46 |
def reject(self): |
|
47 |
QDialog.reject(self) |
|
48 |
|
|
49 |
|
|
50 |
if __name__ == '__main__': |
|
51 |
from FittingMethodDialog import QFittingMethodDialog |
|
52 |
from App import App |
|
53 |
app = App(sys.argv) |
|
54 |
|
|
55 |
|
|
56 |
if True: |
|
57 |
dlg = QFittingMethodDialog() |
|
58 |
dlg.exec_() |
HYTOS/HYTOS/FittingMethod_UI.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
|
|
3 |
# Form implementation generated from reading ui file '.\UI\FittingMethod.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_FittingMethodDialog(object): |
|
14 |
def setupUi(self, FittingMethodDialog): |
|
15 |
FittingMethodDialog.setObjectName("FittingMethodDialog") |
|
16 |
FittingMethodDialog.resize(367, 107) |
|
17 |
FittingMethodDialog.setMinimumSize(QtCore.QSize(0, 0)) |
|
18 |
FittingMethodDialog.setMaximumSize(QtCore.QSize(16777215, 16777215)) |
|
19 |
font = QtGui.QFont() |
|
20 |
font.setFamily("맑은 고딕") |
|
21 |
font.setBold(True) |
|
22 |
font.setWeight(75) |
|
23 |
FittingMethodDialog.setFont(font) |
|
24 |
icon = QtGui.QIcon() |
|
25 |
icon.addPixmap(QtGui.QPixmap(":/images/HYTOS.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
|
26 |
FittingMethodDialog.setWindowIcon(icon) |
|
27 |
self.verticalLayout = QtWidgets.QVBoxLayout(FittingMethodDialog) |
|
28 |
self.verticalLayout.setObjectName("verticalLayout") |
|
29 |
self.verticalLayout_2 = QtWidgets.QVBoxLayout() |
|
30 |
self.verticalLayout_2.setObjectName("verticalLayout_2") |
|
31 |
self.horizontalLayout_3 = QtWidgets.QHBoxLayout() |
|
32 |
self.horizontalLayout_3.setObjectName("horizontalLayout_3") |
|
33 |
self.StreamNo = QtWidgets.QLabel(FittingMethodDialog) |
|
34 |
self.StreamNo.setMinimumSize(QtCore.QSize(100, 0)) |
|
35 |
self.StreamNo.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
36 |
font = QtGui.QFont() |
|
37 |
font.setFamily("맑은 고딕") |
|
38 |
font.setPointSize(9) |
|
39 |
font.setBold(False) |
|
40 |
font.setWeight(50) |
|
41 |
self.StreamNo.setFont(font) |
|
42 |
self.StreamNo.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) |
|
43 |
self.StreamNo.setObjectName("StreamNo") |
|
44 |
self.horizontalLayout_3.addWidget(self.StreamNo) |
|
45 |
self.lineEdit_CurrentMethod = QtWidgets.QLineEdit(FittingMethodDialog) |
|
46 |
self.lineEdit_CurrentMethod.setEnabled(False) |
|
47 |
font = QtGui.QFont() |
|
48 |
font.setBold(False) |
|
49 |
font.setWeight(50) |
|
50 |
self.lineEdit_CurrentMethod.setFont(font) |
|
51 |
self.lineEdit_CurrentMethod.setText("") |
|
52 |
self.lineEdit_CurrentMethod.setAlignment(QtCore.Qt.AlignCenter) |
|
53 |
self.lineEdit_CurrentMethod.setObjectName("lineEdit_CurrentMethod") |
|
54 |
self.horizontalLayout_3.addWidget(self.lineEdit_CurrentMethod) |
|
55 |
self.verticalLayout_2.addLayout(self.horizontalLayout_3) |
|
56 |
self.horizontalLayout = QtWidgets.QHBoxLayout() |
|
57 |
self.horizontalLayout.setObjectName("horizontalLayout") |
|
58 |
self.label = QtWidgets.QLabel(FittingMethodDialog) |
|
59 |
self.label.setMinimumSize(QtCore.QSize(100, 0)) |
|
60 |
self.label.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
61 |
font = QtGui.QFont() |
|
62 |
font.setBold(False) |
|
63 |
font.setWeight(50) |
|
64 |
self.label.setFont(font) |
|
65 |
self.label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) |
|
66 |
self.label.setObjectName("label") |
|
67 |
self.horizontalLayout.addWidget(self.label) |
|
68 |
self.comboBox_FittingMethod = QtWidgets.QComboBox(FittingMethodDialog) |
|
69 |
font = QtGui.QFont() |
|
70 |
font.setBold(False) |
|
71 |
font.setWeight(50) |
|
72 |
self.comboBox_FittingMethod.setFont(font) |
|
73 |
self.comboBox_FittingMethod.setObjectName("comboBox_FittingMethod") |
|
74 |
self.horizontalLayout.addWidget(self.comboBox_FittingMethod) |
|
75 |
self.verticalLayout_2.addLayout(self.horizontalLayout) |
|
76 |
self.verticalLayout.addLayout(self.verticalLayout_2) |
|
77 |
self.errorLabel = QtWidgets.QLabel(FittingMethodDialog) |
|
78 |
self.errorLabel.setMaximumSize(QtCore.QSize(16777215, 0)) |
|
79 |
self.errorLabel.setStyleSheet("") |
|
80 |
self.errorLabel.setText("") |
|
81 |
self.errorLabel.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) |
|
82 |
self.errorLabel.setObjectName("errorLabel") |
|
83 |
self.verticalLayout.addWidget(self.errorLabel) |
|
84 |
self.buttonBox = QtWidgets.QDialogButtonBox(FittingMethodDialog) |
|
85 |
font = QtGui.QFont() |
|
86 |
font.setFamily("맑은 고딕") |
|
87 |
font.setBold(True) |
|
88 |
font.setWeight(75) |
|
89 |
self.buttonBox.setFont(font) |
|
90 |
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) |
|
91 |
self.buttonBox.setObjectName("buttonBox") |
|
92 |
self.verticalLayout.addWidget(self.buttonBox) |
|
93 |
|
|
94 |
self.retranslateUi(FittingMethodDialog) |
|
95 |
self.buttonBox.rejected.connect(FittingMethodDialog.reject) |
|
96 |
self.buttonBox.accepted.connect(FittingMethodDialog.accept) |
|
97 |
QtCore.QMetaObject.connectSlotsByName(FittingMethodDialog) |
|
98 |
|
|
99 |
def retranslateUi(self, FittingMethodDialog): |
|
100 |
_translate = QtCore.QCoreApplication.translate |
|
101 |
FittingMethodDialog.setWindowTitle(_translate("FittingMethodDialog", "Select Fitting Method")) |
|
102 |
self.StreamNo.setText(_translate("FittingMethodDialog", "Current Method :")) |
|
103 |
self.label.setText(_translate("FittingMethodDialog", "Fitting Method : ")) |
|
104 |
import Resource_rc |
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 |
import Fitting_2K_UI |
|
14 |
|
|
15 |
class QFitting_2KDialog(QDialog): |
|
16 |
|
|
17 |
def __init__(self, parent = None): |
|
18 |
QDialog.__init__(self, parent) |
|
19 |
|
|
20 |
self.ui = Fitting_2K_UI.Ui_Dialog() |
|
21 |
self.ui.setupUi(self) |
|
22 |
self.initTableWidgetSelectedFitting() |
|
23 |
|
|
24 |
# 90 Elbow |
|
25 |
self.ui.checkBox_90_Elbow_Standard_Screw.stateChanged.connect(self.elbow_90_state_changed) |
|
26 |
self.ui.checkBox_90_Elbow_Standard_Flange_Weld.stateChanged.connect(self.elbow_90_state_changed) |
|
27 |
self.ui.checkBox_90_Elbow_Long_Radius_All.stateChanged.connect(self.elbow_90_state_changed) |
|
28 |
self.ui.checkBox_90_Elbow_1_Weld.stateChanged.connect(self.elbow_90_state_changed) |
|
29 |
self.ui.checkBox_90_Elbow_2_Weld.stateChanged.connect(self.elbow_90_state_changed) |
|
30 |
self.ui.checkBox_90_Elbow_3_Weld.stateChanged.connect(self.elbow_90_state_changed) |
|
31 |
self.ui.checkBox_90_Elbow_4_Weld.stateChanged.connect(self.elbow_90_state_changed) |
|
32 |
self.ui.checkBox_90_Elbow_5_Weld.stateChanged.connect(self.elbow_90_state_changed) |
|
33 |
# 45 Elbow |
|
34 |
self.ui.checkBox_45_Elbow_Standard_All.stateChanged.connect(self.elbow_45_state_changed) |
|
35 |
self.ui.checkBox_45_Elbow_Long_Radius_All.stateChanged.connect(self.elbow_45_state_changed) |
|
36 |
self.ui.checkBox_45_Elbow_1_Weld.stateChanged.connect(self.elbow_45_state_changed) |
|
37 |
self.ui.checkBox_45_Elbow_2_Weld.stateChanged.connect(self.elbow_45_state_changed) |
|
38 |
# 180 Elbow |
|
39 |
self.ui.checkBox_180_Elbow_Standard_Screw.stateChanged.connect(self.elbow_180_state_changed) |
|
40 |
self.ui.checkBox_180_Elbow_Standard_Flange_Weld.stateChanged.connect(self.elbow_180_state_changed) |
|
41 |
self.ui.checkBox_180_Elbow_Long_Radius_All.stateChanged.connect(self.elbow_180_state_changed) |
|
42 |
# Tees |
|
43 |
self.ui.checkBox_Tee_Elbow_Standard_Screw.stateChanged.connect(self.tee_state_changed) |
|
44 |
self.ui.checkBox_Tee_Elbow_Long_Radius_Screw.stateChanged.connect(self.tee_state_changed) |
|
45 |
self.ui.checkBox_Tee_Elbow_Standard_Flange_Weld.stateChanged.connect(self.tee_state_changed) |
|
46 |
self.ui.checkBox_Tee_Elbow_Stub_In_Branch.stateChanged.connect(self.tee_state_changed) |
|
47 |
self.ui.checkBox_Tee_Through_Screw.stateChanged.connect(self.tee_state_changed) |
|
48 |
self.ui.checkBox_Tee_Through_Flange_Weld.stateChanged.connect(self.tee_state_changed) |
|
49 |
self.ui.checkBox_Tee_Through_Stub_In_Branch.stateChanged.connect(self.tee_state_changed) |
|
50 |
# Valves |
|
51 |
self.ui.checkBox_Gate_Ball_Plug_Valve_Full.stateChanged.connect(self.valve_state_changed) |
|
52 |
self.ui.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_9.stateChanged.connect(self.valve_state_changed) |
|
53 |
self.ui.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_8.stateChanged.connect(self.valve_state_changed) |
|
54 |
self.ui.checkBox_Globe_Valve_Standard.stateChanged.connect(self.valve_state_changed) |
|
55 |
self.ui.checkBox_Globe_Valve_Angle_YType.stateChanged.connect(self.valve_state_changed) |
|
56 |
self.ui.checkBox_Diaphragm_Dam_Valve.stateChanged.connect(self.valve_state_changed) |
|
57 |
self.ui.checkBox_Butterfly_Valve.stateChanged.connect(self.valve_state_changed) |
|
58 |
# Pipe |
|
59 |
self.ui.checkBox_Pipe_Entrance_Normal.stateChanged.connect(self.pipe_state_changed) |
|
60 |
self.ui.checkBox_Pipe_Entrance_Borda.stateChanged.connect(self.pipe_state_changed) |
|
61 |
self.ui.checkBox_Pipe_Exit.stateChanged.connect(self.pipe_state_changed) |
|
62 |
# Check Valve |
|
63 |
self.ui.checkBox_Check_Valve_Lift.stateChanged.connect(self.check_valve_state_changed) |
|
64 |
self.ui.checkBox_Check_Valve_Swing.stateChanged.connect(self.check_valve_state_changed) |
|
65 |
self.ui.checkBox_Check_Valve_Tilting.stateChanged.connect(self.check_valve_state_changed) |
|
66 |
|
|
67 |
|
|
68 |
def initTableWidgetSelectedFitting(self): |
|
69 |
self.ui.tableWidget_SelectedFitting.setColumnCount(7) |
|
70 |
self.ui.tableWidget_SelectedFitting.setHorizontalHeaderLabels(['Category', 'Type', 'Name', 'Count', 'Size', 'Angle', 'K']) |
|
71 |
self.ui.tableWidget_SelectedFitting.horizontalHeaderItem(0).setSizeHint(QSize(25, 25)) |
|
72 |
|
|
73 |
#self.ui.tableWidget_SelectedFitting.setColumnWidth(0, 30) |
|
74 |
#self.ui.tableWidget_SelectedFitting.setColumnWidth(1, 135) |
|
75 |
self.ui.tableWidget_SelectedFitting.horizontalHeader().setStretchLastSection(True) |
|
76 |
|
|
77 |
self.ui.tableWidget_SelectedFitting.setEditTriggers(QAbstractItemView.NoEditTriggers) |
|
78 |
#self.ui.tableWidget_SelectedFitting.resizeColumnsToContents() |
|
79 |
|
|
80 |
self.ui.tableWidget_SelectedFitting.verticalHeader().setVisible(False) |
|
81 |
|
|
82 |
def check_valve_state_changed(self, state): |
|
83 |
rowCount = self.ui.tableWidget_SelectedFitting.rowCount() |
|
84 |
|
|
85 |
if self.sender() == self.ui.checkBox_Check_Valve_Lift: |
|
86 |
if state == 2: |
|
87 |
self.add_fitting_data(rowCount, 'Check Valve', 'Swing Type', 'Lift Check Valve') |
|
88 |
else: |
|
89 |
self.del_fitting_data('Check Valve', 'Swing Type', 'Lift Check Valve') |
|
90 |
elif self.sender() == self.ui.checkBox_Check_Valve_Swing: |
|
91 |
if state == 2: |
|
92 |
self.add_fitting_data(rowCount, 'Check Valve', 'Swing Type', 'Swing Check Valve') |
|
93 |
else: |
|
94 |
self.del_fitting_data('Check Valve', 'Swing Type', 'Swing Check Valve') |
|
95 |
elif self.sender() == self.ui.checkBox_Check_Valve_Tilting: |
|
96 |
if state == 2: |
|
97 |
self.add_fitting_data(rowCount, 'Check Valve', 'Swing Type', 'Tilting-disk Check Valve') |
|
98 |
else: |
|
99 |
self.del_fitting_data('Check Valve', 'Swing Type', 'Tilting-disk Check Valve') |
|
100 |
|
|
101 |
def pipe_state_changed(self, state): |
|
102 |
rowCount = self.ui.tableWidget_SelectedFitting.rowCount() |
|
103 |
|
|
104 |
if self.sender() == self.ui.checkBox_Pipe_Entrance_Normal: |
|
105 |
if state == 2: |
|
106 |
self.add_fitting_data(rowCount, 'Pipe', 'Pipe Type', 'Pipe entrance (Normal)') |
|
107 |
else: |
|
108 |
self.del_fitting_data('Pipe', 'Pipe Type', 'Pipe entrance (Normal)') |
|
109 |
elif self.sender() == self.ui.checkBox_Pipe_Entrance_Borda: |
|
110 |
if state == 2: |
|
111 |
self.add_fitting_data(rowCount, 'Pipe', 'Pipe Type', 'Pipe entrance (Borda)') |
|
112 |
else: |
|
113 |
self.del_fitting_data('Pipe', 'Pipe Type', 'Pipe entrance (Borda)') |
|
114 |
elif self.sender() == self.ui.checkBox_Pipe_Exit: |
|
115 |
if state == 2: |
|
116 |
self.add_fitting_data(rowCount, 'Pipe', 'Pipe Type', 'Pipe exit') |
|
117 |
else: |
|
118 |
self.del_fitting_data('Pipe', 'Pipe Type', 'Pipe exit') |
|
119 |
|
|
120 |
|
|
121 |
def valve_state_changed(self, state): |
|
122 |
rowCount = self.ui.tableWidget_SelectedFitting.rowCount() |
|
123 |
|
|
124 |
if self.sender() == self.ui.checkBox_Gate_Ball_Plug_Valve_Full: |
|
125 |
if state == 2: |
|
126 |
self.add_fitting_data(rowCount, 'Valves', 'Gate, Ball, Plug Type', 'Full line size, β = 1.0') |
|
127 |
else: |
|
128 |
self.del_fitting_data('Valves', 'Gate, Ball, Plug Type', 'Full line size, β = 1.0') |
|
129 |
elif self.sender() == self.ui.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_9: |
|
130 |
if state == 2: |
|
131 |
self.add_fitting_data(rowCount, 'Valves', 'Gate, Ball, Plug Type', 'Reduced Trim, β = 0.9') |
|
132 |
else: |
|
133 |
self.del_fitting_data('Valves', 'Gate, Ball, Plug Type', 'Reduced Trim, β = 0.9') |
|
134 |
elif self.sender() == self.ui.checkBox_Gate_Ball_Plug_Valve_Reduce_Trim_8: |
|
135 |
if state == 2: |
|
136 |
self.add_fitting_data(rowCount, 'Valves', 'Gate, Ball, Plug Type', 'Reduced Trim, β = 0.8') |
|
137 |
else: |
|
138 |
self.del_fitting_data('Valves', 'Gate, Ball, Plug Type', 'Reduced Trim, β = 0.8') |
|
139 |
elif self.sender() == self.ui.checkBox_Globe_Valve_Standard: |
|
140 |
if state == 2: |
|
141 |
self.add_fitting_data(rowCount, 'Valves', 'Globe Type', 'Standard') |
|
142 |
else: |
|
143 |
self.del_fitting_data('Valves', 'Globe Type', 'Standard') |
|
144 |
elif self.sender() == self.ui.checkBox_Globe_Valve_Angle_YType: |
|
145 |
if state == 2: |
|
146 |
self.add_fitting_data(rowCount, 'Valves', 'Globe Type', 'Angle or Y-type') |
|
147 |
else: |
|
148 |
self.del_fitting_data('Valves', 'Globe Type', 'Angle or Y-type') |
|
149 |
elif self.sender() == self.ui.checkBox_Diaphragm_Dam_Valve: |
|
150 |
if state == 2: |
|
151 |
self.add_fitting_data(rowCount, 'Valves', 'Others', 'Diaphragm, dam type') |
|
152 |
else: |
|
153 |
self.del_fitting_data('Valves', 'Others', 'Diaphragm, dam type') |
|
154 |
elif self.sender() == self.ui.checkBox_Butterfly_Valve: |
|
155 |
if state == 2: |
|
156 |
self.add_fitting_data(rowCount, 'Valves', 'Others', 'Butterfly') |
|
157 |
else: |
|
158 |
self.del_fitting_data('Valves', 'Others', 'Butterfly') |
|
159 |
|
|
160 |
|
|
161 |
def tee_state_changed(self, state): |
|
162 |
rowCount = self.ui.tableWidget_SelectedFitting.rowCount() |
|
163 |
|
|
164 |
if self.sender() == self.ui.checkBox_Tee_Elbow_Standard_Screw: |
|
165 |
if state == 2: |
|
166 |
self.add_fitting_data(rowCount, 'Tees', 'Used as Elbow', 'Standard, screwed') |
|
167 |
else: |
|
168 |
self.del_fitting_data('Tees', 'Used as Elbow', 'Standard, screwed') |
|
169 |
elif self.sender() == self.ui.checkBox_Tee_Elbow_Long_Radius_Screw: |
|
170 |
if state == 2: |
|
171 |
self.add_fitting_data(rowCount, 'Tees', 'Used as Elbow', 'Long-radius, screwed') |
|
172 |
else: |
|
173 |
self.del_fitting_data('Tees', 'Used as Elbow', 'Long-radius, screwed') |
|
174 |
elif self.sender() == self.ui.checkBox_Tee_Elbow_Standard_Flange_Weld: |
|
175 |
if state == 2: |
|
176 |
self.add_fitting_data(rowCount, 'Tees', 'Used as Elbow', 'Standard, flanged or welded') |
|
177 |
else: |
|
178 |
self.del_fitting_data('Tees', 'Used as Elbow', 'Standard, flanged or welded') |
|
179 |
elif self.sender() == self.ui.checkBox_Tee_Elbow_Stub_In_Branch: |
|
180 |
if state == 2: |
|
181 |
self.add_fitting_data(rowCount, 'Tees', 'Used as Elbow', 'Stub-in-type branch') |
|
182 |
else: |
|
183 |
self.del_fitting_data('Tees', 'Used as Elbow', 'Stub-in-type branch') |
|
184 |
elif self.sender() == self.ui.checkBox_Tee_Through_Screw: |
|
185 |
if state == 2: |
|
186 |
self.add_fitting_data(rowCount, 'Tees', 'Run through tee', 'Screwed') |
|
187 |
else: |
|
188 |
self.del_fitting_data('Tees', 'Run through tee', 'Screwed') |
|
189 |
elif self.sender() == self.ui.checkBox_Tee_Through_Flange_Weld: |
|
190 |
if state == 2: |
|
191 |
self.add_fitting_data(rowCount, 'Tees', 'Run through tee', 'Flanged or welded') |
|
192 |
else: |
|
193 |
self.del_fitting_data('Tees', 'Run through tee', 'Flanged or welded') |
|
194 |
elif self.sender() == self.ui.checkBox_Tee_Through_Stub_In_Branch: |
|
195 |
if state == 2: |
|
196 |
self.add_fitting_data(rowCount, 'Tees', 'Run through tee', 'Stub-in-type branch') |
|
197 |
else: |
|
198 |
self.del_fitting_data('Tees', 'Run through tee', 'Stub-in-type branch') |
|
199 |
|
|
200 |
|
|
201 |
def elbow_180_state_changed(self, state): |
|
202 |
rowCount = self.ui.tableWidget_SelectedFitting.rowCount() |
|
203 |
|
|
204 |
if self.sender() == self.ui.checkBox_180_Elbow_Standard_Screw: |
|
205 |
if state == 2: |
|
206 |
self.add_fitting_data(rowCount, '180° Elbow', 'Bend Type', 'Standard (r/d=1), screwed') |
|
207 |
else: |
|
208 |
self.del_fitting_data('180° Elbow', 'Bend Type', 'Standard (r/d=1), screwed') |
|
209 |
elif self.sender() == self.ui.checkBox_180_Elbow_Standard_Flange_Weld: |
|
210 |
if state == 2: |
|
211 |
self.add_fitting_data(rowCount, '180° Elbow', 'Bend Type', 'Standard (r/d=1), flanged/welded') |
|
212 |
else: |
|
213 |
self.del_fitting_data('180° Elbow', 'Bend Type', 'Standard (r/d=1), flanged/welded') |
|
214 |
elif self.sender() == self.ui.checkBox_180_Elbow_Long_Radius_All: |
|
215 |
if state == 2: |
|
216 |
self.add_fitting_data(rowCount, '180° Elbow', 'Bend Type', 'Long-radius (r/d=1.5), all types') |
|
217 |
else: |
|
218 |
self.del_fitting_data('180° Elbow', 'Bend Type', 'Long-radius (r/d=1.5), all types') |
|
219 |
|
|
220 |
def elbow_45_state_changed(self, state): |
|
221 |
rowCount = self.ui.tableWidget_SelectedFitting.rowCount() |
|
222 |
|
|
223 |
if self.sender() == self.ui.checkBox_45_Elbow_Standard_All: |
|
224 |
if state == 2: |
|
225 |
self.add_fitting_data(rowCount, '45° Elbow', 'Bend Type', 'Standard (r/d=1), all types') |
|
226 |
else: |
|
227 |
self.del_fitting_data('45° Elbow', 'Bend Type', 'Standard (r/d=1), all types') |
|
228 |
elif self.sender() == self.ui.checkBox_45_Elbow_Long_Radius_All: |
|
229 |
if state == 2: |
|
230 |
self.add_fitting_data(rowCount, '45° Elbow', 'Bend Type', 'Long-radius (r/d=1.5), all types') |
|
231 |
else: |
|
232 |
self.del_fitting_data('45° Elbow', 'Bend Type', 'Long-radius (r/d=1.5), all types') |
|
233 |
elif self.sender() == self.ui.checkBox_45_Elbow_1_Weld: |
|
234 |
if state == 2: |
|
235 |
self.add_fitting_data(rowCount, '45° Elbow', 'Miter Type', '1 weld (45 angle)') |
|
236 |
else: |
|
237 |
self.del_fitting_data('45° Elbow', 'Miter Type', '1 weld (45 angle)') |
|
238 |
elif self.sender() == self.ui.checkBox_45_Elbow_2_Weld: |
|
239 |
if state == 2: |
|
240 |
self.add_fitting_data(rowCount, '45° Elbow', 'Miter Type', '2 welds (22.5 angle)') |
|
241 |
else: |
|
242 |
self.del_fitting_data('45° Elbow', 'Miter Type', '2 welds (22.5 angle)') |
|
243 |
|
|
244 |
|
|
245 |
def elbow_90_state_changed(self, state): |
|
246 |
rowCount = self.ui.tableWidget_SelectedFitting.rowCount() |
|
247 |
|
|
248 |
if self.sender() == self.ui.checkBox_90_Elbow_Standard_Screw: |
|
249 |
if state == 2: |
|
250 |
self.add_fitting_data(rowCount, '90° Elbow', 'Bend Type', 'Standard (r/d=1), screwed') |
|
251 |
else: |
|
252 |
self.del_fitting_data('90° Elbow', 'Bend Type', 'Standard (r/d=1), screwed') |
|
253 |
elif self.sender() == self.ui.checkBox_90_Elbow_Standard_Flange_Weld: |
|
254 |
if state == 2: |
|
255 |
self.add_fitting_data(rowCount, '90° Elbow', 'Bend Type', 'Standard (r/d=1), flanged/weled') |
|
256 |
else: |
|
257 |
self.del_fitting_data('90° Elbow', 'Bend Type', 'Standard (r/d=1), flanged/weled') |
|
258 |
elif self.sender() == self.ui.checkBox_90_Elbow_Long_Radius_All: |
|
259 |
if state == 2: |
|
260 |
self.add_fitting_data(rowCount, '90° Elbow', 'Bend Type', 'Long-radius (r/d=1.5), all') |
|
261 |
else: |
|
262 |
self.del_fitting_data('90° Elbow', 'Bend Type', 'Long-radius (r/d=1.5), all') |
|
263 |
elif self.sender() == self.ui.checkBox_90_Elbow_1_Weld: |
|
264 |
if state == 2: |
|
265 |
self.add_fitting_data(rowCount, '90° Elbow', 'Miter Type', '1 weld (90 angle)') |
|
266 |
else: |
|
267 |
self.del_fitting_data('90° Elbow', 'Miter Type', '1 weld (90 angle)') |
|
268 |
elif self.sender() == self.ui.checkBox_90_Elbow_2_Weld: |
|
269 |
if state == 2: |
|
270 |
self.add_fitting_data(rowCount, '90° Elbow', 'Miter Type', '2 welds (45 angle)') |
|
271 |
else: |
|
272 |
self.del_fitting_data('90° Elbow', 'Miter Type', '2 welds (45 angle)') |
|
273 |
elif self.sender() == self.ui.checkBox_90_Elbow_3_Weld: |
|
274 |
if state == 2: |
|
275 |
self.add_fitting_data(rowCount, '90° Elbow', 'Miter Type', '3 welds (30 angle)') |
|
276 |
else: |
|
277 |
self.del_fitting_data('90° Elbow', 'Miter Type', '3 welds (30 angle)') |
|
278 |
elif self.sender() == self.ui.checkBox_90_Elbow_4_Weld: |
|
279 |
if state == 2: |
|
280 |
self.add_fitting_data(rowCount, '90° Elbow', 'Miter Type', '4 welds (22.5 angle)') |
|
281 |
else: |
|
282 |
self.del_fitting_data('90° Elbow', 'Miter Type', '4 welds (22.5 angle)') |
|
283 |
elif self.sender() == self.ui.checkBox_90_Elbow_5_Weld: |
|
284 |
if state == 2: |
|
285 |
self.add_fitting_data(rowCount, '90° Elbow', 'Miter Type', '5 welds (18 angle)') |
|
286 |
else: |
|
287 |
self.del_fitting_data('90° Elbow', 'Miter Type', '5 welds (18 angle)') |
|
288 |
|
|
289 |
|
|
290 |
|
|
291 |
def del_fitting_data(self, category, type, name): |
|
292 |
rowCount = self.ui.tableWidget_SelectedFitting.rowCount() |
|
293 |
for row in range(rowCount): |
|
294 |
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: |
|
295 |
self.ui.tableWidget_SelectedFitting.removeRow(row) |
|
296 |
break |
|
297 |
|
|
298 |
def add_fitting_data(self, row, category, type, name): |
|
299 |
self.ui.tableWidget_SelectedFitting.setRowCount(row+1) |
|
300 |
|
|
301 |
self.ui.tableWidget_SelectedFitting.setItem(row, 0, self.setTableWidgetItemProperties(category, Qt.AlignLeft | Qt.AlignVCenter)) |
|
302 |
self.ui.tableWidget_SelectedFitting.setItem(row, 1, self.setTableWidgetItemProperties(type, Qt.AlignLeft | Qt.AlignVCenter)) |
|
303 |
self.ui.tableWidget_SelectedFitting.setItem(row, 2, self.setTableWidgetItemProperties(name, Qt.AlignLeft | Qt.AlignVCenter)) |
|
304 |
self.ui.tableWidget_SelectedFitting.setItem(row, 3, self.setTableWidgetItemProperties(1, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
305 |
|
|
306 |
|
|
307 |
def showDialog(self, item): |
|
308 |
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) |
|
309 |
self.exec_() |
|
310 |
|
|
311 |
def setTableWidgetItemProperties(self, name, alignment, color = None): |
|
312 |
|
|
313 |
item = QTableWidgetItem(str(name)) |
|
314 |
item.setTextAlignment(alignment) |
|
315 |
if color: |
|
316 |
item.setBackground(color) |
|
317 |
|
|
318 |
return item |
|
319 |
|
|
320 |
def accept(self): |
|
321 |
|
|
322 |
QDialog.accept(self) |
|
323 |
|
|
324 |
def reject(self): |
|
325 |
QDialog.reject(self) |
|
326 |
|
|
327 |
|
|
328 |
|
|
329 |
|
|
330 |
if __name__ == '__main__': |
|
331 |
from Fitting_2KDialog import QFitting_2KDialog |
|
332 |
from App import App |
|
333 |
app = App(sys.argv) |
|
334 |
|
|
335 |
|
|
336 |
if True: |
|
337 |
dlg = QFitting_2KDialog() |
|
338 |
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(":/images/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(":/images/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(":/images/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(":/images/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(":/images/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(":/images/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(":/images/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(":/images/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 |
import Fitting_CraneK_UI |
|
14 |
|
|
15 |
class QFitting_CraneKDialog(QDialog): |
|
16 |
|
|
17 |
def __init__(self, parent = None): |
|
18 |
QDialog.__init__(self, parent) |
|
19 |
|
|
20 |
self.ui = Fitting_CraneK_UI.Ui_Dialog() |
|
21 |
self.ui.setupUi(self) |
|
22 |
self.initTableWidgetSelectedFitting() |
|
23 |
|
|
24 |
# 90 Elbow |
|
25 |
self.ui.checkBox_90_Elbow_Standard_Screw.stateChanged.connect(self.elbow_90_state_changed) |
|
26 |
self.ui.checkBox_90_Elbow_Long_Radius_1.stateChanged.connect(self.elbow_90_state_changed) |
|
27 |
self.ui.checkBox_90_Elbow_Long_Radius_1_5.stateChanged.connect(self.elbow_90_state_changed) |
|
28 |
self.ui.checkBox_90_Elbow_Long_Radius_2.stateChanged.connect(self.elbow_90_state_changed) |
|
29 |
self.ui.checkBox_90_Elbow_Long_Radius_3.stateChanged.connect(self.elbow_90_state_changed) |
|
30 |
self.ui.checkBox_90_Elbow_Long_Radius_4.stateChanged.connect(self.elbow_90_state_changed) |
|
31 |
self.ui.checkBox_90_Elbow_Long_Radius_6.stateChanged.connect(self.elbow_90_state_changed) |
|
32 |
self.ui.checkBox_90_Elbow_Long_Radius_8.stateChanged.connect(self.elbow_90_state_changed) |
|
33 |
self.ui.checkBox_90_Elbow_Long_Radius_10.stateChanged.connect(self.elbow_90_state_changed) |
|
34 |
self.ui.checkBox_90_Elbow_Long_Radius_12.stateChanged.connect(self.elbow_90_state_changed) |
|
35 |
self.ui.checkBox_90_Elbow_Long_Radius_14.stateChanged.connect(self.elbow_90_state_changed) |
|
36 |
self.ui.checkBox_90_Elbow_Long_Radius_16.stateChanged.connect(self.elbow_90_state_changed) |
|
37 |
self.ui.checkBox_90_Elbow_Long_Radius_20.stateChanged.connect(self.elbow_90_state_changed) |
|
38 |
self.ui.checkBox_90_Elbow_1_Weld.stateChanged.connect(self.elbow_90_state_changed) |
|
39 |
self.ui.checkBox_90_Elbow_2_Weld.stateChanged.connect(self.elbow_90_state_changed) |
|
40 |
self.ui.checkBox_90_Elbow_3_Weld.stateChanged.connect(self.elbow_90_state_changed) |
|
41 |
self.ui.checkBox_90_Elbow_6_Weld.stateChanged.connect(self.elbow_90_state_changed) |
|
42 |
# 45 Elbow |
|
43 |
self.ui.checkBox_45_Elbow_Standard_Screw.stateChanged.connect(self.elbow_45_state_changed) |
|
44 |
self.ui.checkBox_45_Elbow_1_Weld.stateChanged.connect(self.elbow_45_state_changed) |
|
45 |
self.ui.checkBox_45_Elbow_3_Weld.stateChanged.connect(self.elbow_45_state_changed) |
|
46 |
# 180 Elbow |
|
47 |
self.ui.checkBox_180_Elbow_Standard_Screw.stateChanged.connect(self.elbow_180_state_changed) |
|
48 |
self.ui.checkBox_180_Elbow_Long_Radius_1.stateChanged.connect(self.elbow_180_state_changed) |
|
49 |
self.ui.checkBox_180_Elbow_Long_Radius_1_5.stateChanged.connect(self.elbow_180_state_changed) |
|
50 |
self.ui.checkBox_180_Elbow_Long_Radius_2.stateChanged.connect(self.elbow_180_state_changed) |
|
51 |
self.ui.checkBox_180_Elbow_Long_Radius_3.stateChanged.connect(self.elbow_180_state_changed) |
|
52 |
self.ui.checkBox_180_Elbow_Long_Radius_4.stateChanged.connect(self.elbow_180_state_changed) |
|
53 |
self.ui.checkBox_180_Elbow_Long_Radius_6.stateChanged.connect(self.elbow_180_state_changed) |
|
54 |
self.ui.checkBox_180_Elbow_Long_Radius_8.stateChanged.connect(self.elbow_180_state_changed) |
|
55 |
self.ui.checkBox_180_Elbow_Long_Radius_10.stateChanged.connect(self.elbow_180_state_changed) |
|
56 |
self.ui.checkBox_180_Elbow_Long_Radius_12.stateChanged.connect(self.elbow_180_state_changed) |
|
57 |
self.ui.checkBox_180_Elbow_Long_Radius_14.stateChanged.connect(self.elbow_180_state_changed) |
|
58 |
self.ui.checkBox_180_Elbow_Long_Radius_16.stateChanged.connect(self.elbow_180_state_changed) |
|
59 |
self.ui.checkBox_180_Elbow_Long_Radius_20.stateChanged.connect(self.elbow_180_state_changed) |
|
60 |
self.ui.checkBox_180_Elbow_2_Weld.stateChanged.connect(self.elbow_180_state_changed) |
|
61 |
self.ui.checkBox_180_Elbow_3_Weld.stateChanged.connect(self.elbow_180_state_changed) |
|
62 |
self.ui.checkBox_180_Elbow_4_Weld.stateChanged.connect(self.elbow_180_state_changed) |
|
63 |
self.ui.checkBox_180_Elbow_6_Weld.stateChanged.connect(self.elbow_180_state_changed) |
|
64 |
self.ui.checkBox_180_Elbow_12_Weld.stateChanged.connect(self.elbow_180_state_changed) |
|
65 |
# Tees |
|
66 |
self.ui.checkBox_Tee_Through.stateChanged.connect(self.tee_state_changed) |
|
67 |
self.ui.checkBox_Tee_Elbow.stateChanged.connect(self.tee_state_changed) |
|
68 |
|
|
69 |
# Expander/Reducer |
|
70 |
self.ui.checkBox_Expander.stateChanged.connect(self.expaner_reducer_state_changed) |
|
71 |
self.ui.checkBox_Reducer.stateChanged.connect(self.expaner_reducer_state_changed) |
|
72 |
|
|
73 |
# Valves |
|
74 |
self.ui.checkBox_Globe_Valve_Standard.stateChanged.connect(self.valve_state_changed) |
|
75 |
self.ui.checkBox_Globe_Valve_45_Angle.stateChanged.connect(self.valve_state_changed) |
|
76 |
self.ui.checkBox_Globe_Valve_90_Angle.stateChanged.connect(self.valve_state_changed) |
|
77 |
self.ui.checkBox_Plug_Valve_1_Way.stateChanged.connect(self.valve_state_changed) |
|
78 |
self.ui.checkBox_Plug_Valve_3_Way_Elbow.stateChanged.connect(self.valve_state_changed) |
|
79 |
self.ui.checkBox_Plug_Valve_3_Way_Through.stateChanged.connect(self.valve_state_changed) |
|
80 |
self.ui.checkBox_Foot_Valve_Poppet_Disc.stateChanged.connect(self.valve_state_changed) |
|
81 |
self.ui.checkBox_Foot_Valve_Hinged_Disc.stateChanged.connect(self.valve_state_changed) |
|
82 |
self.ui.checkBox_Gate_Valve.stateChanged.connect(self.valve_state_changed) |
|
83 |
self.ui.checkBox_Ball_Valve.stateChanged.connect(self.valve_state_changed) |
|
84 |
self.ui.checkBox_Butterfly_Valve.stateChanged.connect(self.valve_state_changed) |
|
85 |
|
|
86 |
# Pipe |
|
87 |
self.ui.checkBox_Pipe_Enterance_Projecting.stateChanged.connect(self.pipe_state_changed) |
|
88 |
self.ui.checkBox_Pipe_Enterance_Flush_0.stateChanged.connect(self.pipe_state_changed) |
|
89 |
self.ui.checkBox_Pipe_Enterance_Flush_2.stateChanged.connect(self.pipe_state_changed) |
|
90 |
self.ui.checkBox_Pipe_Enterance_Flush_4.stateChanged.connect(self.pipe_state_changed) |
|
91 |
self.ui.checkBox_Pipe_Enterance_Flush_6.stateChanged.connect(self.pipe_state_changed) |
|
92 |
self.ui.checkBox_Pipe_Enterance_Flush_10.stateChanged.connect(self.pipe_state_changed) |
|
93 |
self.ui.checkBox_Pipe_Enterance_Flush_15.stateChanged.connect(self.pipe_state_changed) |
|
94 |
self.ui.checkBox_Pipe_Exit_Projecting.stateChanged.connect(self.pipe_state_changed) |
|
95 |
self.ui.checkBox_Pipe_Exit_Sharp_Edged.stateChanged.connect(self.pipe_state_changed) |
|
96 |
self.ui.checkBox_Pipe_Exit_Rounded.stateChanged.connect(self.pipe_state_changed) |
|
97 |
|
|
98 |
# Check Valve |
|
99 |
self.ui.checkBox_Check_Valve_Swing_Vertical.stateChanged.connect(self.check_valve_state_changed) |
|
100 |
self.ui.checkBox_Check_Valve_Swing_Angled.stateChanged.connect(self.check_valve_state_changed) |
|
101 |
self.ui.checkBox_Check_Valve_Lift_Straight.stateChanged.connect(self.check_valve_state_changed) |
|
102 |
self.ui.checkBox_Check_Valve_Lift_Angled.stateChanged.connect(self.check_valve_state_changed) |
|
103 |
self.ui.checkBox_Check_Valve_Tilting_Alpha_5.stateChanged.connect(self.check_valve_state_changed) |
|
104 |
self.ui.checkBox_Check_Valve_Tilting_Alpha_15.stateChanged.connect(self.check_valve_state_changed) |
|
105 |
self.ui.checkBox_Check_Valve_Globe_Stop.stateChanged.connect(self.check_valve_state_changed) |
|
106 |
self.ui.checkBox_Check_Valve_Globe_Stop_45_Angle.stateChanged.connect(self.check_valve_state_changed) |
|
107 |
self.ui.checkBox_Check_Valve_Globe_Stop_Inline.stateChanged.connect(self.check_valve_state_changed) |
|
108 |
self.ui.checkBox_Check_Valve_Angled_Stop.stateChanged.connect(self.check_valve_state_changed) |
|
109 |
self.ui.checkBox_Check_Valve_Angled_Stop_45_Angle.stateChanged.connect(self.check_valve_state_changed) |
|
110 |
self.ui.checkBox_Check_Valve_Angled_Stop_Inline.stateChanged.connect(self.check_valve_state_changed) |
|
111 |
|
|
112 |
#Manual K |
|
113 |
self.ui.checkBox_User_Input.stateChanged.connect(self.manual_k_state_changed) |
|
114 |
|
|
115 |
|
|
116 |
|
|
117 |
|
|
118 |
def initTableWidgetSelectedFitting(self): |
|
119 |
self.ui.tableWidget_SelectedFitting.setColumnCount(7) |
|
120 |
self.ui.tableWidget_SelectedFitting.setHorizontalHeaderLabels(['Category', 'Type', 'Name', 'Count', 'Size', 'Angle', 'K']) |
|
121 |
self.ui.tableWidget_SelectedFitting.horizontalHeaderItem(0).setSizeHint(QSize(25, 25)) |
|
122 |
|
|
123 |
#self.ui.tableWidget_SelectedFitting.setColumnWidth(0, 30) |
|
124 |
#self.ui.tableWidget_SelectedFitting.setColumnWidth(1, 135) |
|
125 |
self.ui.tableWidget_SelectedFitting.horizontalHeader().setStretchLastSection(True) |
|
126 |
|
|
127 |
self.ui.tableWidget_SelectedFitting.setEditTriggers(QAbstractItemView.NoEditTriggers) |
|
128 |
#self.ui.tableWidget_SelectedFitting.resizeColumnsToContents() |
|
129 |
|
|
130 |
self.ui.tableWidget_SelectedFitting.verticalHeader().setVisible(False) |
|
131 |
|
|
132 |
def manual_k_state_changed(self, state): |
|
133 |
rowCount = self.ui.tableWidget_SelectedFitting.rowCount() |
|
134 |
|
|
135 |
if self.sender() == self.ui.checkBox_User_Input: |
|
136 |
if state == 2: |
|
137 |
self.add_fitting_data(rowCount, 'Manual K', 'Manual K', 'User Input') |
|
138 |
else: |
|
139 |
self.del_fitting_data('Manual K', 'Manual K', 'User Input') |
|
140 |
|
|
141 |
|
|
142 |
def check_valve_state_changed(self, state): |
|
143 |
rowCount = self.ui.tableWidget_SelectedFitting.rowCount() |
|
144 |
|
|
145 |
if self.sender() == self.ui.checkBox_Check_Valve_Swing_Vertical: |
|
146 |
if state == 2: |
|
147 |
self.add_fitting_data(rowCount, 'Check Valve', 'Swing Type', 'Swing Check Valve (Vertical)') |
|
148 |
else: |
|
149 |
self.del_fitting_data('Check Valve', 'Swing Type', 'Swing Check Valve (Vertical)') |
|
150 |
elif self.sender() == self.ui.checkBox_Check_Valve_Swing_Angled: |
|
151 |
if state == 2: |
|
152 |
self.add_fitting_data(rowCount, 'Check Valve', 'Swing Type', 'Swing Check Valve (Angled)') |
|
153 |
else: |
|
154 |
self.del_fitting_data('Check Valve', 'Swing Type', 'Swing Check Valve (Angled)') |
|
155 |
elif self.sender() == self.ui.checkBox_Check_Valve_Lift_Straight: |
|
156 |
if state == 2: |
|
157 |
self.add_fitting_data(rowCount, 'Check Valve', 'Lift Type', 'Lift Check Valve') |
|
158 |
else: |
|
159 |
self.del_fitting_data('Check Valve', 'Lift Type', 'Lift Check Valve') |
|
160 |
elif self.sender() == self.ui.checkBox_Check_Valve_Lift_Angled: |
|
161 |
if state == 2: |
|
162 |
self.add_fitting_data(rowCount, 'Check Valve', 'Lift Type', 'Lift Check Valve (Angled)') |
|
163 |
else: |
|
164 |
self.del_fitting_data('Check Valve', 'Lift Type', 'Lift Check Valve (Angled)') |
|
165 |
elif self.sender() == self.ui.checkBox_Check_Valve_Tilting_Alpha_5: |
|
166 |
if state == 2: |
|
167 |
self.add_fitting_data(rowCount, 'Check Valve', 'Tilting Type', 'Tilting-disk Check Valve (α=5˚)') |
|
168 |
else: |
|
169 |
self.del_fitting_data('Check Valve', 'Tilting Type', 'Tilting-disk Check Valve (α=5˚)') |
|
170 |
elif self.sender() == self.ui.checkBox_Check_Valve_Tilting_Alpha_15: |
|
171 |
if state == 2: |
|
172 |
self.add_fitting_data(rowCount, 'Check Valve', 'Tilting Type', 'Tilting-disk Check Valve (α=15˚)') |
|
173 |
else: |
|
174 |
self.del_fitting_data('Check Valve', 'Tilting Type', 'Tilting-disk Check Valve (α=15˚)') |
|
175 |
elif self.sender() == self.ui.checkBox_Check_Valve_Globe_Stop: |
|
176 |
if state == 2: |
|
177 |
self.add_fitting_data(rowCount, 'Check Valve', 'Stop Type (Globe)', 'Globe Stop Check Valve') |
|
178 |
else: |
|
179 |
self.del_fitting_data('Check Valve', 'Stop Type (Globe)', 'Globe Stop Check Valve') |
|
180 |
elif self.sender() == self.ui.checkBox_Check_Valve_Globe_Stop_45_Angle: |
|
181 |
if state == 2: |
|
182 |
self.add_fitting_data(rowCount, 'Check Valve', 'Stop Type (Globe)', 'Globe Stop Check Valve (45˚)') |
|
183 |
else: |
|
184 |
self.del_fitting_data('Check Valve', 'Stop Type (Globe)', 'Globe Stop Check Valve (45˚)') |
|
185 |
elif self.sender() == self.ui.checkBox_Check_Valve_Globe_Stop_Inline: |
|
186 |
if state == 2: |
|
187 |
self.add_fitting_data(rowCount, 'Check Valve', 'Stop Type (Globe)', 'Globe Stop Check Valve (inline)') |
|
188 |
else: |
|
189 |
self.del_fitting_data('Check Valve', 'Stop Type (Globe)', 'Globe Stop Check Valve (inline)') |
|
190 |
elif self.sender() == self.ui.checkBox_Check_Valve_Angled_Stop: |
|
191 |
if state == 2: |
|
192 |
self.add_fitting_data(rowCount, 'Check Valve', 'Stop Type (Angle)', 'Angle Stop Check Valve') |
|
193 |
else: |
|
194 |
self.del_fitting_data('Check Valve', 'Stop Type (Angle)', 'Angle Stop Check Valve') |
|
195 |
elif self.sender() == self.ui.checkBox_Check_Valve_Angled_Stop_45_Angle: |
|
196 |
if state == 2: |
|
197 |
self.add_fitting_data(rowCount, 'Check Valve', 'Stop Type (Angle)', 'Angle Stop Check Valve (45˚)') |
|
198 |
else: |
|
199 |
self.del_fitting_data('Check Valve', 'Stop Type (Angle)', 'Angle Stop Check Valve (45˚)') |
|
200 |
elif self.sender() == self.ui.checkBox_Check_Valve_Angled_Stop_Inline: |
|
201 |
if state == 2: |
|
202 |
self.add_fitting_data(rowCount, 'Check Valve', 'Stop Type (Angle)', 'Angle Stop Check Valve (inline)') |
|
203 |
else: |
|
204 |
self.del_fitting_data('Check Valve', 'Stop Type (Angle)', 'Angle Stop Check Valve (inline)') |
|
205 |
|
|
206 |
|
|
207 |
|
|
208 |
|
|
209 |
def pipe_state_changed(self, state): |
|
210 |
rowCount = self.ui.tableWidget_SelectedFitting.rowCount() |
|
211 |
|
|
212 |
if self.sender() == self.ui.checkBox_Pipe_Enterance_Projecting: |
|
213 |
if state == 2: |
|
214 |
self.add_fitting_data(rowCount, 'Pipe', 'Entrance', 'Pipe entrance (projection)') |
|
215 |
else: |
|
216 |
self.del_fitting_data('Pipe', 'Entrance', 'Pipe entrance (projection)') |
|
217 |
elif self.sender() == self.ui.checkBox_Pipe_Enterance_Flush_0: |
|
218 |
if state == 2: |
|
219 |
self.add_fitting_data(rowCount, 'Pipe', 'Entrance', 'Pipe entrance (flush) r/d=0.00') |
|
220 |
else: |
|
221 |
self.del_fitting_data('Pipe', 'Entrance', 'Pipe entrance (flush) r/d=0.00') |
|
222 |
elif self.sender() == self.ui.checkBox_Pipe_Enterance_Flush_2: |
|
223 |
if state == 2: |
|
224 |
self.add_fitting_data(rowCount, 'Pipe', 'Entrance', 'Pipe entrance (flush) r/d=0.02') |
|
225 |
else: |
|
226 |
self.del_fitting_data('Pipe', 'Entrance', 'Pipe entrance (flush) r/d=0.02') |
|
227 |
elif self.sender() == self.ui.checkBox_Pipe_Enterance_Flush_4: |
|
228 |
if state == 2: |
|
229 |
self.add_fitting_data(rowCount, 'Pipe', 'Entrance', 'Pipe entrance (flush) r/d=0.04') |
|
230 |
else: |
|
231 |
self.del_fitting_data('Pipe', 'Entrance', 'Pipe entrance (flush) r/d=0.04') |
|
232 |
elif self.sender() == self.ui.checkBox_Pipe_Enterance_Flush_6: |
|
233 |
if state == 2: |
|
234 |
self.add_fitting_data(rowCount, 'Pipe', 'Entrance', 'Pipe entrance (flush) r/d=0.06') |
|
235 |
else: |
|
236 |
self.del_fitting_data('Pipe', 'Entrance', 'Pipe entrance (flush) r/d=0.06') |
|
237 |
elif self.sender() == self.ui.checkBox_Pipe_Enterance_Flush_10: |
|
238 |
if state == 2: |
|
239 |
self.add_fitting_data(rowCount, 'Pipe', 'Entrance', 'Pipe entrance (flush) r/d=0.10') |
|
240 |
else: |
|
241 |
self.del_fitting_data('Pipe', 'Entrance', 'Pipe entrance (flush) r/d=0.10') |
|
242 |
elif self.sender() == self.ui.checkBox_Pipe_Enterance_Flush_15: |
|
243 |
if state == 2: |
|
244 |
self.add_fitting_data(rowCount, 'Pipe', 'Entrance', 'Pipe entrance (flush) r/d=0.15') |
|
245 |
else: |
|
246 |
self.del_fitting_data('Pipe', 'Entrance', 'Pipe entrance (flush) r/d=0.15') |
|
247 |
elif self.sender() == self.ui.checkBox_Pipe_Exit_Projecting: |
|
248 |
if state == 2: |
|
249 |
self.add_fitting_data(rowCount, 'Pipe', 'Exit', 'Pipe exit (projection)') |
|
250 |
else: |
|
251 |
self.del_fitting_data('Pipe', 'Exit', 'Pipe exit (projection)') |
|
252 |
elif self.sender() == self.ui.checkBox_Pipe_Exit_Sharp_Edged: |
|
253 |
if state == 2: |
|
254 |
self.add_fitting_data(rowCount, 'Pipe', 'Exit', 'Pipe exit (sharp-edged)') |
|
255 |
else: |
|
256 |
self.del_fitting_data('Pipe', 'Exit', 'Pipe exit (sharp-edged)') |
|
257 |
elif self.sender() == self.ui.checkBox_Pipe_Exit_Rounded: |
|
258 |
if state == 2: |
|
259 |
self.add_fitting_data(rowCount, 'Pipe', 'Exit', 'Pipe exit (rounded)') |
|
260 |
else: |
|
261 |
self.del_fitting_data('Pipe', 'Exit', 'Pipe exit (rounded)') |
|
262 |
|
|
263 |
|
|
264 |
|
|
265 |
|
|
266 |
|
|
267 |
def valve_state_changed(self, state): |
|
268 |
rowCount = self.ui.tableWidget_SelectedFitting.rowCount() |
|
269 |
|
|
270 |
if self.sender() == self.ui.checkBox_Globe_Valve_Standard: |
|
271 |
if state == 2: |
|
272 |
self.add_fitting_data(rowCount, 'Valves', 'Globe Type', 'Standard') |
|
273 |
else: |
|
274 |
self.del_fitting_data('Valves', 'Globe Type', 'Standard') |
|
275 |
elif self.sender() == self.ui.checkBox_Globe_Valve_45_Angle: |
|
276 |
if state == 2: |
|
277 |
self.add_fitting_data(rowCount, 'Valves', 'Globe Type', 'Angled - 45°') |
|
278 |
else: |
|
279 |
self.del_fitting_data('Valves', 'Globe Type', 'Angled - 45°') |
|
280 |
elif self.sender() == self.ui.checkBox_Globe_Valve_90_Angle: |
|
281 |
if state == 2: |
|
282 |
self.add_fitting_data(rowCount, 'Valves', 'Globe Type', 'Angled - 90°') |
|
283 |
else: |
|
284 |
self.del_fitting_data('Valves', 'Globe Type', 'Angled - 90°') |
|
285 |
elif self.sender() == self.ui.checkBox_Plug_Valve_1_Way: |
|
286 |
if state == 2: |
|
287 |
self.add_fitting_data(rowCount, 'Valves', 'Plug Type', 'Straight-way') |
|
288 |
else: |
|
289 |
self.del_fitting_data('Valves', 'Plug Type', 'Straight-way') |
|
290 |
elif self.sender() == self.ui.checkBox_Plug_Valve_3_Way_Through: |
|
291 |
if state == 2: |
|
292 |
self.add_fitting_data(rowCount, 'Valves', 'Plug Type', '3-way, Flow through run') |
|
293 |
else: |
|
294 |
self.del_fitting_data('Valves', 'Plug Type', '3-way, Flow through run') |
|
295 |
elif self.sender() == self.ui.checkBox_Plug_Valve_3_Way_Elbow: |
|
296 |
if state == 2: |
|
297 |
self.add_fitting_data(rowCount, 'Valves', 'Plug Type', '3-way, Flow through branch') |
|
298 |
else: |
|
299 |
self.del_fitting_data('Valves', 'Plug Type', '3-way, Flow through branch') |
|
300 |
elif self.sender() == self.ui.checkBox_Foot_Valve_Poppet_Disc: |
|
301 |
if state == 2: |
|
302 |
self.add_fitting_data(rowCount, 'Valves', 'Foot Type', 'Foot Valve (Poppet Disc)') |
|
303 |
else: |
|
304 |
self.del_fitting_data('Valves', 'Foot Type', 'Foot Valve (Poppet Disc)') |
|
305 |
elif self.sender() == self.ui.checkBox_Foot_Valve_Hinged_Disc: |
|
306 |
if state == 2: |
|
307 |
self.add_fitting_data(rowCount, 'Valves', 'Foot Type', 'Foot Valve (Hinged Disc)') |
|
308 |
else: |
|
309 |
self.del_fitting_data('Valves', 'Foot Type', 'Foot Valve (Hinged Disc)') |
|
310 |
elif self.sender() == self.ui.checkBox_Gate_Valve: |
|
311 |
if state == 2: |
|
312 |
self.add_fitting_data(rowCount, 'Valves', 'Etc Type', 'Gate Valve') |
|
313 |
else: |
|
314 |
self.del_fitting_data('Valves', 'Etc Type', 'Gate Valve') |
|
315 |
elif self.sender() == self.ui.checkBox_Ball_Valve: |
|
316 |
if state == 2: |
|
317 |
self.add_fitting_data(rowCount, 'Valves', 'Etc Type', 'Ball Valve') |
|
318 |
else: |
내보내기 Unified diff