개정판 d0cbcc5a
revised issue #587:
- 방향키로 아이템 이동
DTI_PID/DTI_PID/ResultTreeWidget.py | ||
---|---|---|
59 | 59 |
self.imageViewer.scene.removeItem(data) |
60 | 60 |
item.parent().removeChild(item) |
61 | 61 |
event.accept() |
62 |
elif event.key() == Qt.Key_Up: |
|
63 |
if self.selectedItems(): |
|
64 |
item = self.selectedItems()[0] |
|
65 |
aboveItem = self.itemAbove(item) |
|
66 |
if aboveItem is not None: |
|
67 |
self.setCurrentItem(aboveItem) |
|
68 |
self.scrollToItem(aboveItem, QAbstractItemView.EnsureVisible) |
|
69 |
self.itemClickEvent(aboveItem, 0) |
|
70 |
event.accept() |
|
71 |
elif event.key() == Qt.Key_Down: |
|
72 |
if self.selectedItems(): |
|
73 |
item = self.selectedItems()[0] |
|
74 |
belowItem = self.itemBelow(item) |
|
75 |
if belowItem is not None: |
|
76 |
self.setCurrentItem(belowItem) |
|
77 |
self.scrollToItem(belowItem, QAbstractItemView.EnsureVisible) |
|
78 |
self.itemClickEvent(belowItem, 0) |
|
79 |
event.accept() |
|
62 | 80 |
else: |
63 | 81 |
event.ignore() |
64 | 82 |
except Exception as ex: |
... | ... | |
360 | 378 |
18.05.10 Jeongwoo Add lineNoSingleClicked emit |
361 | 379 |
humkyung 2018.07.07 emit singleClicked signal when user click drawing name |
362 | 380 |
''' |
363 |
lastClickedItem = None |
|
364 | 381 |
def itemClickEvent(self, item, columnNo, isSvgClick = False): |
365 | 382 |
from Drawing import Drawing |
366 | 383 |
from QEngineeringRunItem import QEngineeringRunItem |
내보내기 Unified diff