개정판 22130dab
QOcrResultDialog ButtonBox 위치가 하단에 정상적으로 표시되도록 수정
DTI_PID/DTI_PID/QOcrResultDialog.py | ||
---|---|---|
32 | 32 |
self.graphicsView.useDefaultCommand() ##### USE DEFAULT COMMAND |
33 | 33 |
self.graphicsView.setImage(self.image) |
34 | 34 |
self.ui.tVerticalLayout_2.addWidget(self.graphicsView) |
35 |
|
|
36 |
splitter = QSplitter(Qt.Vertical) |
|
37 |
splitter.addWidget(self.ui.topFrame) |
|
38 |
splitter.addWidget(self.ui.bottomFrame) |
|
39 |
self.ui.gridLayout.addWidget(splitter) |
|
40 | 35 |
|
41 | 36 |
self.ui.counterClockPushButton_2.clicked.connect(lambda : self.rotateImage(True)) |
42 | 37 |
self.ui.clockPushButton_2.clicked.connect(lambda : self.rotateImage(False)) |
DTI_PID/DTI_PID/UI/OcrResultDialog.ui | ||
---|---|---|
19 | 19 |
<property name="windowTitle"> |
20 | 20 |
<string>OCR</string> |
21 | 21 |
</property> |
22 |
<layout class="QGridLayout" name="gridLayout"> |
|
23 |
<item row="2" column="0">
|
|
24 |
<widget class="QDialogButtonBox" name="ocrDialogButtonBox">
|
|
22 |
<layout class="QGridLayout" name="gridLayout_2">
|
|
23 |
<item row="0" column="0">
|
|
24 |
<widget class="QSplitter" name="splitter">
|
|
25 | 25 |
<property name="orientation"> |
26 |
<enum>Qt::Horizontal</enum> |
|
27 |
</property> |
|
28 |
<property name="standardButtons"> |
|
29 |
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> |
|
26 |
<enum>Qt::Vertical</enum> |
|
30 | 27 |
</property> |
28 |
<widget class="QWidget" name="topWidget" native="true"> |
|
29 |
<property name="minimumSize"> |
|
30 |
<size> |
|
31 |
<width>0</width> |
|
32 |
<height>150</height> |
|
33 |
</size> |
|
34 |
</property> |
|
35 |
<layout class="QVBoxLayout" name="verticalLayout_2"> |
|
36 |
<item> |
|
37 |
<layout class="QVBoxLayout" name="tVerticalLayout_2"> |
|
38 |
<item> |
|
39 |
<layout class="QHBoxLayout" name="horizontalLayout"> |
|
40 |
<property name="leftMargin"> |
|
41 |
<number>8</number> |
|
42 |
</property> |
|
43 |
<property name="topMargin"> |
|
44 |
<number>8</number> |
|
45 |
</property> |
|
46 |
<property name="rightMargin"> |
|
47 |
<number>8</number> |
|
48 |
</property> |
|
49 |
<property name="bottomMargin"> |
|
50 |
<number>8</number> |
|
51 |
</property> |
|
52 |
<item> |
|
53 |
<widget class="QLabel" name="targetTextLabel_2"> |
|
54 |
<property name="font"> |
|
55 |
<font> |
|
56 |
<weight>75</weight> |
|
57 |
<bold>true</bold> |
|
58 |
</font> |
|
59 |
</property> |
|
60 |
<property name="text"> |
|
61 |
<string>검출 대상</string> |
|
62 |
</property> |
|
63 |
</widget> |
|
64 |
</item> |
|
65 |
<item> |
|
66 |
<widget class="QPushButton" name="counterClockPushButton_2"> |
|
67 |
<property name="minimumSize"> |
|
68 |
<size> |
|
69 |
<width>0</width> |
|
70 |
<height>60</height> |
|
71 |
</size> |
|
72 |
</property> |
|
73 |
<property name="maximumSize"> |
|
74 |
<size> |
|
75 |
<width>150</width> |
|
76 |
<height>60</height> |
|
77 |
</size> |
|
78 |
</property> |
|
79 |
<property name="text"> |
|
80 |
<string>CounterClock</string> |
|
81 |
</property> |
|
82 |
</widget> |
|
83 |
</item> |
|
84 |
<item> |
|
85 |
<widget class="QPushButton" name="clockPushButton_2"> |
|
86 |
<property name="minimumSize"> |
|
87 |
<size> |
|
88 |
<width>0</width> |
|
89 |
<height>60</height> |
|
90 |
</size> |
|
91 |
</property> |
|
92 |
<property name="maximumSize"> |
|
93 |
<size> |
|
94 |
<width>150</width> |
|
95 |
<height>60</height> |
|
96 |
</size> |
|
97 |
</property> |
|
98 |
<property name="text"> |
|
99 |
<string>Clock</string> |
|
100 |
</property> |
|
101 |
</widget> |
|
102 |
</item> |
|
103 |
<item> |
|
104 |
<widget class="QPushButton" name="redetectPushButton_2"> |
|
105 |
<property name="minimumSize"> |
|
106 |
<size> |
|
107 |
<width>0</width> |
|
108 |
<height>60</height> |
|
109 |
</size> |
|
110 |
</property> |
|
111 |
<property name="maximumSize"> |
|
112 |
<size> |
|
113 |
<width>150</width> |
|
114 |
<height>60</height> |
|
115 |
</size> |
|
116 |
</property> |
|
117 |
<property name="text"> |
|
118 |
<string>Re-Detect</string> |
|
119 |
</property> |
|
120 |
</widget> |
|
121 |
</item> |
|
122 |
</layout> |
|
123 |
</item> |
|
124 |
</layout> |
|
125 |
</item> |
|
126 |
</layout> |
|
127 |
</widget> |
|
128 |
<widget class="QWidget" name="bottomWidget" native="true"> |
|
129 |
<property name="minimumSize"> |
|
130 |
<size> |
|
131 |
<width>0</width> |
|
132 |
<height>150</height> |
|
133 |
</size> |
|
134 |
</property> |
|
135 |
<layout class="QVBoxLayout" name="verticalLayout_4"> |
|
136 |
<item> |
|
137 |
<layout class="QVBoxLayout" name="detectResultVerticalLayout_2"> |
|
138 |
<property name="leftMargin"> |
|
139 |
<number>8</number> |
|
140 |
</property> |
|
141 |
<property name="topMargin"> |
|
142 |
<number>8</number> |
|
143 |
</property> |
|
144 |
<property name="rightMargin"> |
|
145 |
<number>8</number> |
|
146 |
</property> |
|
147 |
<property name="bottomMargin"> |
|
148 |
<number>8</number> |
|
149 |
</property> |
|
150 |
<item> |
|
151 |
<widget class="QLabel" name="detectResultLabel_2"> |
|
152 |
<property name="font"> |
|
153 |
<font> |
|
154 |
<weight>75</weight> |
|
155 |
<bold>true</bold> |
|
156 |
</font> |
|
157 |
</property> |
|
158 |
<property name="text"> |
|
159 |
<string>검출 결과</string> |
|
160 |
</property> |
|
161 |
</widget> |
|
162 |
</item> |
|
163 |
<item> |
|
164 |
<widget class="QTextEdit" name="detectResultTextEdit_2"/> |
|
165 |
</item> |
|
166 |
</layout> |
|
167 |
</item> |
|
168 |
</layout> |
|
169 |
</widget> |
|
31 | 170 |
</widget> |
32 | 171 |
</item> |
33 | 172 |
<item row="1" column="0"> |
34 |
<widget class="QWidget" name="bottomWidget" native="true"> |
|
35 |
<property name="minimumSize"> |
|
36 |
<size> |
|
37 |
<width>0</width> |
|
38 |
<height>100</height> |
|
39 |
</size> |
|
173 |
<widget class="QDialogButtonBox" name="ocrDialogButtonBox"> |
|
174 |
<property name="orientation"> |
|
175 |
<enum>Qt::Horizontal</enum> |
|
40 | 176 |
</property> |
41 |
<layout class="QVBoxLayout" name="verticalLayout_4"> |
|
42 |
<item> |
|
43 |
<layout class="QVBoxLayout" name="detectResultVerticalLayout_2"> |
|
44 |
<item> |
|
45 |
<widget class="QLabel" name="detectResultLabel_2"> |
|
46 |
<property name="font"> |
|
47 |
<font> |
|
48 |
<weight>75</weight> |
|
49 |
<bold>true</bold> |
|
50 |
</font> |
|
51 |
</property> |
|
52 |
<property name="text"> |
|
53 |
<string>검출 결과</string> |
|
54 |
</property> |
|
55 |
</widget> |
|
56 |
</item> |
|
57 |
<item> |
|
58 |
<widget class="QTextEdit" name="detectResultTextEdit_2"/> |
|
59 |
</item> |
|
60 |
</layout> |
|
61 |
</item> |
|
62 |
</layout> |
|
63 |
</widget> |
|
64 |
</item> |
|
65 |
<item row="0" column="0"> |
|
66 |
<widget class="QWidget" name="topWidget" native="true"> |
|
67 |
<property name="minimumSize"> |
|
68 |
<size> |
|
69 |
<width>0</width> |
|
70 |
<height>100</height> |
|
71 |
</size> |
|
177 |
<property name="standardButtons"> |
|
178 |
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> |
|
72 | 179 |
</property> |
73 |
<layout class="QVBoxLayout" name="verticalLayout_2"> |
|
74 |
<item> |
|
75 |
<layout class="QVBoxLayout" name="tVerticalLayout_2"> |
|
76 |
<item> |
|
77 |
<widget class="QWidget" name="targetToolsWidget_2" native="true"> |
|
78 |
<layout class="QVBoxLayout" name="verticalLayout"> |
|
79 |
<item> |
|
80 |
<layout class="QHBoxLayout" name="horizontalLayout"> |
|
81 |
<item> |
|
82 |
<widget class="QLabel" name="targetTextLabel_2"> |
|
83 |
<property name="font"> |
|
84 |
<font> |
|
85 |
<weight>75</weight> |
|
86 |
<bold>true</bold> |
|
87 |
</font> |
|
88 |
</property> |
|
89 |
<property name="text"> |
|
90 |
<string>검출 대상</string> |
|
91 |
</property> |
|
92 |
</widget> |
|
93 |
</item> |
|
94 |
<item> |
|
95 |
<widget class="QPushButton" name="counterClockPushButton_2"> |
|
96 |
<property name="minimumSize"> |
|
97 |
<size> |
|
98 |
<width>0</width> |
|
99 |
<height>40</height> |
|
100 |
</size> |
|
101 |
</property> |
|
102 |
<property name="maximumSize"> |
|
103 |
<size> |
|
104 |
<width>150</width> |
|
105 |
<height>40</height> |
|
106 |
</size> |
|
107 |
</property> |
|
108 |
<property name="text"> |
|
109 |
<string>CounterClock</string> |
|
110 |
</property> |
|
111 |
</widget> |
|
112 |
</item> |
|
113 |
<item> |
|
114 |
<widget class="QPushButton" name="clockPushButton_2"> |
|
115 |
<property name="minimumSize"> |
|
116 |
<size> |
|
117 |
<width>0</width> |
|
118 |
<height>40</height> |
|
119 |
</size> |
|
120 |
</property> |
|
121 |
<property name="maximumSize"> |
|
122 |
<size> |
|
123 |
<width>150</width> |
|
124 |
<height>40</height> |
|
125 |
</size> |
|
126 |
</property> |
|
127 |
<property name="text"> |
|
128 |
<string>Clock</string> |
|
129 |
</property> |
|
130 |
</widget> |
|
131 |
</item> |
|
132 |
<item> |
|
133 |
<widget class="QPushButton" name="redetectPushButton_2"> |
|
134 |
<property name="minimumSize"> |
|
135 |
<size> |
|
136 |
<width>0</width> |
|
137 |
<height>40</height> |
|
138 |
</size> |
|
139 |
</property> |
|
140 |
<property name="maximumSize"> |
|
141 |
<size> |
|
142 |
<width>150</width> |
|
143 |
<height>40</height> |
|
144 |
</size> |
|
145 |
</property> |
|
146 |
<property name="text"> |
|
147 |
<string>Re-Detect</string> |
|
148 |
</property> |
|
149 |
</widget> |
|
150 |
</item> |
|
151 |
</layout> |
|
152 |
</item> |
|
153 |
</layout> |
|
154 |
</widget> |
|
155 |
</item> |
|
156 |
</layout> |
|
157 |
</item> |
|
158 |
</layout> |
|
159 | 180 |
</widget> |
160 | 181 |
</item> |
161 | 182 |
</layout> |
162 | 183 |
</widget> |
163 | 184 |
<resources/> |
164 |
<connections/> |
|
185 |
<connections> |
|
186 |
<connection> |
|
187 |
<sender>ocrDialogButtonBox</sender> |
|
188 |
<signal>accepted()</signal> |
|
189 |
<receiver>Dialog</receiver> |
|
190 |
<slot>accept()</slot> |
|
191 |
<hints> |
|
192 |
<hint type="sourcelabel"> |
|
193 |
<x>539</x> |
|
194 |
<y>629</y> |
|
195 |
</hint> |
|
196 |
<hint type="destinationlabel"> |
|
197 |
<x>539</x> |
|
198 |
<y>324</y> |
|
199 |
</hint> |
|
200 |
</hints> |
|
201 |
</connection> |
|
202 |
<connection> |
|
203 |
<sender>ocrDialogButtonBox</sender> |
|
204 |
<signal>rejected()</signal> |
|
205 |
<receiver>Dialog</receiver> |
|
206 |
<slot>reject()</slot> |
|
207 |
<hints> |
|
208 |
<hint type="sourcelabel"> |
|
209 |
<x>539</x> |
|
210 |
<y>629</y> |
|
211 |
</hint> |
|
212 |
<hint type="destinationlabel"> |
|
213 |
<x>539</x> |
|
214 |
<y>324</y> |
|
215 |
</hint> |
|
216 |
</hints> |
|
217 |
</connection> |
|
218 |
</connections> |
|
165 | 219 |
</ui> |
DTI_PID/DTI_PID/UI_OcrResultDialog.py | ||
---|---|---|
13 | 13 |
Dialog.setObjectName("Dialog") |
14 | 14 |
Dialog.resize(1080, 650) |
15 | 15 |
Dialog.setMinimumSize(QtCore.QSize(1080, 650)) |
16 |
self.gridLayout = QtWidgets.QGridLayout(Dialog) |
|
17 |
self.gridLayout.setObjectName("gridLayout") |
|
18 |
self.ocrDialogButtonBox = QtWidgets.QDialogButtonBox(Dialog) |
|
19 |
self.ocrDialogButtonBox.setOrientation(QtCore.Qt.Horizontal) |
|
20 |
self.ocrDialogButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) |
|
21 |
self.ocrDialogButtonBox.setObjectName("ocrDialogButtonBox") |
|
22 |
self.gridLayout.addWidget(self.ocrDialogButtonBox, 2, 0, 1, 1) |
|
23 |
self.topFrame = QtWidgets.QFrame(Dialog) |
|
24 |
self.topFrame.setMinimumSize(QtCore.QSize(0, 100)) |
|
25 |
self.topFrame.setObjectName("topFrame") |
|
26 |
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.topFrame) |
|
16 |
self.gridLayout_2 = QtWidgets.QGridLayout(Dialog) |
|
17 |
self.gridLayout_2.setObjectName("gridLayout_2") |
|
18 |
self.splitter = QtWidgets.QSplitter(Dialog) |
|
19 |
self.splitter.setOrientation(QtCore.Qt.Vertical) |
|
20 |
self.splitter.setObjectName("splitter") |
|
21 |
self.topWidget = QtWidgets.QWidget(self.splitter) |
|
22 |
self.topWidget.setMinimumSize(QtCore.QSize(0, 150)) |
|
23 |
self.topWidget.setObjectName("topWidget") |
|
24 |
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.topWidget) |
|
25 |
self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) |
|
27 | 26 |
self.verticalLayout_2.setObjectName("verticalLayout_2") |
28 | 27 |
self.tVerticalLayout_2 = QtWidgets.QVBoxLayout() |
29 | 28 |
self.tVerticalLayout_2.setObjectName("tVerticalLayout_2") |
30 |
self.targetToolsWidget_2 = QtWidgets.QWidget(self.topFrame) |
|
31 |
self.targetToolsWidget_2.setObjectName("targetToolsWidget_2") |
|
32 |
self.verticalLayout = QtWidgets.QVBoxLayout(self.targetToolsWidget_2) |
|
33 |
self.verticalLayout.setContentsMargins(0, 0, 0, 0) |
|
34 |
self.verticalLayout.setObjectName("verticalLayout") |
|
35 | 29 |
self.horizontalLayout = QtWidgets.QHBoxLayout() |
30 |
self.horizontalLayout.setContentsMargins(8, 8, 8, 8) |
|
36 | 31 |
self.horizontalLayout.setObjectName("horizontalLayout") |
37 |
self.targetTextLabel_2 = QtWidgets.QLabel(self.targetToolsWidget_2)
|
|
32 |
self.targetTextLabel_2 = QtWidgets.QLabel(self.topWidget)
|
|
38 | 33 |
font = QtGui.QFont() |
39 | 34 |
font.setBold(True) |
40 | 35 |
font.setWeight(75) |
41 | 36 |
self.targetTextLabel_2.setFont(font) |
42 | 37 |
self.targetTextLabel_2.setObjectName("targetTextLabel_2") |
43 | 38 |
self.horizontalLayout.addWidget(self.targetTextLabel_2) |
44 |
self.counterClockPushButton_2 = QtWidgets.QPushButton(self.targetToolsWidget_2)
|
|
45 |
self.counterClockPushButton_2.setMinimumSize(QtCore.QSize(0, 40))
|
|
46 |
self.counterClockPushButton_2.setMaximumSize(QtCore.QSize(150, 40))
|
|
39 |
self.counterClockPushButton_2 = QtWidgets.QPushButton(self.topWidget)
|
|
40 |
self.counterClockPushButton_2.setMinimumSize(QtCore.QSize(0, 60))
|
|
41 |
self.counterClockPushButton_2.setMaximumSize(QtCore.QSize(150, 60))
|
|
47 | 42 |
self.counterClockPushButton_2.setObjectName("counterClockPushButton_2") |
48 | 43 |
self.horizontalLayout.addWidget(self.counterClockPushButton_2) |
49 |
self.clockPushButton_2 = QtWidgets.QPushButton(self.targetToolsWidget_2)
|
|
50 |
self.clockPushButton_2.setMinimumSize(QtCore.QSize(0, 40))
|
|
51 |
self.clockPushButton_2.setMaximumSize(QtCore.QSize(150, 40))
|
|
44 |
self.clockPushButton_2 = QtWidgets.QPushButton(self.topWidget)
|
|
45 |
self.clockPushButton_2.setMinimumSize(QtCore.QSize(0, 60))
|
|
46 |
self.clockPushButton_2.setMaximumSize(QtCore.QSize(150, 60))
|
|
52 | 47 |
self.clockPushButton_2.setObjectName("clockPushButton_2") |
53 | 48 |
self.horizontalLayout.addWidget(self.clockPushButton_2) |
54 |
self.redetectPushButton_2 = QtWidgets.QPushButton(self.targetToolsWidget_2)
|
|
55 |
self.redetectPushButton_2.setMinimumSize(QtCore.QSize(0, 40))
|
|
56 |
self.redetectPushButton_2.setMaximumSize(QtCore.QSize(150, 40))
|
|
49 |
self.redetectPushButton_2 = QtWidgets.QPushButton(self.topWidget)
|
|
50 |
self.redetectPushButton_2.setMinimumSize(QtCore.QSize(0, 60))
|
|
51 |
self.redetectPushButton_2.setMaximumSize(QtCore.QSize(150, 60))
|
|
57 | 52 |
self.redetectPushButton_2.setObjectName("redetectPushButton_2") |
58 | 53 |
self.horizontalLayout.addWidget(self.redetectPushButton_2) |
59 |
self.verticalLayout.addLayout(self.horizontalLayout) |
|
60 |
self.tVerticalLayout_2.addWidget(self.targetToolsWidget_2) |
|
54 |
self.tVerticalLayout_2.addLayout(self.horizontalLayout) |
|
61 | 55 |
self.verticalLayout_2.addLayout(self.tVerticalLayout_2) |
62 |
self.gridLayout.addWidget(self.topFrame, 0, 0, 1, 1)
|
|
63 |
self.bottomFrame = QtWidgets.QFrame(Dialog)
|
|
64 |
self.bottomFrame.setMinimumSize(QtCore.QSize(0, 100))
|
|
65 |
self.bottomFrame.setObjectName("bottomFrame")
|
|
66 |
self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.bottomFrame)
|
|
56 |
self.bottomWidget = QtWidgets.QWidget(self.splitter)
|
|
57 |
self.bottomWidget.setMinimumSize(QtCore.QSize(0, 150))
|
|
58 |
self.bottomWidget.setObjectName("bottomWidget")
|
|
59 |
self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.bottomWidget)
|
|
60 |
self.verticalLayout_4.setContentsMargins(0, 0, 0, 0)
|
|
67 | 61 |
self.verticalLayout_4.setObjectName("verticalLayout_4") |
68 | 62 |
self.detectResultVerticalLayout_2 = QtWidgets.QVBoxLayout() |
63 |
self.detectResultVerticalLayout_2.setContentsMargins(8, 8, 8, 8) |
|
69 | 64 |
self.detectResultVerticalLayout_2.setObjectName("detectResultVerticalLayout_2") |
70 |
self.detectResultLabel_2 = QtWidgets.QLabel(self.bottomFrame)
|
|
65 |
self.detectResultLabel_2 = QtWidgets.QLabel(self.bottomWidget)
|
|
71 | 66 |
font = QtGui.QFont() |
72 | 67 |
font.setBold(True) |
73 | 68 |
font.setWeight(75) |
74 | 69 |
self.detectResultLabel_2.setFont(font) |
75 | 70 |
self.detectResultLabel_2.setObjectName("detectResultLabel_2") |
76 | 71 |
self.detectResultVerticalLayout_2.addWidget(self.detectResultLabel_2) |
77 |
self.detectResultTextEdit_2 = QtWidgets.QTextEdit(self.bottomFrame)
|
|
72 |
self.detectResultTextEdit_2 = QtWidgets.QTextEdit(self.bottomWidget)
|
|
78 | 73 |
self.detectResultTextEdit_2.setObjectName("detectResultTextEdit_2") |
79 | 74 |
self.detectResultVerticalLayout_2.addWidget(self.detectResultTextEdit_2) |
80 | 75 |
self.verticalLayout_4.addLayout(self.detectResultVerticalLayout_2) |
81 |
self.gridLayout.addWidget(self.bottomFrame, 1, 0, 1, 1) |
|
82 |
self.bottomFrame.raise_() |
|
83 |
self.topFrame.raise_() |
|
84 |
self.ocrDialogButtonBox.raise_() |
|
76 |
self.gridLayout_2.addWidget(self.splitter, 0, 0, 1, 1) |
|
77 |
self.ocrDialogButtonBox = QtWidgets.QDialogButtonBox(Dialog) |
|
78 |
self.ocrDialogButtonBox.setOrientation(QtCore.Qt.Horizontal) |
|
79 |
self.ocrDialogButtonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) |
|
80 |
self.ocrDialogButtonBox.setObjectName("ocrDialogButtonBox") |
|
81 |
self.gridLayout_2.addWidget(self.ocrDialogButtonBox, 1, 0, 1, 1) |
|
85 | 82 |
|
86 | 83 |
self.retranslateUi(Dialog) |
84 |
self.ocrDialogButtonBox.accepted.connect(Dialog.accept) |
|
85 |
self.ocrDialogButtonBox.rejected.connect(Dialog.reject) |
|
87 | 86 |
QtCore.QMetaObject.connectSlotsByName(Dialog) |
88 | 87 |
|
89 | 88 |
def retranslateUi(self, Dialog): |
내보내기 Unified diff