개정판 156dae38
issue #578: add Highlight Command
DTI_PID/DTI_PID/Commands/HighlightCommand.py | ||
---|---|---|
1 |
import os.path |
|
2 |
import AbstractCommand |
|
3 |
try: |
|
4 |
from PyQt5.QtCore import * |
|
5 |
from PyQt5.QtGui import * |
|
6 |
from PyQt5.QtWidgets import * |
|
7 |
except ImportError: |
|
8 |
try: |
|
9 |
from PyQt4.QtCore import Qt, QRectF, pyqtSignal, QT_VERSION_STR |
|
10 |
from PyQt4.QtGui import QGraphicsView, QGraphicsScene, QImage, QPixmap, QPainterPath, QFileDialog, QCursor |
|
11 |
except ImportError: |
|
12 |
raise ImportError("ImageViewerQt: Requires PyQt5 or PyQt4.") |
|
13 |
from GraphicsBoundingBoxItem import QGraphicsBoundingBoxItem |
|
14 |
|
|
15 |
class HighlightCommand(AbstractCommand.AbstractCommand): |
|
16 |
onSuccess = pyqtSignal(float, float, float, float) |
|
17 |
|
|
18 |
def __init__(self, imageViewer): |
|
19 |
super(HighlightCommand, self).__init__(imageViewer) |
|
20 |
self.name = 'Highlight' |
|
21 |
|
|
22 |
''' |
|
23 |
@brief highlight items selected by user |
|
24 |
''' |
|
25 |
def execute(self, param): |
|
26 |
self.isTreated = False |
|
27 |
|
|
28 |
def undo(self): |
|
29 |
pass |
|
30 |
|
|
31 |
def redo(self): |
|
32 |
pass |
내보내기 Unified diff