프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

hytos / DTI_PID / DTI_PID / Commands / FlipImageCommand.py @ 94092f45

이력 | 보기 | 이력해설 | 다운로드 (1.31 KB)

1
import os.path
2
import AbstractCommand
3
try:
4
    from PyQt5.QtCore import Qt, QPoint, QPointF, QRectF, pyqtSignal, QT_VERSION_STR, QBuffer, QRect, QRegExp
5
    from PyQt5.QtGui import QImage, QPixmap, QPainterPath, QPainter, QColor, QPen, QBrush, QCursor, QTransform, QFont, QRegExpValidator, QValidator
6
    from PyQt5.QtWidgets import QGraphicsView, QGraphicsScene, QFileDialog, QMessageBox
7
except ImportError:
8
    try:
9
        from PyQt4.QtCore import Qt, QPoint, QPointF, QRectF, pyqtSignal, QT_VERSION_STR, QBuffer, QRect, QRegExp
10
        from PyQt4.QtGui import QGraphicsView, QGraphicsScene, QImage, QPixmap, QPainterPath, QFileDialog, QPainter, QColor, QPen, QBrush, QCursor, QTransform, QFont, QRegExpValidator, QValidator
11
    except ImportError:
12
        raise ImportError("ImageViewerQt: Requires PyQt5 or PyQt4.")
13

    
14
class FlipImageCommand(AbstractCommand.AbstractCommand):
15
    '''
16
        @history    2018.05.09  Jeongwoo    Draw Rect on ±1 area
17
    '''
18
    def __init__(self, imageViewer, horizontal = False, vertical = True):
19
        super(FlipImageCommand, self).__init__(imageViewer)
20
        image = imageViewer.image().mirrored(horizontal = horizontal, vertical = vertical)
21
        imageViewer.setImage(image)
22
    
23
    def execute(self, param):
24
        pass
25

    
26
    def undo(self):
27
        pass
28

    
29
    def redo(self):
30
        pass
클립보드 이미지 추가 (최대 크기: 500 MB)