개정판 b5749a77
issue #1165: Special Item Types 설정
Change-Id: I048b53d09330d180c2d68e1585ab451fac157ce6
DTI_PID/DTI_PID/AppDocData.py | ||
---|---|---|
2192 | 2192 |
return result |
2193 | 2193 |
|
2194 | 2194 |
''' |
2195 |
@brief get special item types from database |
|
2196 |
@author humkyung |
|
2197 |
@date 2019.08.10 |
|
2198 |
''' |
|
2199 |
def get_special_item_types(self): |
|
2200 |
try: |
|
2201 |
# Creates or opens a file called mydb with a SQLite3 DB |
|
2202 |
dbPath = os.path.join(self.getCurrentProject().getDbFilePath(), AppDocData.DATABASE) |
|
2203 |
conn = sqlite3.connect(dbPath) |
|
2204 |
conn.row_factory = sqlite3.Row |
|
2205 |
with conn: |
|
2206 |
# Get a cursor object |
|
2207 |
cursor = conn.cursor() |
|
2208 |
|
|
2209 |
sql = 'select UID, Code, Type, Allowables from SpecialItemTypes order by Code DESC' |
|
2210 |
cursor.execute(sql) |
|
2211 |
return cursor.fetchall() |
|
2212 |
# Catch the exception |
|
2213 |
except Exception as ex: |
|
2214 |
from App import App |
|
2215 |
|
|
2216 |
# Roll back any change if something goes wrong |
|
2217 |
conn.rollback() |
|
2218 |
|
|
2219 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
2220 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
2221 |
|
|
2222 |
''' |
|
2223 |
@brief save special item types |
|
2224 |
@author humkyung |
|
2225 |
@date 2019.08.10 |
|
2226 |
''' |
|
2227 |
def save_special_item_types(self, datas): |
|
2228 |
import uuid |
|
2229 |
|
|
2230 |
try: |
|
2231 |
# Creates or opens a file called mydb with a SQLite3 DB |
|
2232 |
dbPath = os.path.join(self.getCurrentProject().getDbFilePath(), AppDocData.DATABASE) |
|
2233 |
conn = sqlite3.connect(dbPath) |
|
2234 |
with conn: |
|
2235 |
# Get a cursor object |
|
2236 |
cursor = conn.cursor() |
|
2237 |
|
|
2238 |
for data in datas: |
|
2239 |
uid,code,_type,allowables = data[0],data[1],data[2],data[3] |
|
2240 |
if not uid: |
|
2241 |
sql = 'insert or replace into SpecialItemTypes(UID, Code, Type, Allowables) values(?, ?, ?, ?)' |
|
2242 |
param = (str(uuid.uuid4()), data[1], data[2], data[3]) |
|
2243 |
elif uid == '-1': |
|
2244 |
sql = 'delete from SpecialItemTypes where uid=?' |
|
2245 |
param = (data[-1],) |
|
2246 |
else: |
|
2247 |
sql = 'update SpecialItemTypes SET Code=?, Type=?, Allowables=? WHERE UID = ?' |
|
2248 |
param = (data[1], data[2], data[3], data[0]) |
|
2249 |
cursor.execute(sql, param) |
|
2250 |
|
|
2251 |
conn.commit() |
|
2252 |
# Catch the exception |
|
2253 |
except Exception as ex: |
|
2254 |
# Roll back any change if something goes wrong |
|
2255 |
conn.rollback() |
|
2256 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
2257 |
|
|
2258 |
''' |
|
2195 | 2259 |
@brief Set Common Code Data |
2196 | 2260 |
@author kyouho |
2197 | 2261 |
@date 2018.07.12 |
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
205 | 205 |
self.actionHMB_DATA.triggered.connect(self.onHMBData) |
206 | 206 |
self.actionItem_Data_List.triggered.connect(self.showItemDataList) |
207 | 207 |
self.actionText_Data_List.triggered.connect(self.showTextDataList) |
208 |
self.actionSpecialItemTypes.triggered.connect(self.on_show_special_item_types) ### show special item types dialog |
|
208 | 209 |
self.actionCodeTable.triggered.connect(self.onShowCodeTable) |
209 | 210 |
self.actionImage_Drawing.triggered.connect(self.onViewImageDrawing) |
210 | 211 |
self.actionDrawing_Only.triggered.connect(self.onViewDrawingOnly) |
... | ... | |
1003 | 1004 |
QEngineeringInstrumentItem.INST_COLOR = None |
1004 | 1005 |
|
1005 | 1006 |
''' |
1007 |
@brief show special item types dialog |
|
1008 |
@author humkyung |
|
1009 |
@date 2019.08.10 |
|
1010 |
''' |
|
1011 |
def on_show_special_item_types(self): |
|
1012 |
from SpecialItemTypesDialog import QSpecialItemTypesDialog |
|
1013 |
|
|
1014 |
dlg = QSpecialItemTypesDialog(self) |
|
1015 |
dlg.exec_() |
|
1016 |
|
|
1017 |
''' |
|
1006 | 1018 |
@brief show nominal diameter dialog |
1007 | 1019 |
@author humkyung |
1008 | 1020 |
@date 2018.06.28 |
DTI_PID/DTI_PID/MainWindow_UI.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 |
|
3 |
# Form implementation generated from reading ui file './UI/MainWindow.ui'
|
|
3 |
# Form implementation generated from reading ui file '.\UI\MainWindow.ui'
|
|
4 | 4 |
# |
5 | 5 |
# Created by: PyQt5 UI code generator 5.11.3 |
6 | 6 |
# |
... | ... | |
442 | 442 |
self.actionViewVendor_Area.setObjectName("actionViewVendor_Area") |
443 | 443 |
self.actionImport_Text_From_CAD = QtWidgets.QAction(MainWindow) |
444 | 444 |
self.actionImport_Text_From_CAD.setObjectName("actionImport_Text_From_CAD") |
445 |
self.actionSpecialItemTypes = QtWidgets.QAction(MainWindow) |
|
446 |
self.actionSpecialItemTypes.setObjectName("actionSpecialItemTypes") |
|
445 | 447 |
self.menu.addAction(self.actionOpen) |
446 | 448 |
self.menu.addAction(self.actionArea) |
447 | 449 |
self.menu.addAction(self.actionConfiguration) |
... | ... | |
453 | 455 |
self.menu_2.addAction(self.actionHMB_DATA) |
454 | 456 |
self.menu_2.addAction(self.actionItem_Data_List) |
455 | 457 |
self.menu_2.addSeparator() |
458 |
self.menu_2.addAction(self.actionSpecialItemTypes) |
|
456 | 459 |
self.menu_2.addAction(self.actionCodeTable) |
457 | 460 |
self.menu_2.addAction(self.actionOCR_Training) |
458 | 461 |
self.menu_3.addAction(self.actionImage_Drawing) |
... | ... | |
581 | 584 |
self.actionVendor.setToolTip(_translate("MainWindow", "Set Vendor Package")) |
582 | 585 |
self.actionViewVendor_Area.setText(_translate("MainWindow", "Vendor Area(7)")) |
583 | 586 |
self.actionImport_Text_From_CAD.setText(_translate("MainWindow", "Import Text From CAD")) |
587 |
self.actionSpecialItemTypes.setText(_translate("MainWindow", "Special Item Types")) |
|
588 |
self.actionSpecialItemTypes.setToolTip(_translate("MainWindow", "Special Item Types")) |
|
584 | 589 |
|
585 | 590 |
import MainWindow_rc |
586 |
|
|
587 |
if __name__ == "__main__": |
|
588 |
import sys |
|
589 |
app = QtWidgets.QApplication(sys.argv) |
|
590 |
MainWindow = QtWidgets.QMainWindow() |
|
591 |
ui = Ui_MainWindow() |
|
592 |
ui.setupUi(MainWindow) |
|
593 |
MainWindow.show() |
|
594 |
sys.exit(app.exec_()) |
|
595 |
|
DTI_PID/DTI_PID/Scripts/SpecialItemTypes.sql | ||
---|---|---|
1 |
CREATE TABLE IF NOT EXISTS SpecialItemTypes ( |
|
2 |
UID TEXT CONSTRAINT SpecialItemTypes_PK PRIMARY KEY |
|
3 |
NOT NULL, |
|
4 |
Code TEXT NOT NULL |
|
5 |
UNIQUE, |
|
6 |
Type TEXT, |
|
7 |
Allowables TEXT |
|
8 |
); |
DTI_PID/DTI_PID/SpecialItemTypesDialog.py | ||
---|---|---|
1 |
# coding: utf-8 |
|
2 |
""" This is Special Item Types dialog module """ |
|
3 |
|
|
4 |
import os |
|
5 |
import sys |
|
6 |
from PyQt5.QtCore import * |
|
7 |
from PyQt5.QtGui import * |
|
8 |
from PyQt5.QtWidgets import * |
|
9 |
from AppDocData import AppDocData, MessageType |
|
10 |
|
|
11 |
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '\\UI') |
|
12 |
import SpecialItemTypes_UI |
|
13 |
|
|
14 |
class QSpecialItemTypesDialog(QDialog): |
|
15 |
""" This Special Item Types dialog class """ |
|
16 |
|
|
17 |
CODE_TABLES = ('Special Item Types') |
|
18 |
|
|
19 |
def __init__(self, parent): |
|
20 |
QDialog.__init__(self, parent) |
|
21 |
|
|
22 |
self.ui = SpecialItemTypes_UI.Ui_SpecialItemTypesDialog() |
|
23 |
self.ui.setupUi(self) |
|
24 |
|
|
25 |
self.ui.tableWidgetSpecialItemTypes.setSortingEnabled(True) |
|
26 |
|
|
27 |
#DB Table명 기준으로 작성 |
|
28 |
for table in QSpecialItemTypesDialog.CODE_TABLES: |
|
29 |
self.load_data(table) |
|
30 |
|
|
31 |
''' |
|
32 |
@brief Setting Table |
|
33 |
@author humkyung |
|
34 |
@date 2019.08.10 |
|
35 |
''' |
|
36 |
def load_data(self, table_name): |
|
37 |
try: |
|
38 |
app_doc_data = AppDocData.instance() |
|
39 |
|
|
40 |
self.ui.tableWidgetSpecialItemTypes.horizontalHeader().setStretchLastSection(True) |
|
41 |
self.ui.tableWidgetSpecialItemTypes.setColumnCount(4) |
|
42 |
self.ui.tableWidgetSpecialItemTypes.setHorizontalHeaderLabels(['UID', 'Code', 'Type', 'Allowables']) |
|
43 |
self.ui.tableWidgetSpecialItemTypes.hideColumn(0) |
|
44 |
|
|
45 |
self.fill_data() |
|
46 |
self.add_new_row() |
|
47 |
|
|
48 |
self.ui.tableWidgetSpecialItemTypes.horizontalHeaderItem(1).setSizeHint(QSize(30, 30)) |
|
49 |
self.ui.tableWidgetSpecialItemTypes.cellChanged.connect(self.cellValueChanged) |
|
50 |
except Exception as ex: |
|
51 |
from App import App |
|
52 |
|
|
53 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
54 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
55 |
|
|
56 |
''' |
|
57 |
@brief fill tablewidget with data of database |
|
58 |
@author humkyung |
|
59 |
@date 2019.08.10 |
|
60 |
''' |
|
61 |
def fill_data(self): |
|
62 |
try: |
|
63 |
app_doc_data = AppDocData.instance() |
|
64 |
special_item_types = app_doc_data.get_special_item_types() |
|
65 |
|
|
66 |
self.ui.tableWidgetSpecialItemTypes.setRowCount(len(special_item_types)) |
|
67 |
row = 0 |
|
68 |
for special_item_type in special_item_types: |
|
69 |
uid_item = QTableWidgetItem(special_item_type[0]) |
|
70 |
uid_item.tag = special_item_type[0] |
|
71 |
self.ui.tableWidgetSpecialItemTypes.setItem(row, 0, uid_item) # UID |
|
72 |
|
|
73 |
code_item = QTableWidgetItem(special_item_type[1]) |
|
74 |
code_item.tag = special_item_type[1] |
|
75 |
self.ui.tableWidgetSpecialItemTypes.setItem(row, 1, code_item) # Code |
|
76 |
|
|
77 |
type_combobox = QComboBox() |
|
78 |
type_combobox.addItem('String') |
|
79 |
type_combobox.addItem('Symbol') |
|
80 |
index = type_combobox.findText(special_item_type[2]) # Type |
|
81 |
type_combobox.setCurrentIndex(index) if index != -1 else type_combobox.setCurrentIndex(0) |
|
82 |
self.ui.tableWidgetSpecialItemTypes.setCellWidget(row, 2, type_combobox) |
|
83 |
|
|
84 |
allowables_item = QTableWidgetItem(special_item_type[3]) |
|
85 |
allowables_item.tag = special_item_type[3] |
|
86 |
self.ui.tableWidgetSpecialItemTypes.setItem(row, 3, allowables_item) # Allowables |
|
87 |
row += 1 |
|
88 |
except Exception as ex: |
|
89 |
from App import App |
|
90 |
|
|
91 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
92 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
93 |
|
|
94 |
''' |
|
95 |
@brief delete selected row |
|
96 |
@author humkyung |
|
97 |
@date 2019.08.10 |
|
98 |
''' |
|
99 |
def keyPressEvent(self, e): |
|
100 |
try: |
|
101 |
if e.key() == Qt.Key_Delete: |
|
102 |
selectedIndexes = self.ui.tableWidgetSpecialItemTypes.selectedIndexes() |
|
103 |
selectedRows = [item.row() for item in selectedIndexes] |
|
104 |
|
|
105 |
#중복 제거 |
|
106 |
rowsIndex = list(set(selectedRows)) |
|
107 |
rowsIndex.reverse() |
|
108 |
|
|
109 |
for row in rowsIndex: |
|
110 |
self.ui.tableWidgetSpecialItemTypes.hideRow(row) |
|
111 |
|
|
112 |
self.add_new_row() |
|
113 |
except Exception as ex: |
|
114 |
from App import App |
|
115 |
|
|
116 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
117 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
118 |
|
|
119 |
''' |
|
120 |
@brief add new row |
|
121 |
@author humkyung |
|
122 |
@date 2019.08.10 |
|
123 |
''' |
|
124 |
def add_new_row(self): |
|
125 |
try: |
|
126 |
rowCount = self.ui.tableWidgetSpecialItemTypes.rowCount() |
|
127 |
for row in range(rowCount): |
|
128 |
if self.ui.tableWidgetSpecialItemTypes.isRowHidden(row): continue |
|
129 |
code = self.ui.tableWidgetSpecialItemTypes.item(row, 1).text() |
|
130 |
if not code: return |
|
131 |
|
|
132 |
if self.ui.tableWidgetSpecialItemTypes.receivers(self.ui.tableWidgetSpecialItemTypes.cellChanged) > 0: |
|
133 |
self.ui.tableWidgetSpecialItemTypes.cellChanged.disconnect(self.cellValueChanged) |
|
134 |
self.ui.tableWidgetSpecialItemTypes.setRowCount(rowCount + 1) |
|
135 |
self.ui.tableWidgetSpecialItemTypes.setItem(rowCount, 0, QTableWidgetItem('')) |
|
136 |
self.ui.tableWidgetSpecialItemTypes.setItem(rowCount, 1, QTableWidgetItem('')) |
|
137 |
|
|
138 |
type_combobox = QComboBox() |
|
139 |
type_combobox.addItem('String') |
|
140 |
type_combobox.addItem('Symbol') |
|
141 |
self.ui.tableWidgetSpecialItemTypes.setCellWidget(rowCount, 2, type_combobox) |
|
142 |
|
|
143 |
self.ui.tableWidgetSpecialItemTypes.setItem(rowCount, 3, QTableWidgetItem('')) |
|
144 |
|
|
145 |
self.ui.tableWidgetSpecialItemTypes.cellChanged.connect(self.cellValueChanged) |
|
146 |
except Exception as ex: |
|
147 |
from App import App |
|
148 |
|
|
149 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
150 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
151 |
|
|
152 |
''' |
|
153 |
@brief cellValueChange event |
|
154 |
@author kyouho |
|
155 |
@date 2018.07.10 |
|
156 |
''' |
|
157 |
def cellValueChanged(self, row, column): |
|
158 |
try: |
|
159 |
tab_index = self.ui.tabWidget.currentIndex() |
|
160 |
|
|
161 |
if column == 1: |
|
162 |
code = self.ui.tableWidgetSpecialItemTypes.item(row, column).text() |
|
163 |
exists = self.exists_code(code) |
|
164 |
if not exists: |
|
165 |
item = self.ui.tableWidgetSpecialItemTypes.item(row, column) |
|
166 |
item.tag = code # set tag value with given code |
|
167 |
self.add_new_row() |
|
168 |
else: |
|
169 |
QMessageBox.warning(self, self.tr('Notice'), self.tr('The same code already exists in the table.')) |
|
170 |
item = self.ui.tableWidgetSpecialItemTypes.item(row, column) |
|
171 |
item.setText(item.tag if hasattr(item, 'tag') else '') |
|
172 |
elif column == 2: |
|
173 |
self.ui.tableWidgetSpecialItemTypes.resizeColumnToContents(2) |
|
174 |
else: |
|
175 |
self.ui.tableWidgetSpecialItemTypes.resizeColumnToContents(3) |
|
176 |
except Exception as ex: |
|
177 |
from App import App |
|
178 |
|
|
179 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
180 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
181 |
|
|
182 |
''' |
|
183 |
@brief Check Duplicated Code |
|
184 |
@author humkyung |
|
185 |
@date 2019.08.10 |
|
186 |
''' |
|
187 |
def exists_code(self, code): |
|
188 |
try: |
|
189 |
if not code: return False |
|
190 |
|
|
191 |
rowCount = self.ui.tableWidgetSpecialItemTypes.rowCount() |
|
192 |
codes = [] |
|
193 |
for row in range(rowCount): |
|
194 |
if self.ui.tableWidgetSpecialItemTypes.isRowHidden(row): continue |
|
195 |
code = self.ui.tableWidgetSpecialItemTypes.item(row, 1).text() |
|
196 |
codes.append(code) |
|
197 |
|
|
198 |
return True if codes.count(code) >= 2 else False |
|
199 |
except Exception as ex: |
|
200 |
from App import App |
|
201 |
|
|
202 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
203 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
204 |
|
|
205 |
''' |
|
206 |
@brief save codes and exits dialog |
|
207 |
@author humkyung |
|
208 |
@date 2019.08.12 |
|
209 |
''' |
|
210 |
def accept(self): |
|
211 |
try: |
|
212 |
self.save_data() |
|
213 |
QDialog.accept(self) |
|
214 |
except Exception as ex: |
|
215 |
from App import App |
|
216 |
|
|
217 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
218 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
219 |
|
|
220 |
''' |
|
221 |
@brief save speical item types |
|
222 |
@author humkyung |
|
223 |
@date 2019.08.10 |
|
224 |
''' |
|
225 |
def save_data(self): |
|
226 |
datas = [] |
|
227 |
rowCount = self.ui.tableWidgetSpecialItemTypes.rowCount() |
|
228 |
for row in range(rowCount): |
|
229 |
if self.ui.tableWidgetSpecialItemTypes.isRowHidden(row): # deleted row |
|
230 |
# set allowables with UID |
|
231 |
uid, code, _type, allowables = '-1',self.ui.tableWidgetSpecialItemTypes.item(row, 1).text(),'',self.ui.tableWidgetSpecialItemTypes.item(row, 0).text() |
|
232 |
else: |
|
233 |
uid = self.ui.tableWidgetSpecialItemTypes.item(row, 0).text() |
|
234 |
code = self.ui.tableWidgetSpecialItemTypes.item(row, 1).text() |
|
235 |
_type = self.ui.tableWidgetSpecialItemTypes.cellWidget(row, 2).currentText() |
|
236 |
allowables = self.ui.tableWidgetSpecialItemTypes.item(row, 3).text() if self.ui.tableWidgetSpecialItemTypes.item(row, 3) is not None else '' |
|
237 |
|
|
238 |
if code: datas.append((uid, code, _type, allowables)) |
|
239 |
|
|
240 |
app_doc_data = AppDocData.instance() |
|
241 |
app_doc_data.save_special_item_types(datas) |
DTI_PID/DTI_PID/UI/MainWindow.ui | ||
---|---|---|
80 | 80 |
<addaction name="actionHMB_DATA"/> |
81 | 81 |
<addaction name="actionItem_Data_List"/> |
82 | 82 |
<addaction name="separator"/> |
83 |
<addaction name="actionSpecialItemTypes"/> |
|
83 | 84 |
<addaction name="actionCodeTable"/> |
84 | 85 |
<addaction name="actionOCR_Training"/> |
85 | 86 |
</widget> |
... | ... | |
972 | 973 |
<string>Import Text From CAD</string> |
973 | 974 |
</property> |
974 | 975 |
</action> |
976 |
<action name="actionSpecialItemTypes"> |
|
977 |
<property name="text"> |
|
978 |
<string>Special Item Types</string> |
|
979 |
</property> |
|
980 |
<property name="toolTip"> |
|
981 |
<string>Special Item Types</string> |
|
982 |
</property> |
|
983 |
</action> |
|
975 | 984 |
</widget> |
976 | 985 |
<resources> |
977 | 986 |
<include location="../res/MainWindow.qrc"/> |
DTI_PID/DTI_PID/UI/SpecialItemTypes.ui | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<ui version="4.0"> |
|
3 |
<class>SpecialItemTypesDialog</class> |
|
4 |
<widget class="QDialog" name="SpecialItemTypesDialog"> |
|
5 |
<property name="geometry"> |
|
6 |
<rect> |
|
7 |
<x>0</x> |
|
8 |
<y>0</y> |
|
9 |
<width>910</width> |
|
10 |
<height>589</height> |
|
11 |
</rect> |
|
12 |
</property> |
|
13 |
<property name="font"> |
|
14 |
<font> |
|
15 |
<family>맑은 고딕</family> |
|
16 |
</font> |
|
17 |
</property> |
|
18 |
<property name="windowTitle"> |
|
19 |
<string>Special Item Types</string> |
|
20 |
</property> |
|
21 |
<property name="modal"> |
|
22 |
<bool>true</bool> |
|
23 |
</property> |
|
24 |
<layout class="QGridLayout" name="gridLayout"> |
|
25 |
<item row="0" column="0"> |
|
26 |
<widget class="QTabWidget" name="tabWidget"> |
|
27 |
<property name="focusPolicy"> |
|
28 |
<enum>Qt::NoFocus</enum> |
|
29 |
</property> |
|
30 |
<property name="currentIndex"> |
|
31 |
<number>0</number> |
|
32 |
</property> |
|
33 |
<widget class="QWidget" name="tabSpecialItemTypes"> |
|
34 |
<attribute name="title"> |
|
35 |
<string>Special Item Types</string> |
|
36 |
</attribute> |
|
37 |
<layout class="QGridLayout" name="gridLayout_3"> |
|
38 |
<item row="0" column="0"> |
|
39 |
<layout class="QGridLayout" name="gridLayout_2"> |
|
40 |
<item row="0" column="0"> |
|
41 |
<widget class="QGroupBox" name="groupBox_2"> |
|
42 |
<property name="title"> |
|
43 |
<string>Special Item Types</string> |
|
44 |
</property> |
|
45 |
<layout class="QGridLayout" name="gridLayout_14"> |
|
46 |
<item row="0" column="0"> |
|
47 |
<widget class="QTableWidget" name="tableWidgetSpecialItemTypes"> |
|
48 |
<property name="columnCount"> |
|
49 |
<number>3</number> |
|
50 |
</property> |
|
51 |
<attribute name="verticalHeaderVisible"> |
|
52 |
<bool>false</bool> |
|
53 |
</attribute> |
|
54 |
<column/> |
|
55 |
<column/> |
|
56 |
<column/> |
|
57 |
</widget> |
|
58 |
</item> |
|
59 |
</layout> |
|
60 |
</widget> |
|
61 |
</item> |
|
62 |
</layout> |
|
63 |
</item> |
|
64 |
</layout> |
|
65 |
</widget> |
|
66 |
</widget> |
|
67 |
</item> |
|
68 |
<item row="1" column="0"> |
|
69 |
<widget class="QDialogButtonBox" name="buttonBox"> |
|
70 |
<property name="focusPolicy"> |
|
71 |
<enum>Qt::TabFocus</enum> |
|
72 |
</property> |
|
73 |
<property name="orientation"> |
|
74 |
<enum>Qt::Horizontal</enum> |
|
75 |
</property> |
|
76 |
<property name="standardButtons"> |
|
77 |
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> |
|
78 |
</property> |
|
79 |
</widget> |
|
80 |
</item> |
|
81 |
</layout> |
|
82 |
</widget> |
|
83 |
<tabstops> |
|
84 |
<tabstop>tabWidget</tabstop> |
|
85 |
</tabstops> |
|
86 |
<resources/> |
|
87 |
<connections> |
|
88 |
<connection> |
|
89 |
<sender>buttonBox</sender> |
|
90 |
<signal>accepted()</signal> |
|
91 |
<receiver>SpecialItemTypesDialog</receiver> |
|
92 |
<slot>accept()</slot> |
|
93 |
<hints> |
|
94 |
<hint type="sourcelabel"> |
|
95 |
<x>257</x> |
|
96 |
<y>454</y> |
|
97 |
</hint> |
|
98 |
<hint type="destinationlabel"> |
|
99 |
<x>157</x> |
|
100 |
<y>274</y> |
|
101 |
</hint> |
|
102 |
</hints> |
|
103 |
</connection> |
|
104 |
<connection> |
|
105 |
<sender>buttonBox</sender> |
|
106 |
<signal>rejected()</signal> |
|
107 |
<receiver>SpecialItemTypesDialog</receiver> |
|
108 |
<slot>reject()</slot> |
|
109 |
<hints> |
|
110 |
<hint type="sourcelabel"> |
|
111 |
<x>325</x> |
|
112 |
<y>454</y> |
|
113 |
</hint> |
|
114 |
<hint type="destinationlabel"> |
|
115 |
<x>286</x> |
|
116 |
<y>274</y> |
|
117 |
</hint> |
|
118 |
</hints> |
|
119 |
</connection> |
|
120 |
</connections> |
|
121 |
</ui> |
DTI_PID/DTI_PID/UI/SpecialItemTypes_UI.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
|
|
3 |
# Form implementation generated from reading ui file '.\UI\SpecialItemTypes.ui' |
|
4 |
# |
|
5 |
# Created by: PyQt5 UI code generator 5.11.3 |
|
6 |
# |
|
7 |
# WARNING! All changes made in this file will be lost! |
|
8 |
|
|
9 |
from PyQt5 import QtCore, QtGui, QtWidgets |
|
10 |
|
|
11 |
class Ui_SpecialItemTypesDialog(object): |
|
12 |
def setupUi(self, SpecialItemTypesDialog): |
|
13 |
SpecialItemTypesDialog.setObjectName("SpecialItemTypesDialog") |
|
14 |
SpecialItemTypesDialog.resize(910, 589) |
|
15 |
font = QtGui.QFont() |
|
16 |
font.setFamily("맑은 고딕") |
|
17 |
SpecialItemTypesDialog.setFont(font) |
|
18 |
SpecialItemTypesDialog.setModal(True) |
|
19 |
self.gridLayout = QtWidgets.QGridLayout(SpecialItemTypesDialog) |
|
20 |
self.gridLayout.setObjectName("gridLayout") |
|
21 |
self.tabWidget = QtWidgets.QTabWidget(SpecialItemTypesDialog) |
|
22 |
self.tabWidget.setFocusPolicy(QtCore.Qt.NoFocus) |
|
23 |
self.tabWidget.setObjectName("tabWidget") |
|
24 |
self.tabSpecialItemTypes = QtWidgets.QWidget() |
|
25 |
self.tabSpecialItemTypes.setObjectName("tabSpecialItemTypes") |
|
26 |
self.gridLayout_3 = QtWidgets.QGridLayout(self.tabSpecialItemTypes) |
|
27 |
self.gridLayout_3.setObjectName("gridLayout_3") |
|
28 |
self.gridLayout_2 = QtWidgets.QGridLayout() |
|
29 |
self.gridLayout_2.setObjectName("gridLayout_2") |
|
30 |
self.groupBox_2 = QtWidgets.QGroupBox(self.tabSpecialItemTypes) |
|
31 |
self.groupBox_2.setObjectName("groupBox_2") |
|
32 |
self.gridLayout_14 = QtWidgets.QGridLayout(self.groupBox_2) |
|
33 |
self.gridLayout_14.setObjectName("gridLayout_14") |
|
34 |
self.tableWidgetSpecialItemTypes = QtWidgets.QTableWidget(self.groupBox_2) |
|
35 |
self.tableWidgetSpecialItemTypes.setColumnCount(3) |
|
36 |
self.tableWidgetSpecialItemTypes.setObjectName("tableWidgetSpecialItemTypes") |
|
37 |
self.tableWidgetSpecialItemTypes.setRowCount(0) |
|
38 |
self.tableWidgetSpecialItemTypes.verticalHeader().setVisible(False) |
|
39 |
self.gridLayout_14.addWidget(self.tableWidgetSpecialItemTypes, 0, 0, 1, 1) |
|
40 |
self.gridLayout_2.addWidget(self.groupBox_2, 0, 0, 1, 1) |
|
41 |
self.gridLayout_3.addLayout(self.gridLayout_2, 0, 0, 1, 1) |
|
42 |
self.tabWidget.addTab(self.tabSpecialItemTypes, "") |
|
43 |
self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1) |
|
44 |
self.buttonBox = QtWidgets.QDialogButtonBox(SpecialItemTypesDialog) |
|
45 |
self.buttonBox.setFocusPolicy(QtCore.Qt.TabFocus) |
|
46 |
self.buttonBox.setOrientation(QtCore.Qt.Horizontal) |
|
47 |
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) |
|
48 |
self.buttonBox.setObjectName("buttonBox") |
|
49 |
self.gridLayout.addWidget(self.buttonBox, 1, 0, 1, 1) |
|
50 |
|
|
51 |
self.retranslateUi(SpecialItemTypesDialog) |
|
52 |
self.tabWidget.setCurrentIndex(0) |
|
53 |
self.buttonBox.accepted.connect(SpecialItemTypesDialog.accept) |
|
54 |
self.buttonBox.rejected.connect(SpecialItemTypesDialog.reject) |
|
55 |
QtCore.QMetaObject.connectSlotsByName(SpecialItemTypesDialog) |
|
56 |
|
|
57 |
def retranslateUi(self, SpecialItemTypesDialog): |
|
58 |
_translate = QtCore.QCoreApplication.translate |
|
59 |
SpecialItemTypesDialog.setWindowTitle(_translate("SpecialItemTypesDialog", "Special Item Types")) |
|
60 |
self.groupBox_2.setTitle(_translate("SpecialItemTypesDialog", "Special Item Types")) |
|
61 |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabSpecialItemTypes), _translate("SpecialItemTypesDialog", "Special Item Types")) |
|
62 |
|
Docs/Special Item Types.drawio | ||
---|---|---|
1 |
<mxfile modified="2019-08-09T22:08:42.413Z" host="" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/11.1.4 Chrome/76.0.3809.88 Electron/6.0.0 Safari/537.36" etag="aiTXJGKOv1sL_9v-4c3-" version="11.1.4" type="device"><diagram id="3IPM_YcNxiEY_o1IJA5j" name="Page-1">7Vpbc5s4FP41PCbDxfjyGDtJs7PdNlNn2pl92RFIXCYCsUKu7f31eyQEGAu7zTQUP9jODPDpSOfo0yeJo9jyVtnuA0dF8hfDhFqujXeWd2+5rjNxXUv+2XhfIXN3UgExT7E2aoF1+h/RoK3RTYpJ2TEUjFGRFl0wZHlOQtHBEOds2zWLGO16LVBMDGAdImqi31IskroXsxZ/Immc1J6d6aIqyVBtrHtSJgiz7QHkPVjeijMmqrtstyJUklfzUtV7PFHaBMZJLn6mAhWB95UG6y/29J9Z+YTvVn8nN7qV74hudIfXBQlTJCv+IUgGl5d9AQNQdUHsa15KwdlrQ4ljecumfzY8YFQmBOsHRNM4h/sQIiUcgERktK1VyCazXSwFdJux8HVT3MJwCpTmhJe32zRX7TbNUBJBh5ffCRcpDNSdhgUrZHsFCtM8/qhs7ucSUZGuGGXcVbF7tj0Po6hb5FVF4UR+oSiCAFRBhU/VR+IppQd4pD6AZxDtC9mpkahqay07M3imKCB0icLXmLNNjusGcpaDyVKPAfSH7E4OrtNIBuYaYRkRfA8musJEi2zffdy2kvV9jSUHcvXqaYb0NImbllslwY0W0xuE5RrCstwpleMmUAAicu2AcUwqGqf/buQsWDrtbSf4ptyGcP2OUQixFAhjGPOO6aRj1Qq3BnXjd1BYt2pXtjU/PUVVyDchoxQVJalsmqcDh9NYX6seBwyWv2OQ98YVNCKRbqRKpA9QGpqFi4nbhNIt1DLsxqm7UOykI0ZhuJTtYh5ErnMm2kTqQU+q1kzNuvOcgnzFja6pmKnmu+HpE8pI7Q3EJR3+7hDgijK5XuRBWVSNHUNy3TPNjOcxe/FVza6zMeBfcnBHKduiPJQbQOsFH3uRIP9Zgf+SNhvXa8oKcjYoEwmMGH9Qcf3x8/PDME7eRNmpNYGgyMXeO037JsRHTuT6fM9hSxua4eF9jaDNTwxqPMOLDBFD8ze4qwvW6ZLkcP/4QAN4PXTtLwinm/Pr1DsQ/rsqnuT9VPvPaRzLl6CBuzGomzd3+mWr9J+gcvC9YHBXb+78E0FYbdqD9ntIL71dlmDfC7PEq9Shxo9SUqHSr05y2eZ3Or2z5dc6ncYxyMIiqtJYaQKIWs+aVPYdUjW/m6o5Tk+u5vXkas5iqFzN68nVTHpbIiS12yQVZA3JtizdQureZf5deOoSNTd58mYmTe5QLE0Mlm7G52jiXRRHvsHR5z9HJ2ni+h2SvJ4ZN/N7DkeGYmlqsLSSORYdnSnfvjCmZubx5D4LmMnUwMeREeNZeRsy8L1ku76dZaE+5s6CMSFqZzk6vWzM9JkkQhifOEjsPYY8OGB0reNjT+995GBsVZ5vyGHRs1MNtrzMTTkIrt5Gr3IYQQ7+fFw5LK5yuCQ5zJ1x5VBvVlc9XIQeXHvk3cLp+efmVQ/j6cFdjKwH96qHS9KD742sB/Pc46qHEfUwmw2lB3hsf2ejyg5+reQ9/A8=</diagram></mxfile> |
내보내기 Unified diff