개정판 0b4e00b7
issue #1047 : 생성한 장치의 데이터 입력 & 불필요한 UI, 이미지 정리
Change-Id: I7060b8ab8018886099f99b63531ba160b6e17b7a
HYTOS/HYTOS/AirFinCooler.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 |
|
|
9 |
from PyQt5 import QtCore, QtGui, QtWidgets |
|
10 |
from PyQt5.QtWidgets import * |
|
11 |
import os |
|
12 |
from Project import Project |
|
13 |
from AppDocData import AppDocData |
|
14 |
import AirFinCooler_UI |
|
15 |
import math |
|
16 |
|
|
17 |
class QAirFinCooler(QDialog): |
|
18 |
def __init__(self): |
|
19 |
QDialog.__init__(self) |
|
20 |
|
|
21 |
self.ui = AirFinCooler_UI.Ui_AirFinCoolerDialog() |
|
22 |
self.ui.setupUi(self) |
|
23 |
self.initialize() |
|
24 |
|
|
25 |
def showDialog(self, item): |
|
26 |
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint) |
|
27 |
|
|
28 |
self.ui.lineEdit_TagNo.setFocus() |
|
29 |
self.set_controls(item) |
|
30 |
self.load_units() |
|
31 |
|
|
32 |
self.exec_() |
|
33 |
|
|
34 |
def initialize(self): |
|
35 |
self.ui.label_Img.setVisible(False) |
|
36 |
|
|
37 |
def set_controls(self, item): |
|
38 |
self.ui.label_Img.setVisible(True) |
|
39 |
|
|
40 |
def load_units(self): |
|
41 |
from Drawing import Drawing |
|
42 |
|
|
43 |
appDocData = AppDocData.instance() |
|
44 |
drawing = appDocData.activeDrawing |
|
45 |
if drawing: |
|
46 |
columnDisplayNameList = appDocData.getColumnDisplayNames(drawing.UID, 'Nozzles') |
|
47 |
if len(columnDisplayNameList) > 0: |
|
48 |
for columnDisplayName in columnDisplayNameList: |
|
49 |
if columnDisplayName[0] == 'Pressure Drop': |
|
50 |
self.ui.label_PressureUnit.setText(columnDisplayName[1]) |
|
51 |
elif columnDisplayName[0] == 'Elevation': |
|
52 |
self.ui.label_ElevationUnit.setText(columnDisplayName[1]) |
|
53 |
|
|
54 |
def accept(self): |
|
55 |
QDialog.accept(self) |
|
56 |
|
|
57 |
def reject(self): |
|
58 |
QDialog.reject(self) |
HYTOS/HYTOS/AirFinCooler_UI.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
|
|
3 |
# Form implementation generated from reading ui file '.\UI\AirFinCooler.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_AirFinCoolerDialog(object): |
|
14 |
def setupUi(self, AirFinCoolerDialog): |
|
15 |
AirFinCoolerDialog.setObjectName("AirFinCoolerDialog") |
|
16 |
AirFinCoolerDialog.resize(468, 177) |
|
17 |
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) |
|
18 |
sizePolicy.setHorizontalStretch(0) |
|
19 |
sizePolicy.setVerticalStretch(0) |
|
20 |
sizePolicy.setHeightForWidth(AirFinCoolerDialog.sizePolicy().hasHeightForWidth()) |
|
21 |
AirFinCoolerDialog.setSizePolicy(sizePolicy) |
|
22 |
AirFinCoolerDialog.setMinimumSize(QtCore.QSize(0, 0)) |
|
23 |
AirFinCoolerDialog.setMaximumSize(QtCore.QSize(503, 177)) |
|
24 |
font = QtGui.QFont() |
|
25 |
font.setFamily("맑은 고딕") |
|
26 |
AirFinCoolerDialog.setFont(font) |
|
27 |
icon = QtGui.QIcon() |
|
28 |
icon.addPixmap(QtGui.QPixmap(":/newPrefix/HYTOS.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
|
29 |
AirFinCoolerDialog.setWindowIcon(icon) |
|
30 |
self.groupBox = QtWidgets.QGroupBox(AirFinCoolerDialog) |
|
31 |
self.groupBox.setGeometry(QtCore.QRect(8, 8, 453, 125)) |
|
32 |
font = QtGui.QFont() |
|
33 |
font.setFamily("맑은 고딕") |
|
34 |
font.setBold(True) |
|
35 |
font.setWeight(75) |
|
36 |
self.groupBox.setFont(font) |
|
37 |
self.groupBox.setObjectName("groupBox") |
|
38 |
self.label_Img = QtWidgets.QLabel(self.groupBox) |
|
39 |
self.label_Img.setGeometry(QtCore.QRect(4, 24, 209, 89)) |
|
40 |
font = QtGui.QFont() |
|
41 |
font.setBold(False) |
|
42 |
font.setWeight(50) |
|
43 |
self.label_Img.setFont(font) |
|
44 |
self.label_Img.setObjectName("label_Img") |
|
45 |
self.label = QtWidgets.QLabel(self.groupBox) |
|
46 |
self.label.setGeometry(QtCore.QRect(196, 30, 80, 16)) |
|
47 |
self.label.setMinimumSize(QtCore.QSize(80, 0)) |
|
48 |
font = QtGui.QFont() |
|
49 |
font.setBold(False) |
|
50 |
font.setWeight(50) |
|
51 |
self.label.setFont(font) |
|
52 |
self.label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) |
|
53 |
self.label.setObjectName("label") |
|
54 |
self.lineEdit_TagNo = QtWidgets.QLineEdit(self.groupBox) |
|
55 |
self.lineEdit_TagNo.setGeometry(QtCore.QRect(282, 30, 100, 21)) |
|
56 |
self.lineEdit_TagNo.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
57 |
font = QtGui.QFont() |
|
58 |
font.setBold(False) |
|
59 |
font.setWeight(50) |
|
60 |
self.lineEdit_TagNo.setFont(font) |
|
61 |
self.lineEdit_TagNo.setAlignment(QtCore.Qt.AlignCenter) |
|
62 |
self.lineEdit_TagNo.setObjectName("lineEdit_TagNo") |
|
63 |
self.lineEdit_Pressure = QtWidgets.QLineEdit(self.groupBox) |
|
64 |
self.lineEdit_Pressure.setGeometry(QtCore.QRect(282, 59, 100, 21)) |
|
65 |
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) |
|
66 |
sizePolicy.setHorizontalStretch(0) |
|
67 |
sizePolicy.setVerticalStretch(0) |
|
68 |
sizePolicy.setHeightForWidth(self.lineEdit_Pressure.sizePolicy().hasHeightForWidth()) |
|
69 |
self.lineEdit_Pressure.setSizePolicy(sizePolicy) |
|
70 |
self.lineEdit_Pressure.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
71 |
font = QtGui.QFont() |
|
72 |
font.setBold(False) |
|
73 |
font.setWeight(50) |
|
74 |
self.lineEdit_Pressure.setFont(font) |
|
75 |
self.lineEdit_Pressure.setAlignment(QtCore.Qt.AlignCenter) |
|
76 |
self.lineEdit_Pressure.setObjectName("lineEdit_Pressure") |
|
77 |
self.label_3 = QtWidgets.QLabel(self.groupBox) |
|
78 |
self.label_3.setGeometry(QtCore.QRect(196, 59, 80, 16)) |
|
79 |
self.label_3.setMinimumSize(QtCore.QSize(80, 0)) |
|
80 |
font = QtGui.QFont() |
|
81 |
font.setBold(False) |
|
82 |
font.setWeight(50) |
|
83 |
self.label_3.setFont(font) |
|
84 |
self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) |
|
85 |
self.label_3.setObjectName("label_3") |
|
86 |
self.label_PressureUnit = QtWidgets.QLabel(self.groupBox) |
|
87 |
self.label_PressureUnit.setGeometry(QtCore.QRect(388, 59, 49, 16)) |
|
88 |
font = QtGui.QFont() |
|
89 |
font.setBold(False) |
|
90 |
font.setWeight(50) |
|
91 |
self.label_PressureUnit.setFont(font) |
|
92 |
self.label_PressureUnit.setObjectName("label_PressureUnit") |
|
93 |
self.label_5 = QtWidgets.QLabel(self.groupBox) |
|
94 |
self.label_5.setGeometry(QtCore.QRect(196, 88, 80, 16)) |
|
95 |
self.label_5.setMinimumSize(QtCore.QSize(80, 0)) |
|
96 |
font = QtGui.QFont() |
|
97 |
font.setBold(False) |
|
98 |
font.setWeight(50) |
|
99 |
self.label_5.setFont(font) |
|
100 |
self.label_5.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) |
|
101 |
self.label_5.setObjectName("label_5") |
|
102 |
self.lineEdit_Elevation = QtWidgets.QLineEdit(self.groupBox) |
|
103 |
self.lineEdit_Elevation.setGeometry(QtCore.QRect(282, 88, 100, 21)) |
|
104 |
self.lineEdit_Elevation.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
105 |
font = QtGui.QFont() |
|
106 |
font.setBold(False) |
|
107 |
font.setWeight(50) |
|
108 |
self.lineEdit_Elevation.setFont(font) |
|
109 |
self.lineEdit_Elevation.setAlignment(QtCore.Qt.AlignCenter) |
|
110 |
self.lineEdit_Elevation.setObjectName("lineEdit_Elevation") |
|
111 |
self.label_ElevationUnit = QtWidgets.QLabel(self.groupBox) |
|
112 |
self.label_ElevationUnit.setGeometry(QtCore.QRect(388, 88, 16, 16)) |
|
113 |
font = QtGui.QFont() |
|
114 |
font.setBold(False) |
|
115 |
font.setWeight(50) |
|
116 |
self.label_ElevationUnit.setFont(font) |
|
117 |
self.label_ElevationUnit.setObjectName("label_ElevationUnit") |
|
118 |
self.buttonBox = QtWidgets.QDialogButtonBox(AirFinCoolerDialog) |
|
119 |
self.buttonBox.setGeometry(QtCore.QRect(304, 144, 156, 23)) |
|
120 |
self.buttonBox.setOrientation(QtCore.Qt.Horizontal) |
|
121 |
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) |
|
122 |
self.buttonBox.setObjectName("buttonBox") |
|
123 |
|
|
124 |
self.retranslateUi(AirFinCoolerDialog) |
|
125 |
self.buttonBox.accepted.connect(AirFinCoolerDialog.accept) |
|
126 |
self.buttonBox.rejected.connect(AirFinCoolerDialog.reject) |
|
127 |
QtCore.QMetaObject.connectSlotsByName(AirFinCoolerDialog) |
|
128 |
AirFinCoolerDialog.setTabOrder(self.lineEdit_TagNo, self.lineEdit_Pressure) |
|
129 |
AirFinCoolerDialog.setTabOrder(self.lineEdit_Pressure, self.lineEdit_Elevation) |
|
130 |
|
|
131 |
def retranslateUi(self, AirFinCoolerDialog): |
|
132 |
_translate = QtCore.QCoreApplication.translate |
|
133 |
AirFinCoolerDialog.setWindowTitle(_translate("AirFinCoolerDialog", "HYTOS Equipment Data - Air Fin Cooler")) |
|
134 |
self.groupBox.setTitle(_translate("AirFinCoolerDialog", "Equipment Figure")) |
|
135 |
self.label_Img.setText(_translate("AirFinCoolerDialog", "<html><head/><body><p><img src=\":/newPrefix/AirFinCooler.png\"/></p></body></html>")) |
|
136 |
self.label.setText(_translate("AirFinCoolerDialog", "Tag No.")) |
|
137 |
self.label_3.setText(_translate("AirFinCoolerDialog", "P. Drop")) |
|
138 |
self.label_PressureUnit.setText(_translate("AirFinCoolerDialog", "kg/cm2")) |
|
139 |
self.label_5.setText(_translate("AirFinCoolerDialog", "Elevation")) |
|
140 |
self.label_ElevationUnit.setText(_translate("AirFinCoolerDialog", "m")) |
|
141 |
import Resource_rc |
HYTOS/HYTOS/AppDocData.py | ||
---|---|---|
1306 | 1306 |
kyouho 2018.07.09 change query method |
1307 | 1307 |
''' |
1308 | 1308 |
def saveConfigs(self, configs): |
1309 |
import uuid |
|
1310 |
|
|
1309 | 1311 |
try: |
1310 | 1312 |
# Creates or opens a file called mydb with a SQLite3 DB |
1311 | 1313 |
dbPath = os.path.join(self.getCurrentProject().getDbFilePath(), AppDocData.DATABASE) |
... | ... | |
1319 | 1321 |
if type(value) is str and "'" in value: |
1320 | 1322 |
value = value.replace("'", "''") |
1321 | 1323 |
|
1322 |
sql = "insert or replace into configuration values(?,?,?)" |
|
1323 |
param = (config.section, config.key, value)
|
|
1324 |
sql = "insert or replace into configuration values(?,?,?,?)"
|
|
1325 |
param = (str(uuid.uuid4()), config.section, config.key, value)
|
|
1324 | 1326 |
|
1325 | 1327 |
cursor.execute(sql, param) |
1326 | 1328 |
elif hasattr(config, 'toSql'): |
HYTOS/HYTOS/Ball.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 |
|
|
9 |
from PyQt5 import QtCore, QtGui, QtWidgets |
|
10 |
from PyQt5.QtWidgets import * |
|
11 |
import os |
|
12 |
from Project import Project |
|
13 |
from AppDocData import AppDocData |
|
14 |
import Ball_UI |
|
15 |
import math |
|
16 |
|
|
17 |
class QBall(QDialog): |
|
18 |
def __init__(self): |
|
19 |
QDialog.__init__(self) |
|
20 |
|
|
21 |
self.ui = Ball_UI.Ui_BallDialog() |
|
22 |
self.ui.setupUi(self) |
|
23 |
self.initialize() |
|
24 |
|
|
25 |
def showDialog(self, item): |
|
26 |
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint) |
|
27 |
|
|
28 |
self.ui.lineEdit_TagNo.setFocus() |
|
29 |
self.set_controls(item) |
|
30 |
self.load_units() |
|
31 |
|
|
32 |
self.exec_() |
|
33 |
|
|
34 |
def initialize(self): |
|
35 |
# To do : 이름으로 Control 찾아오기 |
|
36 |
self.ui.label_Img_N1.setVisible(False) |
|
37 |
self.ui.label_Img_N2.setVisible(False) |
|
38 |
self.ui.label_Img_N3.setVisible(False) |
|
39 |
self.ui.label_Img_N4.setVisible(False) |
|
40 |
self.ui.label_Img_N5.setVisible(False) |
|
41 |
self.ui.label_Img_N6.setVisible(False) |
|
42 |
self.ui.label_Img_N7.setVisible(False) |
|
43 |
self.ui.label_Img_N8.setVisible(False) |
|
44 |
|
|
45 |
self.ui.label_N1.setVisible(False) |
|
46 |
self.ui.lineEdit_N1_Pressure.setEnabled(False) |
|
47 |
self.ui.lineEdit_N1_Elevation.setEnabled(False) |
|
48 |
|
|
49 |
self.ui.label_N2.setVisible(False) |
|
50 |
self.ui.lineEdit_N2_Pressure.setEnabled(False) |
|
51 |
self.ui.lineEdit_N2_Elevation.setEnabled(False) |
|
52 |
|
|
53 |
self.ui.label_N3.setVisible(False) |
|
54 |
self.ui.lineEdit_N3_Pressure.setEnabled(False) |
|
55 |
self.ui.lineEdit_N3_Elevation.setEnabled(False) |
|
56 |
|
|
57 |
self.ui.label_N4.setVisible(False) |
|
58 |
self.ui.lineEdit_N4_Pressure.setEnabled(False) |
|
59 |
self.ui.lineEdit_N4_Elevation.setEnabled(False) |
|
60 |
|
|
61 |
self.ui.label_N5.setVisible(False) |
|
62 |
self.ui.lineEdit_N5_Pressure.setEnabled(False) |
|
63 |
self.ui.lineEdit_N5_Elevation.setEnabled(False) |
|
64 |
|
|
65 |
self.ui.label_N6.setVisible(False) |
|
66 |
self.ui.lineEdit_N6_Pressure.setEnabled(False) |
|
67 |
self.ui.lineEdit_N6_Elevation.setEnabled(False) |
|
68 |
|
|
69 |
self.ui.label_N7.setVisible(False) |
|
70 |
self.ui.lineEdit_N7_Pressure.setEnabled(False) |
|
71 |
self.ui.lineEdit_N7_Elevation.setEnabled(False) |
|
72 |
|
|
73 |
self.ui.label_N8.setVisible(False) |
|
74 |
self.ui.lineEdit_N8_Pressure.setEnabled(False) |
|
75 |
self.ui.lineEdit_N8_Elevation.setEnabled(False) |
|
76 |
|
|
77 |
def set_controls(self, item): |
|
78 |
# To do : 이름으로 Control 찾아오기 |
|
79 |
for connector in item.connectors: |
|
80 |
index = connector._conn_index |
|
81 |
if connector.connectedItem: |
|
82 |
if index == 1: |
|
83 |
self.ui.label_Img_N1.setVisible(True) |
|
84 |
self.ui.label_N1.setVisible(True) |
|
85 |
self.ui.lineEdit_N1_Pressure.setEnabled(True) |
|
86 |
self.ui.lineEdit_N1_Elevation.setEnabled(True) |
|
87 |
elif index == 2: |
|
88 |
self.ui.label_Img_N2.setVisible(True) |
|
89 |
self.ui.label_N2.setVisible(True) |
|
90 |
self.ui.lineEdit_N2_Pressure.setEnabled(True) |
|
91 |
self.ui.lineEdit_N2_Elevation.setEnabled(True) |
|
92 |
elif index == 3: |
|
93 |
self.ui.label_Img_N3.setVisible(True) |
|
94 |
self.ui.label_N3.setVisible(True) |
|
95 |
self.ui.lineEdit_N3_Pressure.setEnabled(True) |
|
96 |
self.ui.lineEdit_N3_Elevation.setEnabled(True) |
|
97 |
elif index == 4: |
|
98 |
self.ui.label_Img_N4.setVisible(True) |
|
99 |
self.ui.label_N4.setVisible(True) |
|
100 |
self.ui.lineEdit_N4_Pressure.setEnabled(True) |
|
101 |
self.ui.lineEdit_N4_Elevation.setEnabled(True) |
|
102 |
elif index == 5: |
|
103 |
self.ui.label_Img_N5.setVisible(True) |
|
104 |
self.ui.label_N5.setVisible(True) |
|
105 |
self.ui.lineEdit_N5_Pressure.setEnabled(True) |
|
106 |
self.ui.lineEdit_N5_Elevation.setEnabled(True) |
|
107 |
elif index == 6: |
|
108 |
self.ui.label_Img_N6.setVisible(True) |
|
109 |
self.ui.label_N6.setVisible(True) |
|
110 |
self.ui.lineEdit_N6_Pressure.setEnabled(True) |
|
111 |
self.ui.lineEdit_N6_Elevation.setEnabled(True) |
|
112 |
elif index == 7: |
|
113 |
self.ui.label_Img_N7.setVisible(True) |
|
114 |
self.ui.label_N7.setVisible(True) |
|
115 |
self.ui.lineEdit_N7_Pressure.setEnabled(True) |
|
116 |
self.ui.lineEdit_N7_Elevation.setEnabled(True) |
|
117 |
elif index == 8: |
|
118 |
self.ui.label_Img_N8.setVisible(True) |
|
119 |
self.ui.label_N8.setVisible(True) |
|
120 |
self.ui.lineEdit_N8_Pressure.setEnabled(True) |
|
121 |
self.ui.lineEdit_N8_Elevation.setEnabled(True) |
|
122 |
|
|
123 |
def load_units(self): |
|
124 |
from Drawing import Drawing |
|
125 |
|
|
126 |
appDocData = AppDocData.instance() |
|
127 |
drawing = appDocData.activeDrawing |
|
128 |
if drawing: |
|
129 |
columnDisplayNameList = appDocData.getColumnDisplayNames(drawing.UID, 'Nozzles') |
|
130 |
if len(columnDisplayNameList) > 0: |
|
131 |
for columnDisplayName in columnDisplayNameList: |
|
132 |
if columnDisplayName[0] == 'Pressure': |
|
133 |
self.ui.label_PressureUnit.setText(columnDisplayName[1]) |
|
134 |
elif columnDisplayName[0] == 'Elevation': |
|
135 |
self.ui.label_ElevationUnit.setText(columnDisplayName[1]) |
|
136 |
|
|
137 |
def accept(self): |
|
138 |
|
|
139 |
QDialog.accept(self) |
|
140 |
|
|
141 |
def reject(self): |
|
142 |
QDialog.reject(self) |
HYTOS/HYTOS/Ball_UI.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
|
|
3 |
# Form implementation generated from reading ui file '.\UI\Ball.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_BallDialog(object): |
|
14 |
def setupUi(self, BallDialog): |
|
15 |
BallDialog.setObjectName("BallDialog") |
|
16 |
BallDialog.resize(487, 328) |
|
17 |
font = QtGui.QFont() |
|
18 |
font.setFamily("맑은 고딕") |
|
19 |
BallDialog.setFont(font) |
|
20 |
icon = QtGui.QIcon() |
|
21 |
icon.addPixmap(QtGui.QPixmap(":/newPrefix/HYTOS.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
|
22 |
BallDialog.setWindowIcon(icon) |
|
23 |
self.buttonBox = QtWidgets.QDialogButtonBox(BallDialog) |
|
24 |
self.buttonBox.setGeometry(QtCore.QRect(317, 296, 161, 23)) |
|
25 |
self.buttonBox.setOrientation(QtCore.Qt.Horizontal) |
|
26 |
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) |
|
27 |
self.buttonBox.setObjectName("buttonBox") |
|
28 |
self.groupBox_2 = QtWidgets.QGroupBox(BallDialog) |
|
29 |
self.groupBox_2.setGeometry(QtCore.QRect(8, 8, 204, 281)) |
|
30 |
font = QtGui.QFont() |
|
31 |
font.setBold(True) |
|
32 |
font.setWeight(75) |
|
33 |
self.groupBox_2.setFont(font) |
|
34 |
self.groupBox_2.setObjectName("groupBox_2") |
|
35 |
self.label_2 = QtWidgets.QLabel(self.groupBox_2) |
|
36 |
self.label_2.setGeometry(QtCore.QRect(44, 108, 121, 125)) |
|
37 |
self.label_2.setObjectName("label_2") |
|
38 |
self.label = QtWidgets.QLabel(self.groupBox_2) |
|
39 |
self.label.setGeometry(QtCore.QRect(12, 30, 49, 21)) |
|
40 |
font = QtGui.QFont() |
|
41 |
font.setBold(False) |
|
42 |
font.setWeight(50) |
|
43 |
self.label.setFont(font) |
|
44 |
self.label.setObjectName("label") |
|
45 |
self.lineEdit_TagNo = QtWidgets.QLineEdit(self.groupBox_2) |
|
46 |
self.lineEdit_TagNo.setGeometry(QtCore.QRect(68, 32, 125, 21)) |
|
47 |
font = QtGui.QFont() |
|
48 |
font.setBold(False) |
|
49 |
font.setWeight(50) |
|
50 |
self.lineEdit_TagNo.setFont(font) |
|
51 |
self.lineEdit_TagNo.setObjectName("lineEdit_TagNo") |
|
52 |
self.label_Img_N1 = QtWidgets.QLabel(self.groupBox_2) |
|
53 |
self.label_Img_N1.setGeometry(QtCore.QRect(92, 88, 25, 21)) |
|
54 |
self.label_Img_N1.setObjectName("label_Img_N1") |
|
55 |
self.label_Img_N2 = QtWidgets.QLabel(self.groupBox_2) |
|
56 |
self.label_Img_N2.setGeometry(QtCore.QRect(48, 104, 25, 21)) |
|
57 |
self.label_Img_N2.setObjectName("label_Img_N2") |
|
58 |
self.label_Img_N6 = QtWidgets.QLabel(self.groupBox_2) |
|
59 |
self.label_Img_N6.setGeometry(QtCore.QRect(136, 216, 25, 21)) |
|
60 |
self.label_Img_N6.setObjectName("label_Img_N6") |
|
61 |
self.label_Img_N7 = QtWidgets.QLabel(self.groupBox_2) |
|
62 |
self.label_Img_N7.setGeometry(QtCore.QRect(168, 160, 25, 21)) |
|
63 |
self.label_Img_N7.setObjectName("label_Img_N7") |
|
64 |
self.label_Img_N5 = QtWidgets.QLabel(self.groupBox_2) |
|
65 |
self.label_Img_N5.setGeometry(QtCore.QRect(92, 232, 25, 21)) |
|
66 |
self.label_Img_N5.setObjectName("label_Img_N5") |
|
67 |
self.label_Img_N4 = QtWidgets.QLabel(self.groupBox_2) |
|
68 |
self.label_Img_N4.setGeometry(QtCore.QRect(48, 216, 25, 21)) |
|
69 |
self.label_Img_N4.setObjectName("label_Img_N4") |
|
70 |
self.label_Img_N3 = QtWidgets.QLabel(self.groupBox_2) |
|
71 |
self.label_Img_N3.setGeometry(QtCore.QRect(16, 160, 25, 21)) |
|
72 |
self.label_Img_N3.setObjectName("label_Img_N3") |
|
73 |
self.label_Img_N8 = QtWidgets.QLabel(self.groupBox_2) |
|
74 |
self.label_Img_N8.setGeometry(QtCore.QRect(136, 104, 25, 21)) |
|
75 |
self.label_Img_N8.setObjectName("label_Img_N8") |
|
76 |
self.groupBox_3 = QtWidgets.QGroupBox(BallDialog) |
|
77 |
self.groupBox_3.setGeometry(QtCore.QRect(216, 8, 261, 281)) |
|
78 |
font = QtGui.QFont() |
|
79 |
font.setBold(True) |
|
80 |
font.setWeight(75) |
|
81 |
self.groupBox_3.setFont(font) |
|
82 |
self.groupBox_3.setObjectName("groupBox_3") |
|
83 |
self.label_3 = QtWidgets.QLabel(self.groupBox_3) |
|
84 |
self.label_3.setGeometry(QtCore.QRect(64, 24, 60, 16)) |
|
85 |
font = QtGui.QFont() |
|
86 |
font.setBold(False) |
|
87 |
font.setWeight(50) |
|
88 |
self.label_3.setFont(font) |
|
89 |
self.label_3.setAlignment(QtCore.Qt.AlignCenter) |
|
90 |
self.label_3.setObjectName("label_3") |
|
91 |
self.label_4 = QtWidgets.QLabel(self.groupBox_3) |
|
92 |
self.label_4.setGeometry(QtCore.QRect(168, 24, 60, 16)) |
|
93 |
font = QtGui.QFont() |
|
94 |
font.setBold(False) |
|
95 |
font.setWeight(50) |
|
96 |
self.label_4.setFont(font) |
|
97 |
self.label_4.setAlignment(QtCore.Qt.AlignCenter) |
|
98 |
self.label_4.setObjectName("label_4") |
|
99 |
self.label_PressureUnit = QtWidgets.QLabel(self.groupBox_3) |
|
100 |
self.label_PressureUnit.setGeometry(QtCore.QRect(64, 40, 60, 16)) |
|
101 |
font = QtGui.QFont() |
|
102 |
font.setBold(False) |
|
103 |
font.setWeight(50) |
|
104 |
self.label_PressureUnit.setFont(font) |
|
105 |
self.label_PressureUnit.setAlignment(QtCore.Qt.AlignCenter) |
|
106 |
self.label_PressureUnit.setObjectName("label_PressureUnit") |
|
107 |
self.label_ElevationUnit = QtWidgets.QLabel(self.groupBox_3) |
|
108 |
self.label_ElevationUnit.setGeometry(QtCore.QRect(168, 40, 60, 16)) |
|
109 |
font = QtGui.QFont() |
|
110 |
font.setBold(False) |
|
111 |
font.setWeight(50) |
|
112 |
self.label_ElevationUnit.setFont(font) |
|
113 |
self.label_ElevationUnit.setAlignment(QtCore.Qt.AlignCenter) |
|
114 |
self.label_ElevationUnit.setObjectName("label_ElevationUnit") |
|
115 |
self.label_N1 = QtWidgets.QLabel(self.groupBox_3) |
|
116 |
self.label_N1.setGeometry(QtCore.QRect(11, 68, 25, 17)) |
|
117 |
self.label_N1.setObjectName("label_N1") |
|
118 |
self.lineEdit_N1_Elevation = QtWidgets.QLineEdit(self.groupBox_3) |
|
119 |
self.lineEdit_N1_Elevation.setGeometry(QtCore.QRect(146, 66, 100, 20)) |
|
120 |
self.lineEdit_N1_Elevation.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
121 |
self.lineEdit_N1_Elevation.setObjectName("lineEdit_N1_Elevation") |
|
122 |
self.lineEdit_N1_Pressure = QtWidgets.QLineEdit(self.groupBox_3) |
|
123 |
self.lineEdit_N1_Pressure.setGeometry(QtCore.QRect(44, 66, 100, 20)) |
|
124 |
self.lineEdit_N1_Pressure.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
125 |
self.lineEdit_N1_Pressure.setObjectName("lineEdit_N1_Pressure") |
|
126 |
self.label_N2 = QtWidgets.QLabel(self.groupBox_3) |
|
127 |
self.label_N2.setGeometry(QtCore.QRect(11, 94, 25, 17)) |
|
128 |
self.label_N2.setObjectName("label_N2") |
|
129 |
self.lineEdit_N2_Elevation = QtWidgets.QLineEdit(self.groupBox_3) |
|
130 |
self.lineEdit_N2_Elevation.setGeometry(QtCore.QRect(146, 92, 100, 21)) |
|
131 |
self.lineEdit_N2_Elevation.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
132 |
self.lineEdit_N2_Elevation.setObjectName("lineEdit_N2_Elevation") |
|
133 |
self.lineEdit_N2_Pressure = QtWidgets.QLineEdit(self.groupBox_3) |
|
134 |
self.lineEdit_N2_Pressure.setGeometry(QtCore.QRect(44, 92, 100, 21)) |
|
135 |
self.lineEdit_N2_Pressure.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
136 |
self.lineEdit_N2_Pressure.setObjectName("lineEdit_N2_Pressure") |
|
137 |
self.label_N3 = QtWidgets.QLabel(self.groupBox_3) |
|
138 |
self.label_N3.setGeometry(QtCore.QRect(11, 120, 25, 17)) |
|
139 |
self.label_N3.setObjectName("label_N3") |
|
140 |
self.lineEdit_N3_Pressure = QtWidgets.QLineEdit(self.groupBox_3) |
|
141 |
self.lineEdit_N3_Pressure.setGeometry(QtCore.QRect(44, 118, 100, 20)) |
|
142 |
self.lineEdit_N3_Pressure.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
143 |
self.lineEdit_N3_Pressure.setObjectName("lineEdit_N3_Pressure") |
|
144 |
self.lineEdit_N3_Elevation = QtWidgets.QLineEdit(self.groupBox_3) |
|
145 |
self.lineEdit_N3_Elevation.setGeometry(QtCore.QRect(146, 118, 100, 20)) |
|
146 |
self.lineEdit_N3_Elevation.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
147 |
self.lineEdit_N3_Elevation.setObjectName("lineEdit_N3_Elevation") |
|
148 |
self.lineEdit_N4_Pressure = QtWidgets.QLineEdit(self.groupBox_3) |
|
149 |
self.lineEdit_N4_Pressure.setGeometry(QtCore.QRect(44, 144, 100, 20)) |
|
150 |
self.lineEdit_N4_Pressure.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
151 |
self.lineEdit_N4_Pressure.setObjectName("lineEdit_N4_Pressure") |
|
152 |
self.lineEdit_N4_Elevation = QtWidgets.QLineEdit(self.groupBox_3) |
|
153 |
self.lineEdit_N4_Elevation.setGeometry(QtCore.QRect(146, 144, 100, 20)) |
|
154 |
self.lineEdit_N4_Elevation.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
155 |
self.lineEdit_N4_Elevation.setObjectName("lineEdit_N4_Elevation") |
|
156 |
self.label_N4 = QtWidgets.QLabel(self.groupBox_3) |
|
157 |
self.label_N4.setGeometry(QtCore.QRect(11, 146, 25, 17)) |
|
158 |
self.label_N4.setObjectName("label_N4") |
|
159 |
self.label_N5 = QtWidgets.QLabel(self.groupBox_3) |
|
160 |
self.label_N5.setGeometry(QtCore.QRect(11, 172, 25, 17)) |
|
161 |
self.label_N5.setObjectName("label_N5") |
|
162 |
self.lineEdit_N5_Elevation = QtWidgets.QLineEdit(self.groupBox_3) |
|
163 |
self.lineEdit_N5_Elevation.setGeometry(QtCore.QRect(146, 170, 100, 21)) |
|
164 |
self.lineEdit_N5_Elevation.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
165 |
self.lineEdit_N5_Elevation.setObjectName("lineEdit_N5_Elevation") |
|
166 |
self.lineEdit_N5_Pressure = QtWidgets.QLineEdit(self.groupBox_3) |
|
167 |
self.lineEdit_N5_Pressure.setGeometry(QtCore.QRect(44, 170, 100, 21)) |
|
168 |
self.lineEdit_N5_Pressure.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
169 |
self.lineEdit_N5_Pressure.setObjectName("lineEdit_N5_Pressure") |
|
170 |
self.label_N6 = QtWidgets.QLabel(self.groupBox_3) |
|
171 |
self.label_N6.setGeometry(QtCore.QRect(11, 198, 25, 17)) |
|
172 |
self.label_N6.setObjectName("label_N6") |
|
173 |
self.lineEdit_N6_Elevation = QtWidgets.QLineEdit(self.groupBox_3) |
|
174 |
self.lineEdit_N6_Elevation.setGeometry(QtCore.QRect(146, 196, 100, 20)) |
|
175 |
self.lineEdit_N6_Elevation.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
176 |
self.lineEdit_N6_Elevation.setObjectName("lineEdit_N6_Elevation") |
|
177 |
self.lineEdit_N6_Pressure = QtWidgets.QLineEdit(self.groupBox_3) |
|
178 |
self.lineEdit_N6_Pressure.setGeometry(QtCore.QRect(44, 196, 100, 20)) |
|
179 |
self.lineEdit_N6_Pressure.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
180 |
self.lineEdit_N6_Pressure.setObjectName("lineEdit_N6_Pressure") |
|
181 |
self.label_N7 = QtWidgets.QLabel(self.groupBox_3) |
|
182 |
self.label_N7.setGeometry(QtCore.QRect(11, 224, 25, 17)) |
|
183 |
self.label_N7.setObjectName("label_N7") |
|
184 |
self.lineEdit_N7_Pressure = QtWidgets.QLineEdit(self.groupBox_3) |
|
185 |
self.lineEdit_N7_Pressure.setGeometry(QtCore.QRect(44, 222, 100, 20)) |
|
186 |
self.lineEdit_N7_Pressure.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
187 |
self.lineEdit_N7_Pressure.setObjectName("lineEdit_N7_Pressure") |
|
188 |
self.lineEdit_N7_Elevation = QtWidgets.QLineEdit(self.groupBox_3) |
|
189 |
self.lineEdit_N7_Elevation.setGeometry(QtCore.QRect(146, 222, 100, 20)) |
|
190 |
self.lineEdit_N7_Elevation.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
191 |
self.lineEdit_N7_Elevation.setObjectName("lineEdit_N7_Elevation") |
|
192 |
self.lineEdit_N8_Pressure = QtWidgets.QLineEdit(self.groupBox_3) |
|
193 |
self.lineEdit_N8_Pressure.setGeometry(QtCore.QRect(44, 248, 100, 21)) |
|
194 |
self.lineEdit_N8_Pressure.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
195 |
self.lineEdit_N8_Pressure.setObjectName("lineEdit_N8_Pressure") |
|
196 |
self.label_N8 = QtWidgets.QLabel(self.groupBox_3) |
|
197 |
self.label_N8.setGeometry(QtCore.QRect(11, 250, 25, 17)) |
|
198 |
self.label_N8.setObjectName("label_N8") |
|
199 |
self.lineEdit_N8_Elevation = QtWidgets.QLineEdit(self.groupBox_3) |
|
200 |
self.lineEdit_N8_Elevation.setGeometry(QtCore.QRect(146, 248, 100, 21)) |
|
201 |
self.lineEdit_N8_Elevation.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
202 |
self.lineEdit_N8_Elevation.setObjectName("lineEdit_N8_Elevation") |
|
203 |
|
|
204 |
self.retranslateUi(BallDialog) |
|
205 |
self.buttonBox.accepted.connect(BallDialog.accept) |
|
206 |
self.buttonBox.rejected.connect(BallDialog.reject) |
|
207 |
QtCore.QMetaObject.connectSlotsByName(BallDialog) |
|
208 |
BallDialog.setTabOrder(self.lineEdit_TagNo, self.lineEdit_N1_Pressure) |
|
209 |
BallDialog.setTabOrder(self.lineEdit_N1_Pressure, self.lineEdit_N1_Elevation) |
|
210 |
BallDialog.setTabOrder(self.lineEdit_N1_Elevation, self.lineEdit_N2_Pressure) |
|
211 |
BallDialog.setTabOrder(self.lineEdit_N2_Pressure, self.lineEdit_N2_Elevation) |
|
212 |
BallDialog.setTabOrder(self.lineEdit_N2_Elevation, self.lineEdit_N3_Pressure) |
|
213 |
BallDialog.setTabOrder(self.lineEdit_N3_Pressure, self.lineEdit_N3_Elevation) |
|
214 |
BallDialog.setTabOrder(self.lineEdit_N3_Elevation, self.lineEdit_N4_Pressure) |
|
215 |
BallDialog.setTabOrder(self.lineEdit_N4_Pressure, self.lineEdit_N4_Elevation) |
|
216 |
BallDialog.setTabOrder(self.lineEdit_N4_Elevation, self.lineEdit_N5_Pressure) |
|
217 |
BallDialog.setTabOrder(self.lineEdit_N5_Pressure, self.lineEdit_N5_Elevation) |
|
218 |
BallDialog.setTabOrder(self.lineEdit_N5_Elevation, self.lineEdit_N6_Pressure) |
|
219 |
BallDialog.setTabOrder(self.lineEdit_N6_Pressure, self.lineEdit_N6_Elevation) |
|
220 |
BallDialog.setTabOrder(self.lineEdit_N6_Elevation, self.lineEdit_N7_Pressure) |
|
221 |
BallDialog.setTabOrder(self.lineEdit_N7_Pressure, self.lineEdit_N7_Elevation) |
|
222 |
BallDialog.setTabOrder(self.lineEdit_N7_Elevation, self.lineEdit_N8_Pressure) |
|
223 |
BallDialog.setTabOrder(self.lineEdit_N8_Pressure, self.lineEdit_N8_Elevation) |
|
224 |
|
|
225 |
def retranslateUi(self, BallDialog): |
|
226 |
_translate = QtCore.QCoreApplication.translate |
|
227 |
BallDialog.setWindowTitle(_translate("BallDialog", "HYTOS Equipment Data - Ball Tank")) |
|
228 |
self.groupBox_2.setTitle(_translate("BallDialog", "Equipment Figure")) |
|
229 |
self.label_2.setText(_translate("BallDialog", "<html><head/><body><p><img src=\":/newPrefix/Ball.png\"/></p></body></html>")) |
|
230 |
self.label.setText(_translate("BallDialog", "Tag No.")) |
|
231 |
self.label_Img_N1.setText(_translate("BallDialog", "<html><head/><body><p><img src=\":/newPrefix/N1.png\"/></p></body></html>")) |
|
232 |
self.label_Img_N2.setText(_translate("BallDialog", "<html><head/><body><p><img src=\":/newPrefix/N2.png\"/></p></body></html>")) |
|
233 |
self.label_Img_N6.setText(_translate("BallDialog", "<html><head/><body><p><img src=\":/newPrefix/N6.png\"/></p></body></html>")) |
|
234 |
self.label_Img_N7.setText(_translate("BallDialog", "<html><head/><body><p><img src=\":/newPrefix/N7.png\"/></p></body></html>")) |
|
235 |
self.label_Img_N5.setText(_translate("BallDialog", "<html><head/><body><p><img src=\":/newPrefix/N5.png\"/></p></body></html>")) |
|
236 |
self.label_Img_N4.setText(_translate("BallDialog", "<html><head/><body><p><img src=\":/newPrefix/N4.png\"/></p></body></html>")) |
|
237 |
self.label_Img_N3.setText(_translate("BallDialog", "<html><head/><body><p><img src=\":/newPrefix/N3.png\"/></p></body></html>")) |
|
238 |
self.label_Img_N8.setText(_translate("BallDialog", "<html><head/><body><p><img src=\":/newPrefix/N8.png\"/></p></body></html>")) |
|
239 |
self.groupBox_3.setTitle(_translate("BallDialog", "Equipment Data")) |
|
240 |
self.label_3.setText(_translate("BallDialog", "Pressure")) |
|
241 |
self.label_4.setText(_translate("BallDialog", "Elevation")) |
|
242 |
self.label_PressureUnit.setText(_translate("BallDialog", "kg/cm2(g)")) |
|
243 |
self.label_ElevationUnit.setText(_translate("BallDialog", "m")) |
|
244 |
self.label_N1.setText(_translate("BallDialog", "<html><head/><body><p><img src=\":/newPrefix/N1.png\"/></p></body></html>")) |
|
245 |
self.label_N2.setText(_translate("BallDialog", "<html><head/><body><p><img src=\":/newPrefix/N2.png\"/></p></body></html>")) |
|
246 |
self.label_N3.setText(_translate("BallDialog", "<html><head/><body><p><img src=\":/newPrefix/N3.png\"/></p></body></html>")) |
|
247 |
self.label_N4.setText(_translate("BallDialog", "<html><head/><body><p><img src=\":/newPrefix/N4.png\"/></p></body></html>")) |
|
248 |
self.label_N5.setText(_translate("BallDialog", "<html><head/><body><p><img src=\":/newPrefix/N5.png\"/></p></body></html>")) |
|
249 |
self.label_N6.setText(_translate("BallDialog", "<html><head/><body><p><img src=\":/newPrefix/N6.png\"/></p></body></html>")) |
|
250 |
self.label_N7.setText(_translate("BallDialog", "<html><head/><body><p><img src=\":/newPrefix/N7.png\"/></p></body></html>")) |
|
251 |
self.label_N8.setText(_translate("BallDialog", "<html><head/><body><p><img src=\":/newPrefix/N8.png\"/></p></body></html>")) |
|
252 |
import Resource_rc |
HYTOS/HYTOS/BatteryLimit.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 |
|
|
9 |
from PyQt5 import QtCore, QtGui, QtWidgets |
|
10 |
from PyQt5.QtWidgets import * |
|
11 |
import os |
|
12 |
from Project import Project |
|
13 |
from AppDocData import AppDocData |
|
14 |
import BatteryLimit_UI |
|
15 |
import math |
|
16 |
|
|
17 |
class QBatteryLimit(QDialog): |
|
18 |
def __init__(self): |
|
19 |
QDialog.__init__(self) |
|
20 |
|
|
21 |
self.ui = BatteryLimit_UI.Ui_BatteryLimitDialog() |
|
22 |
self.ui.setupUi(self) |
|
23 |
self.initialize() |
|
24 |
|
|
25 |
def showDialog(self, item): |
|
26 |
self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint) |
|
27 |
|
|
28 |
self.ui.lineEdit_TagNo.setFocus() |
|
29 |
self.set_controls(item) |
|
30 |
self.load_units() |
|
31 |
|
|
32 |
self.exec_() |
|
33 |
|
|
34 |
def initialize(self): |
|
35 |
|
|
36 |
self.ui.label_Img_Up.setVisible(False) |
|
37 |
self.ui.label_Img_Down.setVisible(False) |
|
38 |
self.ui.label_Img_Left.setVisible(False) |
|
39 |
self.ui.label_Img_Right.setVisible(False) |
|
40 |
|
|
41 |
def set_controls(self, item): |
|
42 |
name = item.name |
|
43 |
|
|
44 |
if name == 'Up': |
|
45 |
self.ui.label_Img_Up.setVisible(True) |
|
46 |
elif name == 'Down': |
|
47 |
self.ui.label_Img_Down.setVisible(True) |
|
48 |
elif name == 'Left': |
|
49 |
self.ui.label_Img_Left.setVisible(True) |
|
50 |
elif name == 'Right': |
|
51 |
self.ui.label_Img_Right.setVisible(True) |
|
52 |
|
|
53 |
def load_units(self): |
|
54 |
from Drawing import Drawing |
|
55 |
|
|
56 |
appDocData = AppDocData.instance() |
|
57 |
drawing = appDocData.activeDrawing |
|
58 |
if drawing: |
|
59 |
columnDisplayNameList = appDocData.getColumnDisplayNames(drawing.UID, 'Nozzles') |
|
60 |
if len(columnDisplayNameList) > 0: |
|
61 |
for columnDisplayName in columnDisplayNameList: |
|
62 |
if columnDisplayName[0] == 'Pressure': |
|
63 |
self.ui.label_PressureUnit.setText(columnDisplayName[1]) |
|
64 |
elif columnDisplayName[0] == 'Elevation': |
|
65 |
self.ui.label_ElevationUnit.setText(columnDisplayName[1]) |
|
66 |
|
|
67 |
def accept(self): |
|
68 |
|
|
69 |
QDialog.accept(self) |
|
70 |
|
|
71 |
def reject(self): |
|
72 |
QDialog.reject(self) |
HYTOS/HYTOS/BatteryLimit_UI.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
|
|
3 |
# Form implementation generated from reading ui file '.\UI\BatteryLimit.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_BatteryLimitDialog(object): |
|
14 |
def setupUi(self, BatteryLimitDialog): |
|
15 |
BatteryLimitDialog.setObjectName("BatteryLimitDialog") |
|
16 |
BatteryLimitDialog.resize(367, 175) |
|
17 |
font = QtGui.QFont() |
|
18 |
font.setFamily("맑은 고딕") |
|
19 |
BatteryLimitDialog.setFont(font) |
|
20 |
icon = QtGui.QIcon() |
|
21 |
icon.addPixmap(QtGui.QPixmap(":/newPrefix/HYTOS.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
|
22 |
BatteryLimitDialog.setWindowIcon(icon) |
|
23 |
self.buttonBox = QtWidgets.QDialogButtonBox(BatteryLimitDialog) |
|
24 |
self.buttonBox.setGeometry(QtCore.QRect(200, 144, 156, 23)) |
|
25 |
self.buttonBox.setOrientation(QtCore.Qt.Horizontal) |
|
26 |
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) |
|
27 |
self.buttonBox.setObjectName("buttonBox") |
|
28 |
self.groupBox = QtWidgets.QGroupBox(BatteryLimitDialog) |
|
29 |
self.groupBox.setGeometry(QtCore.QRect(9, 9, 349, 125)) |
|
30 |
font = QtGui.QFont() |
|
31 |
font.setFamily("맑은 고딕") |
|
32 |
font.setBold(True) |
|
33 |
font.setWeight(75) |
|
34 |
self.groupBox.setFont(font) |
|
35 |
self.groupBox.setObjectName("groupBox") |
|
36 |
self.label_Img_Down = QtWidgets.QLabel(self.groupBox) |
|
37 |
self.label_Img_Down.setGeometry(QtCore.QRect(8, 24, 81, 81)) |
|
38 |
self.label_Img_Down.setObjectName("label_Img_Down") |
|
39 |
self.label_Img_Up = QtWidgets.QLabel(self.groupBox) |
|
40 |
self.label_Img_Up.setGeometry(QtCore.QRect(8, 24, 81, 81)) |
|
41 |
self.label_Img_Up.setObjectName("label_Img_Up") |
|
42 |
self.label_Img_Left = QtWidgets.QLabel(self.groupBox) |
|
43 |
self.label_Img_Left.setGeometry(QtCore.QRect(8, 24, 81, 81)) |
|
44 |
self.label_Img_Left.setObjectName("label_Img_Left") |
|
45 |
self.label_Img_Right = QtWidgets.QLabel(self.groupBox) |
|
46 |
self.label_Img_Right.setGeometry(QtCore.QRect(8, 24, 81, 81)) |
|
47 |
self.label_Img_Right.setObjectName("label_Img_Right") |
|
48 |
self.label_5 = QtWidgets.QLabel(self.groupBox) |
|
49 |
self.label_5.setGeometry(QtCore.QRect(76, 88, 80, 16)) |
|
50 |
self.label_5.setMinimumSize(QtCore.QSize(80, 0)) |
|
51 |
font = QtGui.QFont() |
|
52 |
font.setBold(False) |
|
53 |
font.setWeight(50) |
|
54 |
self.label_5.setFont(font) |
|
55 |
self.label_5.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) |
|
56 |
self.label_5.setObjectName("label_5") |
|
57 |
self.label_ElevationUnit = QtWidgets.QLabel(self.groupBox) |
|
58 |
self.label_ElevationUnit.setGeometry(QtCore.QRect(276, 88, 16, 16)) |
|
59 |
font = QtGui.QFont() |
|
60 |
font.setBold(False) |
|
61 |
font.setWeight(50) |
|
62 |
self.label_ElevationUnit.setFont(font) |
|
63 |
self.label_ElevationUnit.setObjectName("label_ElevationUnit") |
|
64 |
self.lineEdit_Elevation = QtWidgets.QLineEdit(self.groupBox) |
|
65 |
self.lineEdit_Elevation.setGeometry(QtCore.QRect(168, 88, 100, 21)) |
|
66 |
self.lineEdit_Elevation.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
67 |
font = QtGui.QFont() |
|
68 |
font.setBold(False) |
|
69 |
font.setWeight(50) |
|
70 |
self.lineEdit_Elevation.setFont(font) |
|
71 |
self.lineEdit_Elevation.setObjectName("lineEdit_Elevation") |
|
72 |
self.label_3 = QtWidgets.QLabel(self.groupBox) |
|
73 |
self.label_3.setGeometry(QtCore.QRect(76, 59, 80, 16)) |
|
74 |
self.label_3.setMinimumSize(QtCore.QSize(80, 0)) |
|
75 |
font = QtGui.QFont() |
|
76 |
font.setBold(False) |
|
77 |
font.setWeight(50) |
|
78 |
self.label_3.setFont(font) |
|
79 |
self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) |
|
80 |
self.label_3.setObjectName("label_3") |
|
81 |
self.lineEdit_Pressure = QtWidgets.QLineEdit(self.groupBox) |
|
82 |
self.lineEdit_Pressure.setGeometry(QtCore.QRect(168, 59, 100, 21)) |
|
83 |
self.lineEdit_Pressure.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
84 |
font = QtGui.QFont() |
|
85 |
font.setBold(False) |
|
86 |
font.setWeight(50) |
|
87 |
self.lineEdit_Pressure.setFont(font) |
|
88 |
self.lineEdit_Pressure.setObjectName("lineEdit_Pressure") |
|
89 |
self.label_PressureUnit = QtWidgets.QLabel(self.groupBox) |
|
90 |
self.label_PressureUnit.setGeometry(QtCore.QRect(276, 59, 57, 16)) |
|
91 |
font = QtGui.QFont() |
|
92 |
font.setBold(False) |
|
93 |
font.setWeight(50) |
|
94 |
self.label_PressureUnit.setFont(font) |
|
95 |
self.label_PressureUnit.setObjectName("label_PressureUnit") |
|
96 |
self.label = QtWidgets.QLabel(self.groupBox) |
|
97 |
self.label.setGeometry(QtCore.QRect(76, 30, 80, 16)) |
|
98 |
self.label.setMinimumSize(QtCore.QSize(80, 0)) |
|
99 |
font = QtGui.QFont() |
|
100 |
font.setBold(False) |
|
101 |
font.setWeight(50) |
|
102 |
self.label.setFont(font) |
|
103 |
self.label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) |
|
104 |
self.label.setObjectName("label") |
|
105 |
self.lineEdit_TagNo = QtWidgets.QLineEdit(self.groupBox) |
|
106 |
self.lineEdit_TagNo.setGeometry(QtCore.QRect(168, 30, 100, 21)) |
|
107 |
self.lineEdit_TagNo.setMaximumSize(QtCore.QSize(100, 16777215)) |
|
108 |
font = QtGui.QFont() |
|
109 |
font.setBold(False) |
|
110 |
font.setWeight(50) |
|
111 |
self.lineEdit_TagNo.setFont(font) |
|
112 |
self.lineEdit_TagNo.setObjectName("lineEdit_TagNo") |
|
113 |
|
|
114 |
self.retranslateUi(BatteryLimitDialog) |
|
115 |
self.buttonBox.accepted.connect(BatteryLimitDialog.accept) |
|
116 |
self.buttonBox.rejected.connect(BatteryLimitDialog.reject) |
|
117 |
QtCore.QMetaObject.connectSlotsByName(BatteryLimitDialog) |
|
118 |
BatteryLimitDialog.setTabOrder(self.lineEdit_TagNo, self.lineEdit_Pressure) |
|
119 |
BatteryLimitDialog.setTabOrder(self.lineEdit_Pressure, self.lineEdit_Elevation) |
|
120 |
|
|
121 |
def retranslateUi(self, BatteryLimitDialog): |
|
122 |
_translate = QtCore.QCoreApplication.translate |
|
123 |
BatteryLimitDialog.setWindowTitle(_translate("BatteryLimitDialog", "HYTOS Equipment Data - Battery Limit")) |
|
124 |
self.groupBox.setTitle(_translate("BatteryLimitDialog", "Equipment Figure")) |
|
125 |
self.label_Img_Down.setText(_translate("BatteryLimitDialog", "<html><head/><body><p><img src=\":/newPrefix/Battery_Limit_Down.png\"/></p></body></html>")) |
|
126 |
self.label_Img_Up.setText(_translate("BatteryLimitDialog", "<html><head/><body><p><img src=\":/newPrefix/Battery_Limit_Up.png\"/></p></body></html>")) |
|
127 |
self.label_Img_Left.setText(_translate("BatteryLimitDialog", "<html><head/><body><p><img src=\":/newPrefix/Battery_Limit_Left.png\"/></p></body></html>")) |
|
128 |
self.label_Img_Right.setText(_translate("BatteryLimitDialog", "<html><head/><body><p><img src=\":/newPrefix/Battery_Limit_Right.png\"/></p></body></html>")) |
|
129 |
self.label_5.setText(_translate("BatteryLimitDialog", "Elevation")) |
|
130 |
self.label_ElevationUnit.setText(_translate("BatteryLimitDialog", "m")) |
|
131 |
self.label_3.setText(_translate("BatteryLimitDialog", "Pressure")) |
|
132 |
self.label_PressureUnit.setText(_translate("BatteryLimitDialog", "kg/cm2(g)")) |
|
133 |
self.label.setText(_translate("BatteryLimitDialog", "Tag No.")) |
|
134 |
import Resource_rc |
HYTOS/HYTOS/CodeTableDialog.py | ||
---|---|---|
1 |
# coding: utf-8 |
|
2 |
""" |
|
3 |
This is code table dialog module |
|
4 |
""" |
|
5 |
import os |
|
6 |
import sys |
|
7 |
from PyQt5.QtCore import * |
|
8 |
from PyQt5.QtGui import * |
|
9 |
from PyQt5.QtWidgets import * |
|
10 |
from AppDocData import AppDocData, MessageType |
|
11 |
import CodeTable_UI |
|
12 |
|
|
13 |
class QCodeTableDialog(QDialog): |
|
14 |
""" |
|
15 |
This code table dialog class |
|
16 |
""" |
|
17 |
|
|
18 |
CODE_TABLES = ('Nominal Diameter', 'Fluid Code', 'Insulation Purpose', 'PnID Number', 'Piping Materials Class', 'Unit Number', 'ValveOperCodes', 'EqpTagNames', 'ReservedWords') |
|
19 |
|
|
20 |
def __init__(self, parent): |
|
21 |
QDialog.__init__(self, parent) |
|
22 |
|
|
23 |
self.currentCode = {} |
|
24 |
|
|
25 |
self.ui = CodeTable_UI.Ui_CodeTableDialog() |
|
26 |
self.ui.setupUi(self) |
|
27 |
|
|
28 |
self.ui.tableWidgetNominalDiameter.setSortingEnabled(True) |
|
29 |
self.ui.tableWidgetFluidCode.setSortingEnabled(True) |
|
30 |
self.ui.tableWidgetInsulationPurpose.setSortingEnabled(True) |
|
31 |
self.ui.tableWidgetPnIDNumber.setSortingEnabled(True) |
|
32 |
self.ui.tableWidgetPipingMaterialsClass.setSortingEnabled(True) |
|
33 |
self.ui.tableWidgetUnitNumber.setSortingEnabled(True) |
|
34 |
self.ui.tableWidgetValveOperCodes.setSortingEnabled(True) |
|
35 |
self.ui.tableWidgetEqpTagNames.setSortingEnabled(True) |
|
36 |
self.ui.tableWidgetReservedWords.setSortingEnabled(True) |
|
37 |
|
|
38 |
#DB Table명 기준으로 작성 |
|
39 |
for table in QCodeTableDialog.CODE_TABLES: |
|
40 |
self.settingTable(table) |
|
41 |
|
|
42 |
''' |
|
43 |
@brief Setting Table |
|
44 |
@author kyouho |
|
45 |
@date 2018.07.10 |
|
46 |
''' |
|
47 |
def settingTable(self, tableName): |
|
48 |
try: |
|
49 |
tableName = self.replaceText(tableName) |
|
50 |
docData = AppDocData.instance() |
|
51 |
table = self.findTableWidget(tableName) |
|
52 |
if table: table.horizontalHeader().setStretchLastSection(True) |
|
53 |
if tableName == "NominalDiameter": |
|
54 |
tableDatas = docData.getNomialPipeSizeData() |
|
55 |
else: |
|
56 |
tableDatas = docData.getCodeTable(tableName) |
|
57 |
|
|
58 |
if tableName == "NominalDiameter": |
|
59 |
self.insertTableWidgetNominalPipeSizeRow(tableDatas) |
|
60 |
|
|
61 |
table.cellChanged.connect(self.cellValueChanged) |
|
62 |
self.checkRowAndAddRow(tableName, table) |
|
63 |
else: |
|
64 |
table.setColumnCount(4) |
|
65 |
table.setHorizontalHeaderLabels(['uid', 'Code', 'Desc.', 'Allowables']) |
|
66 |
table.hideColumn(0) |
|
67 |
|
|
68 |
self.insertTableWidgetCommonRow(table, tableDatas) |
|
69 |
|
|
70 |
table.horizontalHeaderItem(1).setSizeHint(QSize(30, 30)) |
|
71 |
table.cellChanged.connect(self.cellValueChanged) |
|
72 |
self.checkRowAndAddRow(tableName, table) |
|
73 |
self.setCurrentCode(table, tableName) |
|
74 |
except Exception as ex: |
|
75 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
76 |
|
|
77 |
''' |
|
78 |
@brief Insert row NominalPipeSzie Tablewidget |
|
79 |
@author kyouho |
|
80 |
@date 2018.07.10 |
|
81 |
''' |
|
82 |
def insertTableWidgetNominalPipeSizeRow(self, pipeSizes): |
|
83 |
try: |
|
84 |
self.ui.tableWidgetNominalDiameter.setColumnCount(7) |
|
85 |
self.ui.tableWidgetNominalDiameter.setHorizontalHeaderLabels(['Code', 'Metric', 'Inch', 'InchStr', 'Allowables', 'MetricStr', 'Allowables']) |
|
86 |
self.ui.tableWidgetNominalDiameter.setRowCount(len(pipeSizes)) |
|
87 |
row = 0 |
|
88 |
for pipeSize in pipeSizes: |
|
89 |
item = QTableWidgetItem(pipeSize.code) |
|
90 |
item.setData(Qt.UserRole, pipeSize) |
|
91 |
self.ui.tableWidgetNominalDiameter.setItem(row, 0, item) |
|
92 |
self.ui.tableWidgetNominalDiameter.setItem(row, 1, QTableWidgetItem('' if pipeSize.metric is None else str(pipeSize.metric))) |
|
93 |
self.ui.tableWidgetNominalDiameter.setItem(row, 2, QTableWidgetItem('' if pipeSize.inch is None else str(pipeSize.inch))) |
|
94 |
self.ui.tableWidgetNominalDiameter.setItem(row, 3, QTableWidgetItem('' if pipeSize.inchStr is None else pipeSize.inchStr)) |
|
95 |
self.ui.tableWidgetNominalDiameter.setItem(row, 4, QTableWidgetItem('' if pipeSize.allowable_inch_str is None else pipeSize.allowable_inch_str)) |
|
96 |
self.ui.tableWidgetNominalDiameter.setItem(row, 5, QTableWidgetItem('' if pipeSize.metricStr is None else pipeSize.metricStr)) |
|
97 |
self.ui.tableWidgetNominalDiameter.setItem(row, 6, QTableWidgetItem('' if pipeSize.allowable_metric_str is None else pipeSize.allowable_metric_str)) |
|
98 |
row += 1 |
|
99 |
|
|
100 |
self.ui.tableWidgetNominalDiameter.horizontalHeaderItem(0).setSizeHint(QSize(30, 30)) |
|
101 |
except Exception as ex: |
|
102 |
from App import App |
|
103 |
|
|
104 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
105 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
106 |
|
|
107 |
''' |
|
108 |
@brief Insert row Common Tablewidget |
|
109 |
@author kyouho |
|
110 |
@date 2018.07.10 |
|
111 |
''' |
|
112 |
def insertTableWidgetCommonRow(self, table, tableDatas): |
|
113 |
try: |
|
114 |
table.setRowCount(len(tableDatas)) |
|
115 |
row = 0 |
|
116 |
for tableData in tableDatas: |
|
117 |
table.setItem(row, 0, QTableWidgetItem(tableData[0])) # UID |
|
118 |
table.setItem(row, 1, QTableWidgetItem(tableData[1])) # Name |
|
119 |
table.setItem(row, 2, QTableWidgetItem(tableData[2])) # Description |
|
120 |
table.setItem(row, 3, QTableWidgetItem(tableData[3])) # Allowables |
|
121 |
row += 1 |
|
122 |
except Exception as ex: |
|
123 |
from App import App |
|
124 |
|
|
125 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
126 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
127 |
|
|
128 |
''' |
|
129 |
@brief Find TableWidget with Name |
|
130 |
@author kyouhokyouho |
|
131 |
@date 2018.07.10 |
|
132 |
''' |
|
133 |
def findTableWidget(self, tableName): |
|
134 |
tableName = self.replaceText(tableName) |
|
135 |
return self.findChild(QTableWidget, 'tableWidget' + tableName) |
|
136 |
|
|
137 |
''' |
|
138 |
@brief key press event |
|
139 |
@author kyouho |
|
140 |
@date 2018.07.10 |
|
141 |
''' |
|
142 |
def keyPressEvent(self, e): |
|
143 |
try: |
|
144 |
if e.key() == Qt.Key_Delete: |
|
145 |
_tabWidget = self.ui.tabWidget |
|
146 |
currentTabIndex = _tabWidget.currentIndex() |
|
147 |
tabText = self.replaceText(_tabWidget.tabText(currentTabIndex)) |
|
148 |
table = self.findTableWidget(tabText) |
|
149 |
if table: |
|
150 |
selectedIndexes = table.selectedIndexes() |
|
151 |
selectedRows = [item.row() for item in selectedIndexes] |
|
152 |
model = table.model() |
|
153 |
|
|
154 |
rowsIndex = [] |
|
155 |
for row in selectedRows: |
|
156 |
rowsIndex.append(row) |
|
157 |
|
|
158 |
#중복 제거 |
|
159 |
rowsIndex = list(set(rowsIndex)) |
|
160 |
rowsIndex.reverse() |
|
161 |
|
|
162 |
if tabText != "NominalDiameter": |
|
163 |
for row in rowsIndex: |
|
164 |
table.hideRow(row) |
|
165 |
""" |
|
166 |
uid = table.item(row, 0).text() |
|
167 |
self.removeUID[uid] = tabText |
|
168 |
model.removeRow(row) |
|
169 |
""" |
|
170 |
|
|
171 |
self.checkRowAndAddRow(tabText, table) |
|
172 |
except Exception as ex: |
|
173 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
174 |
|
|
175 |
''' |
|
176 |
@brief Add new row |
|
177 |
@author kyouho |
|
178 |
@date 2018.07.10 |
|
179 |
''' |
|
180 |
def checkRowAndAddRow(self, tableName, table): |
|
181 |
try: |
|
182 |
rowCount = table.rowCount() |
|
183 |
result = True |
|
184 |
if tableName != "NominalDiameter": |
|
185 |
for row in range(rowCount): |
|
186 |
if table.isRowHidden(row): continue |
|
187 |
code = table.item(row, 1).text() |
|
188 |
if not code: |
|
189 |
result = False |
|
190 |
if result: |
|
191 |
table.cellChanged.disconnect(self.cellValueChanged) |
|
192 |
table.setRowCount(rowCount + 1) |
|
193 |
table.setItem(rowCount, 0, QTableWidgetItem('')) |
|
194 |
table.setItem(rowCount, 1, QTableWidgetItem('')) |
|
195 |
table.setItem(rowCount, 2, QTableWidgetItem('')) |
|
196 |
table.setItem(rowCount, 3, QTableWidgetItem('')) |
|
197 |
table.cellChanged.connect(self.cellValueChanged) |
|
198 |
else: |
|
199 |
columnCount = table.columnCount() |
|
200 |
|
|
201 |
for row in range(rowCount): |
|
202 |
if not result: |
|
203 |
break |
|
204 |
for columnIndex in range(columnCount): |
|
205 |
if not table.item(row, columnIndex).text(): |
|
206 |
result = False |
|
207 |
break |
|
208 |
|
|
209 |
if result: |
|
210 |
table.setRowCount(rowCount + 1) |
|
211 |
table.cellChanged.disconnect(self.cellValueChanged) |
|
212 |
for columnIndex in range(columnCount): |
|
213 |
table.setItem(rowCount, columnIndex, QTableWidgetItem('')) |
|
214 |
table.cellChanged.connect(self.cellValueChanged) |
|
215 |
|
|
216 |
except Exception as ex: |
|
217 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
218 |
|
|
219 |
''' |
|
220 |
@brief cellValueChange event |
|
221 |
@author kyouho |
|
222 |
@date 2018.07.10 |
|
223 |
''' |
|
224 |
def cellValueChanged(self, row, column): |
|
225 |
try: |
|
226 |
_tabWidget = self.ui.tabWidget |
|
227 |
currentTabIndex = _tabWidget.currentIndex() |
|
228 |
tabText = self.replaceText(_tabWidget.tabText(currentTabIndex)) |
|
229 |
table = self.findTableWidget(tabText) |
|
230 |
|
|
231 |
if tabText != "NominalDiameter": |
|
232 |
item = table.item(row, 1) |
|
233 |
code = item.text() |
|
234 |
if column == 1: |
|
235 |
result = self.isExistCode(table, code) |
|
236 |
if result: |
|
237 |
self.checkRowAndAddRow(tabText, table) |
|
238 |
self.setCurrentCode(table, tabText) |
|
239 |
else: |
|
240 |
QMessageBox.warning(self, self.tr('Notice'), self.tr('The same code already exists in the table.')) |
|
241 |
item.setText(self.currentCode[tabText][row]) |
|
242 |
elif column == 2: |
|
243 |
table.resizeColumnToContents(2) |
|
244 |
else: |
|
245 |
table.resizeColumnToContents(3) |
|
246 |
else: |
|
247 |
self.checkRowAndAddRow(tabText, table) |
|
248 |
except Exception as ex: |
|
249 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
250 |
|
|
251 |
''' |
|
252 |
@brief Check Duplicate Code |
|
253 |
@author kyouho |
|
254 |
@date 2018.07.10 |
|
255 |
''' |
|
256 |
def isExistCode(self, table, editCode): |
|
257 |
try: |
|
258 |
if not editCode: |
|
259 |
return False |
|
260 |
|
|
261 |
rowCount = table.rowCount() |
|
262 |
codes = [] |
|
263 |
for row in range(rowCount): |
|
264 |
if table.isRowHidden(row): continue |
|
265 |
code = table.item(row, 1).text() |
|
266 |
codes.append(code) |
|
267 |
|
|
268 |
count = codes.count(editCode) |
|
269 |
|
|
270 |
if count >=2: |
|
271 |
return False |
|
272 |
else: |
|
273 |
return True |
|
274 |
|
|
275 |
except Exception as ex: |
|
276 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
277 |
|
|
278 |
''' |
|
279 |
@brief save current Code (self.currentCode) |
|
280 |
@author kyouho |
|
281 |
@date 2018.07.10 |
|
282 |
''' |
|
283 |
def setCurrentCode(self, table, tabText): |
|
284 |
try: |
|
285 |
self.currentCode[tabText] = {} |
|
286 |
rowCount = table.rowCount() |
|
287 |
|
|
288 |
res = {} |
|
289 |
for row in range(rowCount): |
|
290 |
code = table.item(row, 1).text() |
|
291 |
res[row] = code |
|
292 |
|
|
293 |
self.currentCode[tabText] = res |
|
294 |
|
|
295 |
except Exception as ex: |
|
296 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
297 |
|
|
298 |
''' |
|
299 |
@brief replaceTextForCodeTable |
|
300 |
@author kyouho |
|
301 |
@date 2018.07.12 |
|
302 |
''' |
|
303 |
def replaceText(self, text): |
|
304 |
return text.replace(' ','').replace('&&', 'n') |
|
305 |
|
|
306 |
''' |
|
307 |
@brief save codes |
|
308 |
@author kyouho |
|
309 |
@date 2018.07.12 |
|
310 |
''' |
|
311 |
def accept(self): |
|
312 |
from CodeTables import CodeTable |
|
313 |
for table in QCodeTableDialog.CODE_TABLES: |
|
314 |
if table != 'Nominal Diameter': |
|
315 |
self.saveCommonCodeData(table) |
|
316 |
|
|
317 |
self.saveNomialPipeSize() |
|
318 |
CodeTable.clearTables() |
|
319 |
|
|
320 |
QDialog.accept(self) |
|
321 |
|
|
322 |
''' |
|
323 |
@brief save common code data |
|
324 |
@author kyouho |
|
325 |
@date 2018.07.12 |
|
326 |
''' |
|
327 |
def saveCommonCodeData(self, tableName): |
|
328 |
datas = [] |
|
329 |
try: |
|
330 |
tableName = self.replaceText(tableName) |
|
331 |
table = self.findTableWidget(tableName) |
|
332 |
rowCount = table.rowCount() |
|
333 |
for row in range(rowCount): |
|
334 |
if table.isRowHidden(row): |
|
335 |
uid, code, description, allowables = '-1',table.item(row, 1).text(),'',table.item(row, 0).text() |
|
336 |
else: |
|
337 |
uid = table.item(row, 0).text() |
|
338 |
code = table.item(row, 1).text() |
|
339 |
description = table.item(row, 2).text() if table.item(row, 2) is not None else '' |
|
340 |
allowables = table.item(row, 3).text() if table.item(row, 3) is not None else '' |
|
341 |
|
|
342 |
if code: |
|
343 |
datas.append((uid, code, description, allowables)) |
|
344 |
|
|
345 |
docData = AppDocData.instance() |
|
346 |
docData.saveCommonCodeData(tableName.replace(' ', ''), datas) |
|
347 |
except Exception as ex: |
|
348 |
from App import App |
|
349 |
|
|
350 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
351 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
352 |
|
|
353 |
''' |
|
354 |
@brief save common code data |
|
355 |
@author kyouho |
|
356 |
@date 2018.07.16 |
|
357 |
''' |
|
358 |
def saveNomialPipeSize(self): |
|
359 |
pipeSizes = [] |
|
360 |
try: |
|
361 |
docData = AppDocData.instance() |
|
362 |
|
|
363 |
from NominalPipeSize import NominalPipeSize |
|
364 |
|
|
365 |
table = self.ui.tableWidgetNominalDiameter |
|
366 |
rowCount = table.rowCount() |
|
367 |
for row in range(rowCount): |
|
368 |
pipe_size = table.item(row, 0).data(Qt.UserRole) |
|
369 |
pipe_size.code = table.item(row, 0).text() |
|
370 |
pipe_size.metric = float(table.item(row, 1).text()) if table.item(row, 1).text() != '' else None |
|
371 |
pipe_size.inch = float(table.item(row, 2).text()) if table.item(row, 2).text() != '' else None |
|
372 |
pipe_size.inchStr = table.item(row, 3).text() |
|
373 |
pipe_size.allowable_inch_str = table.item(row, 4).text() |
|
374 |
pipe_size.metricStr = table.item(row, 5).text() |
|
375 |
pipe_size.allowable_metric_str = table.item(row, 6).text() |
|
376 |
pipeSizes.append(pipe_size) |
|
377 |
|
|
378 |
docData.insertNomialPipeSize(pipeSizes) |
|
379 |
|
|
380 |
except Exception as ex: |
|
381 |
from App import App |
|
382 |
|
|
383 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
384 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
HYTOS/HYTOS/CodeTable_UI.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
|
|
3 |
# Form implementation generated from reading ui file './UI/CodeTable.ui' |
|
4 |
# |
|
5 |
# Created by: PyQt5 UI code generator 5.11.3 |
|
6 |
# |
|
7 |
# WARNING! All changes made in this file will be lost! |
|
8 |
|
|
9 |
from PyQt5 import QtCore, QtGui, QtWidgets |
|
10 |
|
|
11 |
class Ui_CodeTableDialog(object): |
|
12 |
def setupUi(self, CodeTableDialog): |
|
13 |
CodeTableDialog.setObjectName("CodeTableDialog") |
|
14 |
CodeTableDialog.resize(910, 589) |
|
15 |
font = QtGui.QFont() |
|
16 |
font.setFamily("맑은 고딕") |
|
17 |
CodeTableDialog.setFont(font) |
|
18 |
CodeTableDialog.setModal(True) |
|
19 |
self.gridLayout = QtWidgets.QGridLayout(CodeTableDialog) |
|
20 |
self.gridLayout.setObjectName("gridLayout") |
|
21 |
self.tabWidget = QtWidgets.QTabWidget(CodeTableDialog) |
|
22 |
self.tabWidget.setFocusPolicy(QtCore.Qt.NoFocus) |
|
23 |
self.tabWidget.setObjectName("tabWidget") |
|
24 |
self.tabNominalDiameter = QtWidgets.QWidget() |
|
25 |
self.tabNominalDiameter.setObjectName("tabNominalDiameter") |
|
26 |
self.gridLayout_4 = QtWidgets.QGridLayout(self.tabNominalDiameter) |
|
27 |
self.gridLayout_4.setObjectName("gridLayout_4") |
|
28 |
self.verticalLayout = QtWidgets.QVBoxLayout() |
|
29 |
self.verticalLayout.setObjectName("verticalLayout") |
|
30 |
self.groupBox = QtWidgets.QGroupBox(self.tabNominalDiameter) |
|
31 |
self.groupBox.setObjectName("groupBox") |
|
32 |
self.gridLayout_13 = QtWidgets.QGridLayout(self.groupBox) |
|
33 |
self.gridLayout_13.setObjectName("gridLayout_13") |
|
34 |
self.tableWidgetNominalDiameter = QtWidgets.QTableWidget(self.groupBox) |
|
35 |
self.tableWidgetNominalDiameter.setColumnCount(4) |
|
36 |
self.tableWidgetNominalDiameter.setObjectName("tableWidgetNominalDiameter") |
|
37 |
self.tableWidgetNominalDiameter.setRowCount(0) |
|
38 |
self.tableWidgetNominalDiameter.horizontalHeader().setSortIndicatorShown(True) |
|
39 |
self.tableWidgetNominalDiameter.verticalHeader().setVisible(False) |
|
40 |
self.gridLayout_13.addWidget(self.tableWidgetNominalDiameter, 0, 0, 1, 1) |
|
41 |
self.verticalLayout.addWidget(self.groupBox) |
|
42 |
self.gridLayout_4.addLayout(self.verticalLayout, 0, 0, 1, 1) |
|
43 |
self.tabWidget.addTab(self.tabNominalDiameter, "") |
|
44 |
self.tabFluidCode = QtWidgets.QWidget() |
|
45 |
self.tabFluidCode.setObjectName("tabFluidCode") |
|
46 |
self.gridLayout_3 = QtWidgets.QGridLayout(self.tabFluidCode) |
|
47 |
self.gridLayout_3.setObjectName("gridLayout_3") |
|
48 |
self.gridLayout_2 = QtWidgets.QGridLayout() |
|
49 |
self.gridLayout_2.setObjectName("gridLayout_2") |
|
50 |
self.groupBox_2 = QtWidgets.QGroupBox(self.tabFluidCode) |
|
51 |
self.groupBox_2.setObjectName("groupBox_2") |
|
52 |
self.gridLayout_14 = QtWidgets.QGridLayout(self.groupBox_2) |
|
53 |
self.gridLayout_14.setObjectName("gridLayout_14") |
|
54 |
self.tableWidgetFluidCode = QtWidgets.QTableWidget(self.groupBox_2) |
|
55 |
self.tableWidgetFluidCode.setColumnCount(3) |
|
56 |
self.tableWidgetFluidCode.setObjectName("tableWidgetFluidCode") |
|
57 |
self.tableWidgetFluidCode.setRowCount(0) |
|
58 |
self.tableWidgetFluidCode.verticalHeader().setVisible(False) |
|
59 |
self.gridLayout_14.addWidget(self.tableWidgetFluidCode, 0, 0, 1, 1) |
|
60 |
self.gridLayout_2.addWidget(self.groupBox_2, 0, 0, 1, 1) |
|
61 |
self.gridLayout_3.addLayout(self.gridLayout_2, 0, 0, 1, 1) |
|
62 |
self.tabWidget.addTab(self.tabFluidCode, "") |
|
63 |
self.tabInsulationPurpose = QtWidgets.QWidget() |
|
64 |
self.tabInsulationPurpose.setObjectName("tabInsulationPurpose") |
|
65 |
self.gridLayout_6 = QtWidgets.QGridLayout(self.tabInsulationPurpose) |
|
66 |
self.gridLayout_6.setObjectName("gridLayout_6") |
|
67 |
self.gridLayout_5 = QtWidgets.QGridLayout() |
|
68 |
self.gridLayout_5.setObjectName("gridLayout_5") |
|
69 |
self.groupBox_3 = QtWidgets.QGroupBox(self.tabInsulationPurpose) |
|
70 |
self.groupBox_3.setObjectName("groupBox_3") |
|
71 |
self.gridLayout_15 = QtWidgets.QGridLayout(self.groupBox_3) |
|
72 |
self.gridLayout_15.setObjectName("gridLayout_15") |
|
73 |
self.tableWidgetInsulationPurpose = QtWidgets.QTableWidget(self.groupBox_3) |
|
74 |
self.tableWidgetInsulationPurpose.setColumnCount(3) |
|
75 |
self.tableWidgetInsulationPurpose.setObjectName("tableWidgetInsulationPurpose") |
|
76 |
self.tableWidgetInsulationPurpose.setRowCount(0) |
|
77 |
self.tableWidgetInsulationPurpose.verticalHeader().setVisible(False) |
|
78 |
self.gridLayout_15.addWidget(self.tableWidgetInsulationPurpose, 0, 0, 1, 1) |
|
79 |
self.gridLayout_5.addWidget(self.groupBox_3, 0, 0, 1, 1) |
|
80 |
self.gridLayout_6.addLayout(self.gridLayout_5, 0, 0, 1, 1) |
|
81 |
self.tabWidget.addTab(self.tabInsulationPurpose, "") |
|
82 |
self.tabPnIDNumber = QtWidgets.QWidget() |
|
83 |
self.tabPnIDNumber.setObjectName("tabPnIDNumber") |
|
84 |
self.gridLayout_10 = QtWidgets.QGridLayout(self.tabPnIDNumber) |
|
85 |
self.gridLayout_10.setObjectName("gridLayout_10") |
|
86 |
self.gridLayout_9 = QtWidgets.QGridLayout() |
|
87 |
self.gridLayout_9.setObjectName("gridLayout_9") |
|
88 |
self.groupBox_4 = QtWidgets.QGroupBox(self.tabPnIDNumber) |
|
89 |
self.groupBox_4.setObjectName("groupBox_4") |
|
90 |
self.gridLayout_16 = QtWidgets.QGridLayout(self.groupBox_4) |
|
91 |
self.gridLayout_16.setObjectName("gridLayout_16") |
|
92 |
self.tableWidgetPnIDNumber = QtWidgets.QTableWidget(self.groupBox_4) |
|
93 |
self.tableWidgetPnIDNumber.setColumnCount(3) |
|
94 |
self.tableWidgetPnIDNumber.setObjectName("tableWidgetPnIDNumber") |
|
95 |
self.tableWidgetPnIDNumber.setRowCount(0) |
|
96 |
self.tableWidgetPnIDNumber.verticalHeader().setVisible(False) |
|
97 |
self.gridLayout_16.addWidget(self.tableWidgetPnIDNumber, 0, 0, 1, 1) |
|
98 |
self.gridLayout_9.addWidget(self.groupBox_4, 0, 0, 1, 1) |
|
99 |
self.gridLayout_10.addLayout(self.gridLayout_9, 0, 0, 1, 1) |
|
100 |
self.tabWidget.addTab(self.tabPnIDNumber, "") |
|
101 |
self.tabPipingMaterialsClass = QtWidgets.QWidget() |
|
102 |
self.tabPipingMaterialsClass.setObjectName("tabPipingMaterialsClass") |
|
103 |
self.gridLayout_8 = QtWidgets.QGridLayout(self.tabPipingMaterialsClass) |
|
104 |
self.gridLayout_8.setObjectName("gridLayout_8") |
|
105 |
self.gridLayout_7 = QtWidgets.QGridLayout() |
|
106 |
self.gridLayout_7.setObjectName("gridLayout_7") |
|
107 |
self.groupBox_5 = QtWidgets.QGroupBox(self.tabPipingMaterialsClass) |
|
108 |
self.groupBox_5.setObjectName("groupBox_5") |
|
109 |
self.gridLayout_17 = QtWidgets.QGridLayout(self.groupBox_5) |
|
110 |
self.gridLayout_17.setObjectName("gridLayout_17") |
|
111 |
self.tableWidgetPipingMaterialsClass = QtWidgets.QTableWidget(self.groupBox_5) |
|
112 |
self.tableWidgetPipingMaterialsClass.setColumnCount(3) |
|
113 |
self.tableWidgetPipingMaterialsClass.setObjectName("tableWidgetPipingMaterialsClass") |
|
114 |
self.tableWidgetPipingMaterialsClass.setRowCount(0) |
|
115 |
self.tableWidgetPipingMaterialsClass.verticalHeader().setVisible(False) |
|
116 |
self.gridLayout_17.addWidget(self.tableWidgetPipingMaterialsClass, 0, 0, 1, 1) |
|
117 |
self.gridLayout_7.addWidget(self.groupBox_5, 0, 0, 1, 1) |
|
118 |
self.gridLayout_8.addLayout(self.gridLayout_7, 0, 0, 1, 1) |
|
119 |
self.tabWidget.addTab(self.tabPipingMaterialsClass, "") |
|
120 |
self.tabUnitNumber = QtWidgets.QWidget() |
|
121 |
self.tabUnitNumber.setObjectName("tabUnitNumber") |
|
122 |
self.gridLayout_12 = QtWidgets.QGridLayout(self.tabUnitNumber) |
|
123 |
self.gridLayout_12.setObjectName("gridLayout_12") |
|
124 |
self.gridLayout_11 = QtWidgets.QGridLayout() |
|
125 |
self.gridLayout_11.setObjectName("gridLayout_11") |
|
126 |
self.groupBox_6 = QtWidgets.QGroupBox(self.tabUnitNumber) |
|
127 |
self.groupBox_6.setObjectName("groupBox_6") |
|
128 |
self.gridLayout_18 = QtWidgets.QGridLayout(self.groupBox_6) |
|
129 |
self.gridLayout_18.setObjectName("gridLayout_18") |
|
130 |
self.tableWidgetUnitNumber = QtWidgets.QTableWidget(self.groupBox_6) |
|
131 |
self.tableWidgetUnitNumber.setColumnCount(3) |
|
132 |
self.tableWidgetUnitNumber.setObjectName("tableWidgetUnitNumber") |
|
133 |
self.tableWidgetUnitNumber.setRowCount(0) |
|
134 |
self.tableWidgetUnitNumber.verticalHeader().setVisible(False) |
|
135 |
self.gridLayout_18.addWidget(self.tableWidgetUnitNumber, 0, 0, 1, 1) |
|
136 |
self.gridLayout_11.addWidget(self.groupBox_6, 0, 0, 1, 1) |
|
137 |
self.gridLayout_12.addLayout(self.gridLayout_11, 0, 0, 1, 1) |
|
138 |
self.tabWidget.addTab(self.tabUnitNumber, "") |
|
139 |
self.tab = QtWidgets.QWidget() |
|
140 |
self.tab.setObjectName("tab") |
|
141 |
self.gridLayout_19 = QtWidgets.QGridLayout(self.tab) |
|
142 |
self.gridLayout_19.setObjectName("gridLayout_19") |
|
143 |
self.groupBox_7 = QtWidgets.QGroupBox(self.tab) |
|
144 |
self.groupBox_7.setObjectName("groupBox_7") |
|
145 |
self.gridLayout_20 = QtWidgets.QGridLayout(self.groupBox_7) |
|
146 |
self.gridLayout_20.setObjectName("gridLayout_20") |
|
147 |
self.tableWidgetValveOperCodes = QtWidgets.QTableWidget(self.groupBox_7) |
|
148 |
self.tableWidgetValveOperCodes.setColumnCount(3) |
|
149 |
self.tableWidgetValveOperCodes.setObjectName("tableWidgetValveOperCodes") |
|
150 |
self.tableWidgetValveOperCodes.setRowCount(0) |
|
151 |
self.tableWidgetValveOperCodes.verticalHeader().setVisible(False) |
|
152 |
self.gridLayout_20.addWidget(self.tableWidgetValveOperCodes, 0, 0, 1, 1) |
|
153 |
self.gridLayout_19.addWidget(self.groupBox_7, 0, 0, 1, 1) |
|
154 |
self.tabWidget.addTab(self.tab, "") |
|
155 |
self.tab_2 = QtWidgets.QWidget() |
|
156 |
self.tab_2.setObjectName("tab_2") |
|
157 |
self.gridLayout_22 = QtWidgets.QGridLayout(self.tab_2) |
|
158 |
self.gridLayout_22.setObjectName("gridLayout_22") |
|
159 |
self.groupBox_8 = QtWidgets.QGroupBox(self.tab_2) |
|
160 |
self.groupBox_8.setObjectName("groupBox_8") |
|
161 |
self.gridLayout_21 = QtWidgets.QGridLayout(self.groupBox_8) |
|
162 |
self.gridLayout_21.setObjectName("gridLayout_21") |
|
163 |
self.tableWidgetEqpTagNames = QtWidgets.QTableWidget(self.groupBox_8) |
|
164 |
self.tableWidgetEqpTagNames.setColumnCount(3) |
|
165 |
self.tableWidgetEqpTagNames.setObjectName("tableWidgetEqpTagNames") |
|
166 |
self.tableWidgetEqpTagNames.setRowCount(0) |
|
167 |
self.tableWidgetEqpTagNames.verticalHeader().setVisible(False) |
|
168 |
self.gridLayout_21.addWidget(self.tableWidgetEqpTagNames, 0, 0, 1, 1) |
|
169 |
self.gridLayout_22.addWidget(self.groupBox_8, 0, 0, 1, 1) |
|
170 |
self.tabWidget.addTab(self.tab_2, "") |
|
171 |
self.tab_3 = QtWidgets.QWidget() |
|
172 |
self.tab_3.setObjectName("tab_3") |
|
173 |
self.gridLayout_24 = QtWidgets.QGridLayout(self.tab_3) |
|
174 |
self.gridLayout_24.setObjectName("gridLayout_24") |
|
175 |
self.groupBox_9 = QtWidgets.QGroupBox(self.tab_3) |
|
176 |
self.groupBox_9.setObjectName("groupBox_9") |
|
177 |
self.gridLayout_23 = QtWidgets.QGridLayout(self.groupBox_9) |
|
178 |
self.gridLayout_23.setObjectName("gridLayout_23") |
|
179 |
self.tableWidgetReservedWords = QtWidgets.QTableWidget(self.groupBox_9) |
|
180 |
self.tableWidgetReservedWords.setColumnCount(4) |
|
181 |
self.tableWidgetReservedWords.setObjectName("tableWidgetReservedWords") |
|
182 |
self.tableWidgetReservedWords.setRowCount(0) |
|
183 |
self.tableWidgetReservedWords.horizontalHeader().setSortIndicatorShown(True) |
|
184 |
self.tableWidgetReservedWords.verticalHeader().setVisible(False) |
|
185 |
self.gridLayout_23.addWidget(self.tableWidgetReservedWords, 0, 0, 1, 1) |
|
186 |
self.gridLayout_24.addWidget(self.groupBox_9, 0, 0, 1, 1) |
|
187 |
self.tabWidget.addTab(self.tab_3, "") |
|
188 |
self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1) |
|
189 |
self.buttonBox = QtWidgets.QDialogButtonBox(CodeTableDialog) |
|
190 |
self.buttonBox.setFocusPolicy(QtCore.Qt.TabFocus) |
|
191 |
self.buttonBox.setOrientation(QtCore.Qt.Horizontal) |
|
192 |
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) |
|
193 |
self.buttonBox.setObjectName("buttonBox") |
|
194 |
self.gridLayout.addWidget(self.buttonBox, 1, 0, 1, 1) |
|
195 |
|
|
196 |
self.retranslateUi(CodeTableDialog) |
|
197 |
self.tabWidget.setCurrentIndex(0) |
|
198 |
self.buttonBox.accepted.connect(CodeTableDialog.accept) |
|
199 |
self.buttonBox.rejected.connect(CodeTableDialog.reject) |
|
200 |
QtCore.QMetaObject.connectSlotsByName(CodeTableDialog) |
|
201 |
|
|
202 |
def retranslateUi(self, CodeTableDialog): |
|
203 |
_translate = QtCore.QCoreApplication.translate |
|
204 |
CodeTableDialog.setWindowTitle(_translate("CodeTableDialog", "Code Table")) |
|
205 |
self.groupBox.setTitle(_translate("CodeTableDialog", "Nominal Diameter")) |
|
206 |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabNominalDiameter), _translate("CodeTableDialog", "Nominal Diameter")) |
|
207 |
self.groupBox_2.setTitle(_translate("CodeTableDialog", "Fluid Code")) |
|
208 |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabFluidCode), _translate("CodeTableDialog", "Fluid Code")) |
|
209 |
self.groupBox_3.setTitle(_translate("CodeTableDialog", "Insulation Purpose")) |
|
210 |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabInsulationPurpose), _translate("CodeTableDialog", "Insulation Purpose")) |
|
211 |
self.groupBox_4.setTitle(_translate("CodeTableDialog", "P&&ID Number")) |
|
212 |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabPnIDNumber), _translate("CodeTableDialog", "P&&ID Number")) |
|
213 |
self.groupBox_5.setTitle(_translate("CodeTableDialog", "Piping Materials Class")) |
|
214 |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabPipingMaterialsClass), _translate("CodeTableDialog", "Piping Materials Class")) |
|
215 |
self.groupBox_6.setTitle(_translate("CodeTableDialog", "Unit Number")) |
|
216 |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabUnitNumber), _translate("CodeTableDialog", "Unit Number")) |
|
217 |
self.groupBox_7.setTitle(_translate("CodeTableDialog", "Valve Oper Code")) |
|
218 |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("CodeTableDialog", "Valve Oper Codes")) |
|
219 |
self.groupBox_8.setTitle(_translate("CodeTableDialog", "Tag Name")) |
|
220 |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("CodeTableDialog", "Eqp Tag Names")) |
|
221 |
self.groupBox_9.setTitle(_translate("CodeTableDialog", "Reserved Word")) |
|
222 |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("CodeTableDialog", "Reserved Words")) |
|
223 |
|
|
224 |
|
|
225 |
if __name__ == "__main__": |
|
226 |
import sys |
|
227 |
app = QtWidgets.QApplication(sys.argv) |
|
228 |
CodeTableDialog = QtWidgets.QDialog() |
|
229 |
ui = Ui_CodeTableDialog() |
|
230 |
ui.setupUi(CodeTableDialog) |
|
231 |
CodeTableDialog.show() |
|
232 |
sys.exit(app.exec_()) |
|
233 |
|
내보내기 Unified diff