개정판 4ca2299d
issue #1054 : 스트림 데이타 입력 : Roughness 추가
Change-Id: I42eed74cb7f38842715c05601748c32b8f846418
HYTOS/HYTOS/MainWindow.py | ||
---|---|---|
830 | 830 |
try: |
831 | 831 |
count = len(self.actionLine.tag.streamline._vertices) |
832 | 832 |
if count > 1: |
833 |
self.insert_HMB()
|
|
833 |
self.add_HMB()
|
|
834 | 834 |
self.load_HMB() |
835 | 835 |
|
836 | 836 |
finally: |
837 | 837 |
self.actionLine.tag.reset() |
838 | 838 |
|
839 |
def insert_HMB(self):
|
|
839 |
def add_HMB(self):
|
|
840 | 840 |
from HMBTable import HMBTable |
841 | 841 |
import uuid |
842 | 842 |
|
... | ... | |
845 | 845 |
components_uid = self.actionLine.tag.streamline.uid |
846 | 846 |
stream_no = self.getNextStreamNo(drawing) |
847 | 847 |
|
848 |
drawing.hmbTable.insert(components_uid, stream_no) |
|
849 |
|
|
850 |
|
|
851 |
#hmb = HMBTable.new_data() |
|
852 |
#hmb.uid = str(uuid.uuid4()) |
|
853 |
#hmb.components_uid = self.actionLine.tag.streamline.uid |
|
854 |
#hmb.stream_no = self.getNextStreamNo(drawing) |
|
855 |
#drawing.hmbTable.append(hmb) |
|
848 |
drawing.hmbTable.add(components_uid, stream_no) |
|
856 | 849 |
|
857 | 850 |
def getNextStreamNo(self, drawing): |
858 | 851 |
|
... | ... | |
884 | 877 |
self.tableWidgetHMB.setItem(1, columnCount, self.setTableWidgetItemProperties(hmb.components_uid, Qt.AlignHCenter | Qt.AlignVCenter)) |
885 | 878 |
self.tableWidgetHMB.setItem(2, columnCount, self.setTableWidgetItemProperties(hmb.stream_no, Qt.AlignHCenter | Qt.AlignVCenter)) |
886 | 879 |
self.tableWidgetHMB.setItem(3, columnCount, self.setTableWidgetItemProperties(hmb.phase_type, Qt.AlignHCenter | Qt.AlignVCenter)) |
880 |
self.tableWidgetHMB.setItem(4, columnCount, self.setTableWidgetItemProperties(hmb.flowrate_mass, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
881 |
self.tableWidgetHMB.setItem(5, columnCount, self.setTableWidgetItemProperties(hmb.flowrate_volume, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
882 |
self.tableWidgetHMB.setItem(6, columnCount, self.setTableWidgetItemProperties(hmb.density, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
883 |
self.tableWidgetHMB.setItem(7, columnCount, self.setTableWidgetItemProperties(hmb.viscosity, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
884 |
self.tableWidgetHMB.setItem(8, columnCount, self.setTableWidgetItemProperties(hmb.temperature, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
885 |
self.tableWidgetHMB.setItem(9, columnCount, self.setTableWidgetItemProperties(hmb.molecular_weight, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
886 |
self.tableWidgetHMB.setItem(10, columnCount, self.setTableWidgetItemProperties(hmb.specific_heat_ratio, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
887 |
self.tableWidgetHMB.setItem(11, columnCount, self.setTableWidgetItemProperties(hmb.compress_factor, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
888 |
self.tableWidgetHMB.setItem(12, columnCount, self.setTableWidgetItemProperties(hmb.nominal_pipe_size, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
889 |
self.tableWidgetHMB.setItem(13, columnCount, self.setTableWidgetItemProperties(hmb.inside_pipe_size, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
890 |
self.tableWidgetHMB.setItem(14, columnCount, self.setTableWidgetItemProperties(hmb.schedul_no, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
891 |
self.tableWidgetHMB.setItem(15, columnCount, self.setTableWidgetItemProperties(hmb.straight_length, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
892 |
self.tableWidgetHMB.setItem(16, columnCount, self.setTableWidgetItemProperties(hmb.equivalent_length, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
893 |
self.tableWidgetHMB.setItem(17, columnCount, self.setTableWidgetItemProperties(hmb.roughness, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
894 |
self.tableWidgetHMB.setItem(18, columnCount, self.setTableWidgetItemProperties(hmb.limitation_velocity, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
895 |
self.tableWidgetHMB.setItem(19, columnCount, self.setTableWidgetItemProperties(hmb.limitation_pressure_drop, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
896 |
self.tableWidgetHMB.setItem(20, columnCount, self.setTableWidgetItemProperties(hmb.velocity, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
897 |
self.tableWidgetHMB.setItem(21, columnCount, self.setTableWidgetItemProperties(hmb.reynolds, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
898 |
self.tableWidgetHMB.setItem(22, columnCount, self.setTableWidgetItemProperties(hmb.friction_factor, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
899 |
self.tableWidgetHMB.setItem(23, columnCount, self.setTableWidgetItemProperties(hmb.pressure_drop, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
900 |
self.tableWidgetHMB.setItem(24, columnCount, self.setTableWidgetItemProperties(hmb.pressure_drop_friction, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
901 |
self.tableWidgetHMB.setItem(25, columnCount, self.setTableWidgetItemProperties(hmb.pressure_drop_static, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
902 |
self.tableWidgetHMB.setItem(26, columnCount, self.setTableWidgetItemProperties(hmb.pressure_pipe_end_point, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
903 |
self.tableWidgetHMB.setItem(27, columnCount, self.setTableWidgetItemProperties(hmb.power, Qt.AlignHCenter | Qt.AlignVCenter)) |
|
904 |
|
|
887 | 905 |
|
888 | 906 |
|
889 | 907 |
''' |
... | ... | |
1099 | 1117 |
return itemList |
1100 | 1118 |
|
1101 | 1119 |
def setTableWidgetItemProperties(self, name, alignment, color = None): |
1120 |
if name is None: |
|
1121 |
name = '' |
|
1102 | 1122 |
|
1103 | 1123 |
item = QTableWidgetItem(str(name)) |
1104 | 1124 |
item.setTextAlignment(alignment) |
내보내기 Unified diff