개정판 baf86a52
issue #1054 : 스트림 데이타 입력
Change-Id: Ic5c81cfb5a97569e4371083e97c483e27fa37900
HYTOS/HYTOS/AppDocData.py | ||
---|---|---|
947 | 947 |
|
948 | 948 |
return res |
949 | 949 |
|
950 |
def getInsideDiameter(self, nominaldiameter_uid, schedule_uid): |
|
951 |
res = [] |
|
952 |
try: |
|
953 |
# Creates or opens a file called mydb with a SQLite3 DB |
|
954 |
dbPath = os.path.join(self.getCurrentProject().getDbFilePath(), AppDocData.DATABASE) |
|
955 |
db = sqlite3.connect(dbPath) |
|
956 |
# Get a cursor object |
|
957 |
cursor = db.cursor() |
|
958 |
|
|
959 |
sql = """select UID |
|
960 |
, Milimeter |
|
961 |
, Inch |
|
962 |
from InsideDiameter |
|
963 |
where NominalDiameter_UID = ? |
|
964 |
and Schedule_UID = ?""" |
|
965 |
|
|
966 |
param = (nominaldiameter_uid, schedule_uid) |
|
967 |
cursor.execute(sql, param) |
|
968 |
rows = cursor.fetchall() |
|
969 |
for row in rows: |
|
970 |
res.append((row[0], row[1], row[2])) |
|
971 |
# Catch the exception |
|
972 |
except Exception as ex: |
|
973 |
# Roll back any change if something goes wrong |
|
974 |
db.rollback() |
|
975 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
976 |
finally: |
|
977 |
# Close the db connection |
|
978 |
db.close() |
|
979 |
|
|
980 |
return res |
|
981 |
|
|
982 |
def getSchedule(self): |
|
983 |
res = [] |
|
984 |
try: |
|
985 |
# Creates or opens a file called mydb with a SQLite3 DB |
|
986 |
dbPath = os.path.join(self.getCurrentProject().getDbFilePath(), AppDocData.DATABASE) |
|
987 |
db = sqlite3.connect(dbPath) |
|
988 |
# Get a cursor object |
|
989 |
cursor = db.cursor() |
|
950 | 990 |
|
991 |
sql = "select UID, No from Schedule" |
|
992 |
cursor.execute(sql) |
|
993 |
rows = cursor.fetchall() |
|
994 |
for row in rows: |
|
995 |
res.append((row[0], row[1])) |
|
996 |
# Catch the exception |
|
997 |
except Exception as ex: |
|
998 |
# Roll back any change if something goes wrong |
|
999 |
db.rollback() |
|
1000 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
1001 |
finally: |
|
1002 |
# Close the db connection |
|
1003 |
db.close() |
|
1004 |
|
|
1005 |
return res |
|
951 | 1006 |
|
952 | 1007 |
|
953 | 1008 |
|
... | ... | |
1414 | 1469 |
# Close the db connection |
1415 | 1470 |
conn.close() |
1416 | 1471 |
|
1472 |
|
|
1473 |
def initializeDataByDrawingUID(self, uid): |
|
1474 |
try: |
|
1475 |
# Creates or opens a file called mydb with a SQLite3 DB |
|
1476 |
dbPath = os.path.join(self.getCurrentProject().getDbFilePath(), AppDocData.DATABASE) |
|
1477 |
conn = sqlite3.connect(dbPath) |
|
1478 |
# Get a cursor object |
|
1479 |
cursor = conn.cursor() |
|
1480 |
|
|
1481 |
# 0. Delete Points |
|
1482 |
sql = "delete from Points where Components_UID in (select UID from Components where Drawings_UID = '{}')".format(uid) |
|
1483 |
cursor.execute(sql) |
|
1484 |
|
|
1485 |
# 1. Delete HMB |
|
1486 |
sql = "delete from HMB where Components_UID in (select UID from Components where Drawings_UID = '{}')".format(uid) |
|
1487 |
cursor.execute(sql) |
|
1488 |
|
|
1489 |
# 2. Delete Components |
|
1490 |
sql = "delete from Components where Drawings_UID='{}'".format(uid) |
|
1491 |
cursor.execute(sql) |
|
1492 |
|
|
1493 |
conn.commit() |
|
1494 |
# Catch the exception |
|
1495 |
except Exception as ex: |
|
1496 |
# Roll back any change if something goes wrong |
|
1497 |
conn.rollback() |
|
1498 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
1499 |
finally: |
|
1500 |
# Close the db connection |
|
1501 |
conn.close() |
|
1502 |
|
|
1417 | 1503 |
def deleteDrawingByUID(self, uid): |
1418 | 1504 |
try: |
1419 | 1505 |
# Creates or opens a file called mydb with a SQLite3 DB |
... | ... | |
2218 | 2304 |
|
2219 | 2305 |
return result |
2220 | 2306 |
|
2307 |
|
|
2308 |
def getResistanceCoefficientByMethod(self, method): |
|
2309 |
res = [] |
|
2310 |
try: |
|
2311 |
# Creates or opens a file called mydb with a SQLite3 DB |
|
2312 |
dbPath = os.path.join(self.getCurrentProject().getDbFilePath(), AppDocData.DATABASE) |
|
2313 |
db = sqlite3.connect(dbPath) |
|
2314 |
db.row_factory = sqlite3.Row |
|
2315 |
# Get a cursor object |
|
2316 |
cursor = db.cursor() |
|
2317 |
|
|
2318 |
sql = """select UID |
|
2319 |
, Method |
|
2320 |
, Category |
|
2321 |
, Type |
|
2322 |
, Name |
|
2323 |
, K |
|
2324 |
from ResistanceCoefficient |
|
2325 |
where Method = ? |
|
2326 |
order by rowid""" |
|
2327 |
|
|
2328 |
param = (method,) |
|
2329 |
cursor.execute(sql, param) |
|
2330 |
rows = cursor.fetchall() |
|
2331 |
for row in rows: |
|
2332 |
res.append((row[0], row[1], row[2], row[3], row[4], row[5])) |
|
2333 |
# Catch the exception |
|
2334 |
except Exception as ex: |
|
2335 |
# Roll back any change if something goes wrong |
|
2336 |
db.rollback() |
|
2337 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
2338 |
finally: |
|
2339 |
# Close the db connection |
|
2340 |
db.close() |
|
2341 |
|
|
2342 |
return res |
|
2343 |
|
|
2344 |
|
|
2221 | 2345 |
''' |
2222 | 2346 |
@brief Set Common Code Data |
2223 | 2347 |
@author kyouho |
HYTOS/HYTOS/FittingsDialog.py | ||
---|---|---|
123 | 123 |
self.ui.groupBox_CraneK_Manual.setVisible(True) |
124 | 124 |
|
125 | 125 |
def initTableWidgetImage(self): |
126 |
dev = 1 |
|
127 |
#textImage = QtGui.QPixmap(":/images/bend_180.jpg") |
|
126 | 128 |
|
127 |
textImage = QtGui.QPixmap(":/images/bend_180.jpg") |
|
128 | 129 |
|
129 |
|
|
130 |
w = self.ui.label_Img.height() |
|
131 |
h = self.ui.label_Img.width() |
|
132 |
self.ui.label_Img.setPixmap(textImage.scaled(w, h, QtCore.Qt.KeepAspectRatio, QtCore.Qt.FastTransformation)) |
|
130 |
#w = self.ui.label_Img.height() |
|
131 |
#h = self.ui.label_Img.width() |
|
132 |
#self.ui.label_Img.setPixmap(textImage.scaled(w, h, QtCore.Qt.KeepAspectRatio, QtCore.Qt.FastTransformation)) |
|
133 | 133 |
|
134 | 134 |
|
135 | 135 |
|
HYTOS/HYTOS/HMBTable.py | ||
---|---|---|
382 | 382 |
hmb.flowrate_mass = values['Flowrate_Mass'] |
383 | 383 |
if 'Flowrate_Volume' in values: |
384 | 384 |
hmb.flowrate_volume = values['Flowrate_Volume'] |
385 |
if 'Density' in values: |
|
386 |
hmb.density = values['Density'] |
|
387 | 385 |
if 'Viscosity' in values: |
388 |
hmb.viscosity = values['Viscosity'] |
|
386 |
hmb.viscosity = values['Viscosity'] |
|
387 |
if 'Density' in values: |
|
388 |
hmb.density = values['Density'] |
|
389 | 389 |
if 'Temperature' in values: |
390 | 390 |
hmb.temperature = values['Temperature'] |
391 | 391 |
if 'Molecular_Weight' in values: |
HYTOS/HYTOS/MainWindow.py | ||
---|---|---|
21 | 21 |
from PyQt5.QtWidgets import * |
22 | 22 |
from PyQt5.QtSvg import * |
23 | 23 |
|
24 |
|
|
24 | 25 |
from PIL import Image |
25 | 26 |
|
26 | 27 |
import MainWindow_UI |
... | ... | |
315 | 316 |
self.tableWidgetHMB.horizontalHeader().setVisible(False) |
316 | 317 |
self.tableWidgetHMB.verticalHeader().setVisible(False) |
317 | 318 |
|
319 |
|
|
318 | 320 |
rowIndex = 0 |
319 | 321 |
for columnInfo in columnInfos: |
320 | 322 |
name = columnInfo[0] |
... | ... | |
627 | 629 |
if type(item) is not QGraphicsPixmapItem and item.scene() is not None: |
628 | 630 |
self.graphicsView.scene.removeItem(item) |
629 | 631 |
|
632 |
appDocData.initializeDataByDrawingUID(appDocData.activeDrawing.UID) |
|
633 |
|
|
630 | 634 |
self.initTableWidgetHMB() |
631 | 635 |
|
632 | 636 |
except Exception as ex: |
HYTOS/HYTOS/MainWindow_UI.py | ||
---|---|---|
383 | 383 |
font.setFamily("맑은 고딕") |
384 | 384 |
self.actionOptions.setFont(font) |
385 | 385 |
self.actionOptions.setObjectName("actionOptions") |
386 |
self.actionCalculation = QtWidgets.QAction(MainWindow) |
|
387 |
icon20 = QtGui.QIcon() |
|
388 |
icon20.addPixmap(QtGui.QPixmap(":/images/Calculation.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) |
|
389 |
self.actionCalculation.setIcon(icon20) |
|
390 |
self.actionCalculation.setText("") |
|
391 |
font = QtGui.QFont() |
|
392 |
font.setFamily("맑은 고딕") |
|
393 |
font.setBold(False) |
|
394 |
font.setWeight(50) |
|
395 |
self.actionCalculation.setFont(font) |
|
396 |
self.actionCalculation.setObjectName("actionCalculation") |
|
386 | 397 |
self.menu.addAction(self.actionNew) |
387 | 398 |
self.menu.addAction(self.actionSave) |
388 | 399 |
self.menu.addSeparator() |
... | ... | |
407 | 418 |
self.toolBar.addAction(self.actionLine) |
408 | 419 |
self.toolBar.addAction(self.actionInitialize) |
409 | 420 |
self.toolBar.addSeparator() |
421 |
self.toolBar.addAction(self.actionCalculation) |
|
422 |
self.toolBar.addSeparator() |
|
410 | 423 |
self.toolBar.addAction(self.actionZoom) |
411 | 424 |
self.toolBar.addAction(self.actionFitWindow) |
412 | 425 |
|
... | ... | |
491 | 504 |
self.actionCreate_Symbol.setText(_translate("MainWindow", "Symbol Editor")) |
492 | 505 |
self.actionCreate_Stream.setText(_translate("MainWindow", "Create Stream")) |
493 | 506 |
self.actionOptions.setText(_translate("MainWindow", "Options...")) |
507 |
self.actionCalculation.setToolTip(_translate("MainWindow", "Calculation")) |
|
494 | 508 |
import Resource_rc |
HYTOS/HYTOS/PhaseTypeDialog.py | ||
---|---|---|
55 | 55 |
self.ui.lineEdit_CurrentType.setText('Liquid (Incompressible)') |
56 | 56 |
elif hmb.phase_type == 'Mixed': |
57 | 57 |
self.ui.lineEdit_CurrentType.setText('Mixed (Vapor + Liquid)') |
58 |
|
|
59 |
index = self.getIndexByValue(hmb.phase_type) |
|
60 |
if index: |
|
61 |
self.ui.comboBox_PhaseType.setCurrentIndex(index) |
|
58 | 62 |
break |
63 |
|
|
64 |
def getIndexByValue(self, value): |
|
65 |
index = None |
|
66 |
|
|
67 |
for index in range(self.ui.comboBox_PhaseType.count()): |
|
68 |
if self.ui.comboBox_PhaseType.itemData(index) == value: |
|
69 |
return index |
|
70 |
|
|
71 |
return index |
|
59 | 72 |
|
60 | 73 |
def accept(self): |
61 | 74 |
index = self.ui.comboBox_PhaseType.currentIndex() |
HYTOS/HYTOS/Phase_LiquidDialog.py | ||
---|---|---|
32 | 32 |
self.ui.comboBox_Roughness.currentIndexChanged.connect(self.onRoughnessChanged) |
33 | 33 |
self.ui.pushButton_Roughness.clicked.connect(self.roughnessClickedEvent) |
34 | 34 |
self.ui.pushButton_Fitting.clicked.connect(self.show_FittingMethodDialog) |
35 |
|
|
35 |
self.ui.comboBox_Nominal_Pipe_Size.currentIndexChanged.connect(self.getInsideDiameter) |
|
36 |
self.ui.comboBox_Schedule_No.currentIndexChanged.connect(self.getInsideDiameter) |
|
37 |
|
|
36 | 38 |
self.initUnits() |
37 | 39 |
self.initNominalDiameter() |
38 | 40 |
self.initSchedule() |
39 | 41 |
self.initRoughness() |
40 | 42 |
|
43 |
|
|
41 | 44 |
def onRoughnessChanged(self, index): |
42 | 45 |
value = self.ui.comboBox_Roughness.itemData(index) |
43 | 46 |
self.ui.lineEdit_Roughness.setText('{}'.format(value)) |
... | ... | |
49 | 52 |
selectedRoughness = dialog.showDialog() |
50 | 53 |
|
51 | 54 |
def show_FittingMethodDialog(self): |
52 |
from FittingMethodDialog import QFittingMethodDialog |
|
55 |
#from FittingMethodDialog import QFittingMethodDialog
|
|
53 | 56 |
|
54 |
dialog = QFittingMethodDialog() |
|
55 |
selectedFittingMethod = dialog.showDialog(self) |
|
56 |
if selectedFittingMethod: |
|
57 |
if selectedFittingMethod == 'EquivalentLength': |
|
58 |
self.show_EquivalentLengthDialog() |
|
59 |
elif selectedFittingMethod == 'CraneK': |
|
60 |
self.show_CraneKDialog() |
|
61 |
elif selectedFittingMethod == '2K': |
|
62 |
self.show_2KDialog() |
|
57 |
#dialog = QFittingMethodDialog() |
|
58 |
#selectedFittingMethod = dialog.showDialog(self) |
|
59 |
#if selectedFittingMethod: |
|
60 |
# if selectedFittingMethod == 'EquivalentLength': |
|
61 |
# self.show_EquivalentLengthDialog() |
|
62 |
# elif selectedFittingMethod == 'CraneK': |
|
63 |
# self.show_CraneKDialog() |
|
64 |
# elif selectedFittingMethod == '2K': |
|
65 |
# self.show_2KDialog() |
|
66 |
|
|
67 |
from FittingsDialog import QFittingsDialog |
|
68 |
dialog = QFittingsDialog() |
|
69 |
dialog.showDialog(self) |
|
63 | 70 |
|
64 | 71 |
def clickedEvent(self): |
65 | 72 |
if self.sender() == self.ui.radioButton_Flowrate_Mass: |
... | ... | |
124 | 131 |
self.ui.label_Fitting_Length_Unit.setText(attr[1]['Length']) |
125 | 132 |
self.ui.label_Equivalent_Lenght_Cal_Unit.setText(attr[1]['Length']) |
126 | 133 |
|
134 |
|
|
135 |
def getInsideDiameter(self): |
|
136 |
from AppDocData import AppDocData |
|
137 |
|
|
138 |
self.ui.lineEdit_Inside_Pipe_Size.clear() |
|
139 |
|
|
140 |
nominaldiameter_uid = self.ui.comboBox_Nominal_Pipe_Size.currentData() |
|
141 |
schedule_uid = self.ui.comboBox_Schedule_No.currentData() |
|
142 |
|
|
143 |
if nominaldiameter_uid and schedule_uid: |
|
144 |
insideDiameter = AppDocData.instance().getInsideDiameter(nominaldiameter_uid, schedule_uid) |
|
145 |
if len(insideDiameter) > 0: |
|
146 |
if self.ui.label_Inside_Pipe_Size_Unit.text() == 'mm': |
|
147 |
self.ui.lineEdit_Inside_Pipe_Size.setText(str(insideDiameter[0][1])) |
|
148 |
else: |
|
149 |
self.ui.lineEdit_Inside_Pipe_Size.setText(str(insideDiameter[0][2])) |
|
127 | 150 |
|
128 | 151 |
def initNominalDiameter(self): |
129 | 152 |
from AppDocData import AppDocData |
... | ... | |
139 | 162 |
self.ui.comboBox_Nominal_Pipe_Size.setCurrentIndex(-1) |
140 | 163 |
|
141 | 164 |
def initSchedule(self): |
165 |
from AppDocData import AppDocData |
|
166 |
|
|
142 | 167 |
self.ui.comboBox_Schedule_No.clear() |
143 | 168 |
|
144 |
self.ui.comboBox_Schedule_No.addItem('5S', '5S') |
|
145 |
self.ui.comboBox_Schedule_No.addItem('10S', '10S') |
|
146 |
self.ui.comboBox_Schedule_No.addItem('10', '10') |
|
147 |
self.ui.comboBox_Schedule_No.addItem('20', '20') |
|
148 |
self.ui.comboBox_Schedule_No.addItem('30', '30') |
|
149 |
self.ui.comboBox_Schedule_No.addItem('40S', '40S') |
|
150 |
self.ui.comboBox_Schedule_No.addItem('Std', 'Std') |
|
151 |
self.ui.comboBox_Schedule_No.addItem('40', '40') |
|
152 |
self.ui.comboBox_Schedule_No.addItem('60', '60') |
|
153 |
self.ui.comboBox_Schedule_No.addItem('80S', '80S') |
|
154 |
self.ui.comboBox_Schedule_No.addItem('XS', 'XS') |
|
155 |
self.ui.comboBox_Schedule_No.addItem('80', '80') |
|
156 |
self.ui.comboBox_Schedule_No.addItem('100', '100') |
|
157 |
self.ui.comboBox_Schedule_No.addItem('120', '120') |
|
158 |
self.ui.comboBox_Schedule_No.addItem('140', '140') |
|
159 |
self.ui.comboBox_Schedule_No.addItem('160', '160') |
|
160 |
self.ui.comboBox_Schedule_No.addItem('XXS', 'XXS') |
|
161 |
self.ui.comboBox_Schedule_No.addItem('User Sch.', 'User Sch.') |
|
169 |
scheduleList = AppDocData.instance().getSchedule() |
|
170 |
for schedule in scheduleList: |
|
171 |
self.ui.comboBox_Schedule_No.addItem(schedule[1], schedule[0]) |
|
162 | 172 |
|
163 | 173 |
self.ui.comboBox_Schedule_No.setCurrentIndex(-1) |
164 | 174 |
|
... | ... | |
200 | 210 |
for hmb in drawing.hmbTable._hmbs: |
201 | 211 |
if hmb.components_uid == self.components_uid: |
202 | 212 |
if hmb.flowrate_mass: |
213 |
self.ui.radioButton_Flowrate_Mass.setChecked(True) |
|
214 |
self.ui.lineEdit_Flowrate_Mass.setEnabled(True) |
|
215 |
self.ui.lineEdit_Flowrate_Volume.setEnabled(False) |
|
203 | 216 |
self.ui.lineEdit_Flowrate_Mass.setText(str(hmb.flowrate_mass)) |
204 | 217 |
if hmb.flowrate_volume: |
218 |
self.ui.radioButton_Flowrate_Volume.setChecked(True) |
|
219 |
self.ui.lineEdit_Flowrate_Mass.setEnabled(False) |
|
220 |
self.ui.lineEdit_Flowrate_Volume.setEnabled(True) |
|
205 | 221 |
self.ui.lineEdit_Flowrate_Volume.setText(str(hmb.flowrate_volume)) |
222 |
if hmb.density: |
|
223 |
self.ui.lineEdit_Density.setText(str(hmb.density)) |
|
224 |
if hmb.viscosity: |
|
225 |
self.ui.lineEdit_Viscosity.setText(str(hmb.viscosity)) |
|
226 |
if hmb.limitation_velocity: |
|
227 |
self.ui.lineEdit_Limitation_Velocity.setText(str(hmb.limitation_velocity)) |
|
228 |
if hmb.limitation_pressure_drop: |
|
229 |
self.ui.lineEdit_Limitation_Pressure_Drop.setText(str(hmb.limitation_pressure_drop)) |
|
230 |
if hmb.nominal_pipe_size: |
|
231 |
self.ui.comboBox_Nominal_Pipe_Size.setCurrentText(str(hmb.nominal_pipe_size)) |
|
232 |
if hmb.schedule_no: |
|
233 |
self.ui.comboBox_Schedule_No.setCurrentText(str(hmb.schedule_no)) |
|
234 |
if hmb.roughness: |
|
235 |
index = self.getIndexByValue(hmb.roughness) |
|
236 |
if index: |
|
237 |
self.ui.comboBox_Roughness.setCurrentIndex(index) |
|
238 |
|
|
239 |
|
|
206 | 240 |
break |
207 | 241 |
|
242 |
def getIndexByValue(self, value): |
|
243 |
index = None |
|
244 |
|
|
245 |
for index in range(self.ui.comboBox_Roughness.count()): |
|
246 |
if float(self.ui.comboBox_Roughness.itemData(index)) == float(value): |
|
247 |
return index |
|
248 |
|
|
249 |
return index |
|
250 |
|
|
208 | 251 |
|
209 | 252 |
def update_HMB(self): |
210 | 253 |
from AppDocData import AppDocData |
HYTOS/HYTOS/Phase_Liquid_UI.py | ||
---|---|---|
100 | 100 |
font.setBold(False) |
101 | 101 |
font.setWeight(50) |
102 | 102 |
self.lineEdit_Flowrate_Mass.setFont(font) |
103 |
self.lineEdit_Flowrate_Mass.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) |
|
103 | 104 |
self.lineEdit_Flowrate_Mass.setObjectName("lineEdit_Flowrate_Mass") |
104 | 105 |
self.horizontalLayout_8.addWidget(self.lineEdit_Flowrate_Mass) |
105 | 106 |
self.label_Flowrate_Mass_Unit = QtWidgets.QLabel(self.groupBox_3) |
... | ... | |
130 | 131 |
font.setBold(False) |
131 | 132 |
font.setWeight(50) |
132 | 133 |
self.lineEdit_Flowrate_Volume.setFont(font) |
134 |
self.lineEdit_Flowrate_Volume.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) |
|
133 | 135 |
self.lineEdit_Flowrate_Volume.setObjectName("lineEdit_Flowrate_Volume") |
134 | 136 |
self.horizontalLayout_10.addWidget(self.lineEdit_Flowrate_Volume) |
135 | 137 |
self.label_Flowrate_Volume_Unit = QtWidgets.QLabel(self.groupBox_3) |
... | ... | |
159 | 161 |
font.setBold(False) |
160 | 162 |
font.setWeight(50) |
161 | 163 |
self.lineEdit_Density.setFont(font) |
164 |
self.lineEdit_Density.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) |
|
162 | 165 |
self.lineEdit_Density.setObjectName("lineEdit_Density") |
163 | 166 |
self.horizontalLayout_11.addWidget(self.lineEdit_Density) |
164 | 167 |
self.label_Density_Unit = QtWidgets.QLabel(self.groupBox_3) |
... | ... | |
188 | 191 |
font.setBold(False) |
189 | 192 |
font.setWeight(50) |
190 | 193 |
self.lineEdit_Viscosity.setFont(font) |
194 |
self.lineEdit_Viscosity.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) |
|
191 | 195 |
self.lineEdit_Viscosity.setObjectName("lineEdit_Viscosity") |
192 | 196 |
self.horizontalLayout_12.addWidget(self.lineEdit_Viscosity) |
193 | 197 |
self.label_Viscosity_Unit = QtWidgets.QLabel(self.groupBox_3) |
... | ... | |
228 | 232 |
font.setBold(False) |
229 | 233 |
font.setWeight(50) |
230 | 234 |
self.lineEdit_Limitation_Velocity.setFont(font) |
235 |
self.lineEdit_Limitation_Velocity.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) |
|
231 | 236 |
self.lineEdit_Limitation_Velocity.setObjectName("lineEdit_Limitation_Velocity") |
232 | 237 |
self.horizontalLayout_4.addWidget(self.lineEdit_Limitation_Velocity) |
233 | 238 |
self.label_Velocity_Unit = QtWidgets.QLabel(self.groupBox_2) |
... | ... | |
257 | 262 |
font.setBold(False) |
258 | 263 |
font.setWeight(50) |
259 | 264 |
self.lineEdit_Limitation_Pressure_Drop.setFont(font) |
265 |
self.lineEdit_Limitation_Pressure_Drop.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) |
|
260 | 266 |
self.lineEdit_Limitation_Pressure_Drop.setObjectName("lineEdit_Limitation_Pressure_Drop") |
261 | 267 |
self.horizontalLayout_3.addWidget(self.lineEdit_Limitation_Pressure_Drop) |
262 | 268 |
self.label_DropPressure_Unit = QtWidgets.QLabel(self.groupBox_2) |
... | ... | |
382 | 388 |
font.setBold(False) |
383 | 389 |
font.setWeight(50) |
384 | 390 |
self.lineEdit_Inside_Pipe_Size.setFont(font) |
391 |
self.lineEdit_Inside_Pipe_Size.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) |
|
385 | 392 |
self.lineEdit_Inside_Pipe_Size.setObjectName("lineEdit_Inside_Pipe_Size") |
386 | 393 |
self.horizontalLayout_5.addWidget(self.lineEdit_Inside_Pipe_Size) |
387 | 394 |
self.label_Inside_Pipe_Size_Unit = QtWidgets.QLabel(self.groupBox) |
... | ... | |
442 | 449 |
font.setBold(False) |
443 | 450 |
font.setWeight(50) |
444 | 451 |
self.lineEdit_Straight_Length.setFont(font) |
452 |
self.lineEdit_Straight_Length.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) |
|
445 | 453 |
self.lineEdit_Straight_Length.setObjectName("lineEdit_Straight_Length") |
446 | 454 |
self.horizontalLayout_17.addWidget(self.lineEdit_Straight_Length) |
447 | 455 |
self.label_Straight_Lengh_Unit = QtWidgets.QLabel(self.groupBox) |
... | ... | |
471 | 479 |
font.setBold(False) |
472 | 480 |
font.setWeight(50) |
473 | 481 |
self.lineEdit_Equivalent_Length_Input.setFont(font) |
482 |
self.lineEdit_Equivalent_Length_Input.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) |
|
474 | 483 |
self.lineEdit_Equivalent_Length_Input.setObjectName("lineEdit_Equivalent_Length_Input") |
475 | 484 |
self.horizontalLayout_18.addWidget(self.lineEdit_Equivalent_Length_Input) |
476 | 485 |
self.label_Equivalent_Lenght_Input_Unit = QtWidgets.QLabel(self.groupBox) |
HYTOS/HYTOS/Shapes/EngineeringStreamlineItem.py | ||
---|---|---|
352 | 352 |
self.update() |
353 | 353 |
|
354 | 354 |
def mouseDoubleClickEvent(self, event): |
355 |
from AppDocData import AppDocData |
|
356 |
from MainWindow import MainWindow |
|
357 |
from PhaseTypeDialog import QPhaseTypeDialog |
|
358 |
from HMBTable import HMBTable |
|
359 |
|
|
360 |
dialog = QPhaseTypeDialog() |
|
361 |
selectedPhaseType = dialog.showDialog(self) |
|
362 |
|
|
363 |
if selectedPhaseType: |
|
364 |
if selectedPhaseType == 'Vapor': |
|
365 |
self.show_VaporDialog() |
|
366 |
elif selectedPhaseType == 'Liquid': |
|
367 |
self.show_LiquidDialog() |
|
368 |
elif selectedPhaseType == 'Mixed': |
|
369 |
self.show_MixedDialog() |
|
370 |
|
|
371 |
def show_VaporDialog(self): |
|
372 |
from Phase_VaporDialog import QPhase_VaporDialog |
|
373 |
|
|
374 |
dialog = QPhase_VaporDialog() |
|
375 |
dialog.showDialog(self) |
|
376 |
|
|
377 |
def show_LiquidDialog(self): |
|
378 |
from Phase_LiquidDialog import QPhase_LiquidDialog |
|
355 |
from StreamDataDialog import QStreamDataDialog |
|
379 | 356 |
|
380 |
dialog = QPhase_LiquidDialog()
|
|
357 |
dialog = QStreamDataDialog()
|
|
381 | 358 |
res = dialog.showDialog(self) |
382 | 359 |
if res == True: |
383 | 360 |
self.load_HMB() |
384 |
|
|
385 |
def show_MixedDialog(self): |
|
386 |
from Phase_MixedDialog import QPhase_MixedDialog |
|
387 |
|
|
388 |
dialog = QPhase_MixedDialog() |
|
389 |
dialog.showDialog(self) |
|
390 | 361 |
|
391 | 362 |
def load_HMB(self): |
392 | 363 |
from App import App |
HYTOS/HYTOS/UI/MainWindow.ui | ||
---|---|---|
218 | 218 |
<addaction name="actionLine"/> |
219 | 219 |
<addaction name="actionInitialize"/> |
220 | 220 |
<addaction name="separator"/> |
221 |
<addaction name="actionCalculation"/> |
|
222 |
<addaction name="separator"/> |
|
221 | 223 |
<addaction name="actionZoom"/> |
222 | 224 |
<addaction name="actionFitWindow"/> |
223 | 225 |
</widget> |
... | ... | |
804 | 806 |
</font> |
805 | 807 |
</property> |
806 | 808 |
</action> |
809 |
<action name="actionCalculation"> |
|
810 |
<property name="icon"> |
|
811 |
<iconset resource="../res/Resource.qrc"> |
|
812 |
<normaloff>:/images/Calculation.png</normaloff>:/images/Calculation.png</iconset> |
|
813 |
</property> |
|
814 |
<property name="text"> |
|
815 |
<string/> |
|
816 |
</property> |
|
817 |
<property name="toolTip"> |
|
818 |
<string>Calculation</string> |
|
819 |
</property> |
|
820 |
<property name="font"> |
|
821 |
<font> |
|
822 |
<family>맑은 고딕</family> |
|
823 |
<weight>50</weight> |
|
824 |
<bold>false</bold> |
|
825 |
</font> |
|
826 |
</property> |
|
827 |
</action> |
|
807 | 828 |
</widget> |
808 | 829 |
<resources> |
809 | 830 |
<include location="../res/Resource.qrc"/> |
내보내기 Unified diff