개정판 9df87872
add symbol list highlight
Change-Id: Ic0ac09e255ca6c58c6928b1f8a237cd993182c71
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
355 | 355 |
self.current_pos = self.graphicsView.mapToScene(event.pos()) |
356 | 356 |
self._label_mouse.setText( |
357 | 357 |
'Cursor : ({},{})'.format(round(self.current_pos.x()), round(self.current_pos.y()))) |
358 |
if self.symbolListTreeWidget.preSymbol: |
|
359 |
self.symbolListTreeWidget.preSymbol.highlight(False) |
|
360 |
self.symbolListTreeWidget.preSymbol = None |
|
358 | 361 |
except Exception as ex: |
359 | 362 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
360 | 363 |
sys.exc_info()[-1].tb_lineno) |
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
1051 | 1051 |
@date 2018.08.27 |
1052 | 1052 |
''' |
1053 | 1053 |
def setHightlight(self): |
1054 |
"""no more used""" |
|
1054 | 1055 |
self.setColor('url(#hover)') |
1055 | 1056 |
self.update() |
1056 | 1057 |
|
... | ... | |
1060 | 1061 |
@date 2018.08.27 |
1061 | 1062 |
''' |
1062 | 1063 |
def unsetHightlight(self): |
1064 |
"""no more used""" |
|
1063 | 1065 |
self.setColor('url(#normal)') |
1064 | 1066 |
self.update() |
1065 | 1067 |
|
DTI_PID/DTI_PID/SymbolListTreeWidget.py | ||
---|---|---|
72 | 72 |
self.root = None |
73 | 73 |
self.setContextMenuPolicy(Qt.CustomContextMenu) |
74 | 74 |
self.customContextMenuRequested.connect(self.openContextMenu) |
75 |
self.preSymbol = None |
|
75 | 76 |
|
76 | 77 |
''' |
77 | 78 |
@brief delete selected symbol |
... | ... | |
284 | 285 |
|
285 | 286 |
def initResultTreeWidget(self, items): |
286 | 287 |
removeItems = [] |
288 |
self.preSymbol = None |
|
287 | 289 |
|
288 | 290 |
for index in range(self.SymbolsTreeItem.childCount()): |
289 | 291 |
item = self.SymbolsTreeItem.child(index) |
... | ... | |
321 | 323 |
from EngineeringRunItem import QEngineeringRunItem |
322 | 324 |
from HighlightCommand import HighlightCommand |
323 | 325 |
|
324 |
hilightColor = QColor(255, 0, 0, 127) |
|
326 |
#hilightColor = QColor(255, 0, 0, 127)
|
|
325 | 327 |
|
326 | 328 |
itemData = item.data(0, self.TREE_DATA_ROLE) |
327 | 329 |
|
330 |
if self.preSymbol: |
|
331 |
self.preSymbol.highlight(False) |
|
332 |
|
|
328 | 333 |
if itemData is not None: ## Not PID Name |
329 | 334 |
if issubclass(type(itemData), SymbolSvgItem) or type(itemData) is QEngineeringVendorItem: |
330 | 335 |
HighlightCommand(self.imageViewer).execute(itemData) |
336 |
itemData.highlight(True) |
|
337 |
self.preSymbol = itemData |
|
331 | 338 |
|
332 | 339 |
''' |
333 | 340 |
@brief find item which has data is given item |
내보내기 Unified diff