개정판 43f6ca32
issue #000: equip color
Change-Id: Ied90cc8c9182ae9e6afe16a14128fea87c915b2e
DTI_PID/DTI_PID/AppDocData.py | ||
---|---|---|
3092 | 3092 |
cursor = conn.execute('select * from {}'.format(table)) |
3093 | 3093 |
res = [col_name[0] for col_name in cursor.description] |
3094 | 3094 |
|
3095 |
if table == 'EQUIPMET_DATA_LIST'or table == 'VALVE_DATA_LIST': |
|
3095 |
if table == 'EQUIPMET_DATA_LIST' or table == 'VALVE_DATA_LIST':
|
|
3096 | 3096 |
sql = 'select distinct c.Attribute from {} a left join Attributes b on a.uid=b.Components_UID ' \ |
3097 | 3097 |
'left join SymbolAttribute c on b.SymbolAttribute_UID=c.UID where c.Attribute is not NULL'.format(table) |
3098 | 3098 |
cursor = conn.execute(sql) |
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
123 | 123 |
layout = QVBoxLayout() |
124 | 124 |
self._by_line_no = QRadioButton() |
125 | 125 |
self._by_line_no.setChecked(True) |
126 |
self._by_line_no.setText('By Line No')
|
|
126 |
self._by_line_no.setText('By Group')
|
|
127 | 127 |
self._by_line_no.toggled.connect(self.display_colors) |
128 | 128 |
layout.addWidget(self._by_line_no) |
129 | 129 |
self._by_line_type = QRadioButton() |
DTI_PID/DTI_PID/Shapes/EngineeringEquipmentItem.py | ||
---|---|---|
123 | 123 |
from EngineeringAbstractItem import QEngineeringAbstractItem |
124 | 124 |
from EngineeringLineItem import QEngineeringLineItem |
125 | 125 |
|
126 |
if DisplayOptions.DisplayByLineType == DisplayColors.instance().option: |
|
127 |
if self.hover:
|
|
128 |
return SymbolSvgItem.HOVER_COLOR
|
|
129 |
elif not QEngineeringEquipmentItem.EQUIP_COLOR:
|
|
130 |
app_doc_data = AppDocData.instance()
|
|
131 |
configs = app_doc_data.getConfigs('Equipment', 'Color')
|
|
132 |
QEngineeringEquipmentItem.EQUIP_COLOR = configs[0].value if configs else QEngineeringAbstractItem.DEFAULT_COLOR
|
|
133 |
|
|
134 |
return QEngineeringEquipmentItem.EQUIP_COLOR
|
|
135 |
else: |
|
136 |
return SymbolSvgItem.getColor(self) |
|
126 |
#if DisplayOptions.DisplayByLineType == DisplayColors.instance().option:
|
|
127 |
if self.hover: |
|
128 |
return SymbolSvgItem.HOVER_COLOR |
|
129 |
elif not QEngineeringEquipmentItem.EQUIP_COLOR: |
|
130 |
app_doc_data = AppDocData.instance() |
|
131 |
configs = app_doc_data.getConfigs('Equipment', 'Color') |
|
132 |
QEngineeringEquipmentItem.EQUIP_COLOR = configs[0].value if configs else QEngineeringAbstractItem.DEFAULT_COLOR |
|
133 |
|
|
134 |
return QEngineeringEquipmentItem.EQUIP_COLOR |
|
135 |
#else:
|
|
136 |
# return SymbolSvgItem.getColor(self)
|
|
137 | 137 |
|
138 | 138 |
''' |
139 | 139 |
@brief get attributes |
내보내기 Unified diff