개정판 b8c5dceb
MainWindow의 OCR 메뉴를 Checkable 버튼으로 변경 / Default Command 시 마우스 커서모양 변경
DTI_PID/DTI_PID/Commands/DefaultCommand.py | ||
---|---|---|
15 | 15 |
@brief QtImageViewer Default Command |
16 | 16 |
@author Jeongwoo |
17 | 17 |
@date 18.04.10 |
18 |
@history .
|
|
18 |
@history 2018.05.02 Jeongwoo Change mouse cursor
|
|
19 | 19 |
''' |
20 | 20 |
class DefaultCommand(AbstractCommand.AbstractCommand): |
21 | 21 |
def __init__(self, imageViewer): |
22 | 22 |
super(DefaultCommand, self).__init__(imageViewer) |
23 | 23 |
self.name = 'Default' |
24 |
#self.imageViewer.setCursor(QCursor(Qt.OpenHandCursor))
|
|
24 |
self.imageViewer.setCursor(QCursor(Qt.ArrowCursor))
|
|
25 | 25 |
|
26 | 26 |
''' |
27 | 27 |
@brief Scroll / Pan / Zoom with Wheel Button |
DTI_PID/DTI_PID/DTI_PID_UI.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 | |
3 |
# Form implementation generated from reading ui file 'ui/DTI__PID.ui'
|
|
3 |
# Form implementation generated from reading ui file 'DTI__PID.ui' |
|
4 | 4 |
# |
5 |
# Created by: PyQt5 UI code generator 5.10.1
|
|
5 |
# Created by: PyQt5 UI code generator 5.6
|
|
6 | 6 |
# |
7 | 7 |
# WARNING! All changes made in this file will be lost! |
8 | 8 | |
... | ... | |
49 | 49 |
self.dockWidgetContents = QtWidgets.QWidget() |
50 | 50 |
self.dockWidgetContents.setObjectName("dockWidgetContents") |
51 | 51 |
self.gridLayout_2 = QtWidgets.QGridLayout(self.dockWidgetContents) |
52 |
self.gridLayout_2.setContentsMargins(0, 0, 0, 0) |
|
52 | 53 |
self.gridLayout_2.setObjectName("gridLayout_2") |
53 | 54 |
self.tabWidget = QtWidgets.QTabWidget(self.dockWidgetContents) |
54 | 55 |
self.tabWidget.setObjectName("tabWidget") |
55 | 56 |
self.Symbol = QtWidgets.QWidget() |
56 | 57 |
self.Symbol.setObjectName("Symbol") |
57 | 58 |
self.gridLayout_3 = QtWidgets.QGridLayout(self.Symbol) |
59 |
self.gridLayout_3.setContentsMargins(0, 0, 0, 0) |
|
58 | 60 |
self.gridLayout_3.setObjectName("gridLayout_3") |
59 | 61 |
self.symbolTabVerticalLayout = QtWidgets.QVBoxLayout() |
60 | 62 |
self.symbolTabVerticalLayout.setObjectName("symbolTabVerticalLayout") |
... | ... | |
73 | 75 |
self.dockWidgetContents_2 = QtWidgets.QWidget() |
74 | 76 |
self.dockWidgetContents_2.setObjectName("dockWidgetContents_2") |
75 | 77 |
self.gridLayout_4 = QtWidgets.QGridLayout(self.dockWidgetContents_2) |
78 |
self.gridLayout_4.setContentsMargins(0, 0, 0, 0) |
|
76 | 79 |
self.gridLayout_4.setObjectName("gridLayout_4") |
77 | 80 |
self.symbolExplorerVerticalLayout = QtWidgets.QVBoxLayout() |
78 | 81 |
self.symbolExplorerVerticalLayout.setObjectName("symbolExplorerVerticalLayout") |
... | ... | |
117 | 120 |
self.actionArea = QtWidgets.QAction(MainWindow) |
118 | 121 |
self.actionArea.setObjectName("actionArea") |
119 | 122 |
self.actionOCR = QtWidgets.QAction(MainWindow) |
123 |
self.actionOCR.setCheckable(True) |
|
120 | 124 |
self.actionOCR.setObjectName("actionOCR") |
121 | 125 |
self.actionLineRecognition = QtWidgets.QAction(MainWindow) |
122 | 126 |
self.actionLineRecognition.setObjectName("actionLineRecognition") |
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
133 | 133 |
@brief Area OCR |
134 | 134 |
@author Jeongwoo |
135 | 135 |
@date 18.04.18 |
136 |
@history .
|
|
136 |
@history 2018.05.02 Jeongwoo Change graphicsView.command by actionOCR checked state
|
|
137 | 137 |
''' |
138 | 138 |
def areaOcr(self): |
139 |
self.graphicsView.command = AreaOcrCommand.AreaOcrCommand(self.graphicsView) |
|
139 |
if self.actionOCR.isChecked(): |
|
140 |
self.graphicsView.command = AreaOcrCommand.AreaOcrCommand(self.graphicsView) |
|
141 |
else: |
|
142 |
self.graphicsView.useDefaultCommand() |
|
140 | 143 |
|
141 | 144 |
''' |
142 | 145 |
@brief area configuration |
DTI_PID/DTI_PID/UI/DTI__PID.ui | ||
---|---|---|
239 | 239 |
</property> |
240 | 240 |
</action> |
241 | 241 |
<action name="actionOCR"> |
242 |
<property name="checkable"> |
|
243 |
<bool>true</bool> |
|
244 |
</property> |
|
242 | 245 |
<property name="text"> |
243 | 246 |
<string>OCR</string> |
244 | 247 |
</property> |
내보내기 Unified diff