개정판 ee8e0b75
issue #1048: 계산 값이 criteria size 보다 클 경우 배경색을 붉은색으로 설정
Change-Id: I2394e7cc37713ecd66c820c917a35b42a9ccd158
HYTOS/HYTOS/HMBTable.py | ||
---|---|---|
464 | 464 |
def input_flowrate_type(self, value): |
465 | 465 |
self._input_flowrate_type = str(value) |
466 | 466 |
|
467 |
@property |
|
468 |
def is_over_criteria(self): |
|
469 |
pressure_drop, limitation_pressure_drop = self.pressure_drop, self.limitation_pressure_drop |
|
470 |
velocity, limitation_velocity = self.velocity, self.limitation_velocity |
|
471 |
|
|
472 |
return type(pressure_drop) is float and type(limitation_pressure_drop) is float and \ |
|
473 |
type(velocity) is float and type(limitation_velocity) is float and \ |
|
474 |
(self.pressure_drop > self.limitation_pressure_drop or self.velocity > self.limitation_velocity) |
|
467 | 475 |
|
468 | 476 |
def fromRow(row): |
469 | 477 |
hmb = HMBData() |
HYTOS/HYTOS/MainWindow.py | ||
---|---|---|
2762 | 2762 |
self.tableWidgetHMB.clearContents() |
2763 | 2763 |
self.tableWidgetHMB.setColumnCount(0) |
2764 | 2764 |
|
2765 |
def load_HMB(self): |
|
2765 |
def load_HMB(self) -> None:
|
|
2766 | 2766 |
""" |
2767 | 2767 |
display hmb data to table widget |
2768 | 2768 |
@return: |
... | ... | |
2918 | 2918 |
if hmb.isDeleted: |
2919 | 2919 |
self.tableWidgetHMB.hideColumn(columnCount) |
2920 | 2920 |
|
2921 |
# mark if velocity or pressure drop is over criteria value |
|
2922 |
if hmb.is_over_criteria: |
|
2923 |
rows = model.rowCount() |
|
2924 |
for row in range(rows): |
|
2925 |
item = model.item(row, columnCount) |
|
2926 |
item.setBackground(Qt.red) |
|
2927 |
# up to here |
|
2928 |
|
|
2921 | 2929 |
model.setHorizontalHeaderLabels(col_names) |
2922 | 2930 |
self.tableWidgetHMB.setModel(model) |
2923 | 2931 |
|
내보내기 Unified diff