개정판 dd6f8118
issue #49: 엑셀 내보내기 기능 완료
Change-Id: Ie0f4631ad5b6f846010b43515b1be88222c127bf
DTI_PID/DTI_PID/CodeTableDialog.py | ||
---|---|---|
8 | 8 |
from PyQt5.QtGui import * |
9 | 9 |
from PyQt5.QtWidgets import * |
10 | 10 |
from AppDocData import AppDocData, MessageType |
11 |
from openpyxl import * |
|
12 |
from openpyxl.styles import * |
|
11 | 13 |
import CodeTable_UI |
12 | 14 |
|
15 |
|
|
13 | 16 |
class QCodeTableDialog(QDialog): |
14 |
""" |
|
15 |
This code table dialog class |
|
16 |
""" |
|
17 |
""" This code table dialog class """ |
|
17 | 18 |
|
18 |
CODE_TABLES = ('Nominal Diameter', 'Fluid Code', 'Insulation Purpose', 'PnID Number', 'Piping Materials Class', 'Unit Number', 'ValveOperCodes', 'EqpTagNames', 'ReservedWords', 'Dictionary') |
|
19 |
CODE_TABLES = ( |
|
20 |
'Nominal Diameter', 'Fluid Code', 'Insulation Purpose', 'PnID Number', 'Piping Materials Class', 'Unit Number', |
|
21 |
'ValveOperCodes', 'EqpTagNames', 'ReservedWords', 'Dictionary') |
|
19 | 22 |
|
20 | 23 |
def __init__(self, parent): |
21 | 24 |
QDialog.__init__(self, parent) |
... | ... | |
35 | 38 |
self.ui.tableWidgetEqpTagNames.setSortingEnabled(True) |
36 | 39 |
self.ui.tableWidgetReservedWords.setSortingEnabled(True) |
37 | 40 |
|
38 |
#DB Table명 기준으로 작성 |
|
41 |
# DB Table명 기준으로 작성
|
|
39 | 42 |
for table in QCodeTableDialog.CODE_TABLES: |
40 | 43 |
self.settingTable(table) |
41 | 44 |
|
45 |
# connect signals |
|
46 |
self.ui.pushButtonImport.clicked.connect(self.import_code_table) |
|
47 |
self.ui.pushButtonExport.clicked.connect(self.export_code_table) |
|
48 |
|
|
42 | 49 |
''' |
43 | 50 |
@brief Setting Table |
44 | 51 |
@author kyouho |
45 | 52 |
@date 2018.07.10 |
46 | 53 |
''' |
54 |
|
|
47 | 55 |
def settingTable(self, tableName): |
48 | 56 |
try: |
49 | 57 |
tableName = self.replaceText(tableName) |
... | ... | |
62 | 70 |
self.checkRowAndAddRow(tableName, table) |
63 | 71 |
else: |
64 | 72 |
table.setColumnCount(4) |
65 |
table.setHorizontalHeaderLabels(['uid', 'Code', 'Desc.', 'Allowables'])
|
|
73 |
table.setHorizontalHeaderLabels(['UID', 'Code', 'Desc.', 'Allowables'])
|
|
66 | 74 |
table.hideColumn(0) |
67 | 75 |
|
68 | 76 |
self.insertTableWidgetCommonRow(table, tableDatas) |
69 |
|
|
77 |
|
|
70 | 78 |
table.horizontalHeaderItem(1).setSizeHint(QSize(30, 30)) |
71 | 79 |
table.cellChanged.connect(self.cellValueChanged) |
72 | 80 |
self.checkRowAndAddRow(tableName, table) |
73 | 81 |
self.setCurrentCode(table, tableName) |
74 | 82 |
except Exception as ex: |
75 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
83 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
84 |
sys.exc_info()[-1].tb_lineno)) |
|
76 | 85 |
|
77 | 86 |
''' |
78 | 87 |
@brief Insert row NominalPipeSzie Tablewidget |
79 | 88 |
@author kyouho |
80 | 89 |
@date 2018.07.10 |
81 | 90 |
''' |
91 |
|
|
82 | 92 |
def insertTableWidgetNominalPipeSizeRow(self, pipeSizes): |
83 | 93 |
try: |
84 | 94 |
self.ui.tableWidgetNominalDiameter.setColumnCount(7) |
85 |
self.ui.tableWidgetNominalDiameter.setHorizontalHeaderLabels(['Code', 'Metric', 'Inch', 'InchStr', 'Allowables', 'MetricStr', 'Allowables']) |
|
95 |
self.ui.tableWidgetNominalDiameter.setHorizontalHeaderLabels( |
|
96 |
['Code', 'Metric', 'Inch', 'InchStr', 'Allowables', 'MetricStr', 'Allowables']) |
|
86 | 97 |
self.ui.tableWidgetNominalDiameter.setRowCount(len(pipeSizes)) |
87 | 98 |
row = 0 |
88 | 99 |
for pipeSize in pipeSizes: |
89 | 100 |
item = QTableWidgetItem(pipeSize.code) |
90 | 101 |
item.setData(Qt.UserRole, pipeSize) |
91 | 102 |
self.ui.tableWidgetNominalDiameter.setItem(row, 0, item) |
92 |
self.ui.tableWidgetNominalDiameter.setItem(row, 1, QTableWidgetItem('' if pipeSize.metric is None else str(pipeSize.metric))) |
|
93 |
self.ui.tableWidgetNominalDiameter.setItem(row, 2, QTableWidgetItem('' if pipeSize.inch is None else str(pipeSize.inch))) |
|
94 |
self.ui.tableWidgetNominalDiameter.setItem(row, 3, QTableWidgetItem('' if pipeSize.inchStr is None else pipeSize.inchStr)) |
|
95 |
self.ui.tableWidgetNominalDiameter.setItem(row, 4, QTableWidgetItem('' if pipeSize.allowable_inch_str is None else pipeSize.allowable_inch_str)) |
|
96 |
self.ui.tableWidgetNominalDiameter.setItem(row, 5, QTableWidgetItem('' if pipeSize.metricStr is None else pipeSize.metricStr)) |
|
97 |
self.ui.tableWidgetNominalDiameter.setItem(row, 6, QTableWidgetItem('' if pipeSize.allowable_metric_str is None else pipeSize.allowable_metric_str)) |
|
103 |
self.ui.tableWidgetNominalDiameter.setItem(row, 1, QTableWidgetItem( |
|
104 |
'' if pipeSize.metric is None else str(pipeSize.metric))) |
|
105 |
self.ui.tableWidgetNominalDiameter.setItem(row, 2, QTableWidgetItem( |
|
106 |
'' if pipeSize.inch is None else str(pipeSize.inch))) |
|
107 |
self.ui.tableWidgetNominalDiameter.setItem(row, 3, QTableWidgetItem( |
|
108 |
'' if pipeSize.inchStr is None else pipeSize.inchStr)) |
|
109 |
self.ui.tableWidgetNominalDiameter.setItem(row, 4, QTableWidgetItem( |
|
110 |
'' if pipeSize.allowable_inch_str is None else pipeSize.allowable_inch_str)) |
|
111 |
self.ui.tableWidgetNominalDiameter.setItem(row, 5, QTableWidgetItem( |
|
112 |
'' if pipeSize.metricStr is None else pipeSize.metricStr)) |
|
113 |
self.ui.tableWidgetNominalDiameter.setItem(row, 6, QTableWidgetItem( |
|
114 |
'' if pipeSize.allowable_metric_str is None else pipeSize.allowable_metric_str)) |
|
98 | 115 |
row += 1 |
99 | 116 |
|
100 | 117 |
self.ui.tableWidgetNominalDiameter.horizontalHeaderItem(0).setSizeHint(QSize(30, 30)) |
101 | 118 |
except Exception as ex: |
102 | 119 |
from App import App |
103 | 120 |
|
104 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
121 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
122 |
sys.exc_info()[-1].tb_lineno) |
|
105 | 123 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
106 | 124 |
|
107 | 125 |
''' |
... | ... | |
109 | 127 |
@author kyouho |
110 | 128 |
@date 2018.07.10 |
111 | 129 |
''' |
130 |
|
|
112 | 131 |
def insertTableWidgetCommonRow(self, table, tableDatas): |
113 | 132 |
try: |
114 | 133 |
table.setRowCount(len(tableDatas)) |
115 | 134 |
row = 0 |
116 | 135 |
for tableData in tableDatas: |
117 |
table.setItem(row, 0, QTableWidgetItem(tableData[0])) # UID
|
|
118 |
table.setItem(row, 1, QTableWidgetItem(tableData[1])) # Name
|
|
119 |
table.setItem(row, 2, QTableWidgetItem(tableData[2])) # Description
|
|
120 |
table.setItem(row, 3, QTableWidgetItem(tableData[3])) # Allowables
|
|
136 |
table.setItem(row, 0, QTableWidgetItem(tableData[0])) # UID |
|
137 |
table.setItem(row, 1, QTableWidgetItem(tableData[1])) # Name |
|
138 |
table.setItem(row, 2, QTableWidgetItem(tableData[2])) # Description |
|
139 |
table.setItem(row, 3, QTableWidgetItem(tableData[3])) # Allowables |
|
121 | 140 |
row += 1 |
122 | 141 |
except Exception as ex: |
123 | 142 |
from App import App |
124 | 143 |
|
125 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
144 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
145 |
sys.exc_info()[-1].tb_lineno) |
|
126 | 146 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
127 | 147 |
|
128 | 148 |
''' |
... | ... | |
130 | 150 |
@author kyouhokyouho |
131 | 151 |
@date 2018.07.10 |
132 | 152 |
''' |
153 |
|
|
133 | 154 |
def findTableWidget(self, tableName): |
134 | 155 |
tableName = self.replaceText(tableName) |
135 | 156 |
return self.findChild(QTableWidget, 'tableWidget' + tableName) |
... | ... | |
139 | 160 |
@author kyouho |
140 | 161 |
@date 2018.07.10 |
141 | 162 |
''' |
163 |
|
|
142 | 164 |
def keyPressEvent(self, e): |
143 | 165 |
try: |
144 | 166 |
if e.key() == Qt.Key_Delete: |
... | ... | |
154 | 176 |
rowsIndex = [] |
155 | 177 |
for row in selectedRows: |
156 | 178 |
rowsIndex.append(row) |
157 |
|
|
158 |
#중복 제거 |
|
179 |
|
|
180 |
# 중복 제거
|
|
159 | 181 |
rowsIndex = list(set(rowsIndex)) |
160 | 182 |
rowsIndex.reverse() |
161 |
|
|
183 |
|
|
162 | 184 |
if tabText != "NominalDiameter": |
163 | 185 |
for row in rowsIndex: |
164 | 186 |
table.hideRow(row) |
... | ... | |
170 | 192 |
|
171 | 193 |
self.checkRowAndAddRow(tabText, table) |
172 | 194 |
except Exception as ex: |
173 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
195 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
196 |
sys.exc_info()[-1].tb_lineno)) |
|
174 | 197 |
|
175 | 198 |
''' |
176 | 199 |
@brief Add new row |
177 | 200 |
@author kyouho |
178 | 201 |
@date 2018.07.10 |
179 | 202 |
''' |
203 |
|
|
180 | 204 |
def checkRowAndAddRow(self, tableName, table): |
181 | 205 |
try: |
182 | 206 |
rowCount = table.rowCount() |
... | ... | |
205 | 229 |
if not table.item(row, columnIndex).text(): |
206 | 230 |
result = False |
207 | 231 |
break |
208 |
|
|
232 |
|
|
209 | 233 |
if result: |
210 | 234 |
table.setRowCount(rowCount + 1) |
211 | 235 |
table.cellChanged.disconnect(self.cellValueChanged) |
212 | 236 |
for columnIndex in range(columnCount): |
213 |
table.setItem(rowCount, columnIndex, QTableWidgetItem(''))
|
|
237 |
table.setItem(rowCount, columnIndex, QTableWidgetItem('')) |
|
214 | 238 |
table.cellChanged.connect(self.cellValueChanged) |
215 |
|
|
239 |
|
|
216 | 240 |
except Exception as ex: |
217 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
241 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
242 |
sys.exc_info()[-1].tb_lineno)) |
|
218 | 243 |
|
219 | 244 |
''' |
220 | 245 |
@brief cellValueChange event |
221 | 246 |
@author kyouho |
222 | 247 |
@date 2018.07.10 |
223 | 248 |
''' |
249 |
|
|
224 | 250 |
def cellValueChanged(self, row, column): |
225 | 251 |
try: |
226 | 252 |
_tabWidget = self.ui.tabWidget |
... | ... | |
237 | 263 |
self.checkRowAndAddRow(tabText, table) |
238 | 264 |
self.setCurrentCode(table, tabText) |
239 | 265 |
else: |
240 |
QMessageBox.warning(self, self.tr('Notice'), self.tr('The same code already exists in the table.')) |
|
266 |
QMessageBox.warning(self, self.tr('Notice'), |
|
267 |
self.tr('The same code already exists in the table.')) |
|
241 | 268 |
item.setText(self.currentCode[tabText][row]) |
242 | 269 |
elif column == 2: |
243 | 270 |
table.resizeColumnToContents(2) |
... | ... | |
246 | 273 |
else: |
247 | 274 |
self.checkRowAndAddRow(tabText, table) |
248 | 275 |
except Exception as ex: |
249 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
276 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
277 |
sys.exc_info()[-1].tb_lineno)) |
|
250 | 278 |
|
251 | 279 |
''' |
252 | 280 |
@brief Check Duplicate Code |
253 | 281 |
@author kyouho |
254 | 282 |
@date 2018.07.10 |
255 | 283 |
''' |
284 |
|
|
256 | 285 |
def isExistCode(self, table, editCode): |
257 | 286 |
try: |
258 | 287 |
if not editCode: |
... | ... | |
266 | 295 |
codes.append(code) |
267 | 296 |
|
268 | 297 |
count = codes.count(editCode) |
269 |
|
|
270 |
if count >=2: |
|
298 |
|
|
299 |
if count >= 2:
|
|
271 | 300 |
return False |
272 | 301 |
else: |
273 | 302 |
return True |
274 | 303 |
|
275 | 304 |
except Exception as ex: |
276 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
305 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
306 |
sys.exc_info()[-1].tb_lineno)) |
|
277 | 307 |
|
278 | 308 |
''' |
279 | 309 |
@brief save current Code (self.currentCode) |
280 | 310 |
@author kyouho |
281 | 311 |
@date 2018.07.10 |
282 | 312 |
''' |
313 |
|
|
283 | 314 |
def setCurrentCode(self, table, tabText): |
284 | 315 |
try: |
285 | 316 |
self.currentCode[tabText] = {} |
... | ... | |
293 | 324 |
self.currentCode[tabText] = res |
294 | 325 |
|
295 | 326 |
except Exception as ex: |
296 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
327 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
328 |
sys.exc_info()[-1].tb_lineno)) |
|
297 | 329 |
|
298 | 330 |
''' |
299 | 331 |
@brief replaceTextForCodeTable |
300 | 332 |
@author kyouho |
301 | 333 |
@date 2018.07.12 |
302 | 334 |
''' |
335 |
|
|
303 | 336 |
def replaceText(self, text): |
304 |
return text.replace(' ','').replace('&&', 'n') |
|
337 |
return text.replace(' ', '').replace('&&', 'n') |
|
338 |
|
|
339 |
def import_code_table(self): |
|
340 |
"""import code table excel file""" |
|
341 |
|
|
342 |
pass |
|
343 |
|
|
344 |
def export_code_table(self): |
|
345 |
"""export code table to excel file""" |
|
346 |
|
|
347 |
app_doc_data = AppDocData.instance() |
|
348 |
project = app_doc_data.getCurrentProject() |
|
349 |
|
|
350 |
options = QFileDialog.Options() |
|
351 |
options |= QFileDialog.DontUseNativeDialog |
|
352 |
file_name, _ = QFileDialog.getSaveFileName(self, "Export code table", project.path, "xlsx files(*.xlsx)", |
|
353 |
options=options) |
|
354 |
if not file_name: |
|
355 |
return |
|
356 |
|
|
357 |
QApplication.setOverrideCursor(Qt.WaitCursor) |
|
358 |
|
|
359 |
try: |
|
360 |
wb = Workbook() |
|
361 |
wb.active.title = self.tr(self.ui.tabWidget.tabText(0)) |
|
362 |
for index in range(1, self.ui.tabWidget.count()): |
|
363 |
wb.create_sheet(self.tr(self.ui.tabWidget.tabText(index))) |
|
364 |
|
|
365 |
for index in range(self.ui.tabWidget.count()): |
|
366 |
tab = self.ui.tabWidget.widget(index) |
|
367 |
table = tab.findChild(QTableWidget) |
|
368 |
if table: |
|
369 |
sheet = wb.worksheets[index] |
|
370 |
self.set_sheet_header(table, sheet) |
|
371 |
self.fill_sheet_with_table(table, sheet) |
|
372 |
self.auto_resize_columns(sheet) |
|
373 |
|
|
374 |
file_name, ext = os.path.splitext(file_name) |
|
375 |
save_file_name = file_name + ext if ext.upper() == '.XLSX' else file_name + '.xlsx' |
|
376 |
wb.save(save_file_name) |
|
377 |
|
|
378 |
QMessageBox.about(self, self.tr("Information"), self.tr('Successfully saved.')) |
|
379 |
|
|
380 |
os.startfile(save_file_name) |
|
381 |
except Exception as ex: |
|
382 |
from App import App |
|
383 |
from AppDocData import MessageType |
|
384 |
|
|
385 |
message = 'error occurred({}) in {}:{}'.format(repr(ex), sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
386 |
sys.exc_info()[-1].tb_lineno) |
|
387 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
388 |
finally: |
|
389 |
QApplication.restoreOverrideCursor() |
|
390 |
|
|
391 |
def set_sheet_header(self, table, sheet): |
|
392 |
""" set list header """ |
|
393 |
|
|
394 |
try: |
|
395 |
thin = Side(border_style='thin', color='000000') |
|
396 |
border = Border(left=thin, right=thin, top=thin, bottom=thin) |
|
397 |
_col = 1 |
|
398 |
for col in range(table.columnCount()): |
|
399 |
logical_index = table.horizontalHeader().logicalIndex(col) |
|
400 |
col_name = table.horizontalHeaderItem(logical_index).text() |
|
401 |
sheet.cell(1, _col, col_name) |
|
402 |
sheet.cell(row=1, column=_col).alignment = Alignment(horizontal='center', vertical='center', |
|
403 |
wrapText=True) |
|
404 |
sheet.cell(row=1, column=_col).fill = PatternFill(patternType='solid', fill_type='solid', |
|
405 |
fgColor=Color('8DB4E2')) |
|
406 |
sheet.cell(row=1, column=_col).border = border |
|
407 |
_col += 1 |
|
408 |
except Exception as ex: |
|
409 |
from App import App |
|
410 |
from AppDocData import MessageType |
|
411 |
|
|
412 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
413 |
sys.exc_info()[-1].tb_lineno) |
|
414 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
415 |
|
|
416 |
def fill_sheet_with_table(self, table, sheet): |
|
417 |
"""fill sheet with table""" |
|
418 |
|
|
419 |
try: |
|
420 |
thin = Side(border_style='thin', color='000000') |
|
421 |
border = Border(left=thin, right=thin, top=thin, bottom=thin) |
|
422 |
|
|
423 |
for col in range(table.columnCount()): |
|
424 |
for row in range(table.rowCount()): |
|
425 |
try: |
|
426 |
text = str(table.item(row, col).text()) |
|
427 |
sheet.cell(row + 2, col + 1, text) |
|
428 |
sheet.cell(row=row + 2, column=col + 1).border = border |
|
429 |
except AttributeError: |
|
430 |
pass |
|
431 |
except Exception as ex: |
|
432 |
from App import App |
|
433 |
from AppDocData import MessageType |
|
434 |
|
|
435 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
436 |
sys.exc_info()[-1].tb_lineno) |
|
437 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
438 |
|
|
439 |
def auto_resize_columns(self, sheet): |
|
440 |
""" auto resize columns with contents """ |
|
441 |
|
|
442 |
from openpyxl.utils import get_column_letter |
|
443 |
try: |
|
444 |
for col in sheet.columns: |
|
445 |
max_length = 0 |
|
446 |
column = col[0].column # Get the column name |
|
447 |
for cell in col: |
|
448 |
try: # Necessary to avoid error on empty cells |
|
449 |
if len(str(cell.value)) > max_length: |
|
450 |
max_length = len(cell.value) |
|
451 |
except: |
|
452 |
pass |
|
453 |
|
|
454 |
adjusted_width = (max_length + 2) * 1.2 |
|
455 |
sheet.column_dimensions[ |
|
456 |
get_column_letter(column) if type(column) is int else column].width = adjusted_width |
|
457 |
except Exception as ex: |
|
458 |
from App import App |
|
459 |
from AppDocData import MessageType |
|
460 |
|
|
461 |
message = 'error occurred({}) in {}:{}'.format(repr(ex), sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
462 |
sys.exc_info()[-1].tb_lineno) |
|
463 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
305 | 464 |
|
306 | 465 |
''' |
307 | 466 |
@brief save codes |
308 | 467 |
@author kyouho |
309 | 468 |
@date 2018.07.12 |
310 | 469 |
''' |
470 |
|
|
311 | 471 |
def accept(self): |
312 | 472 |
from CodeTables import CodeTable |
313 | 473 |
for table in QCodeTableDialog.CODE_TABLES: |
... | ... | |
324 | 484 |
@author kyouho |
325 | 485 |
@date 2018.07.12 |
326 | 486 |
''' |
487 |
|
|
327 | 488 |
def saveCommonCodeData(self, tableName): |
328 | 489 |
datas = [] |
329 | 490 |
try: |
... | ... | |
332 | 493 |
rowCount = table.rowCount() |
333 | 494 |
for row in range(rowCount): |
334 | 495 |
if table.isRowHidden(row): |
335 |
uid, code, description, allowables = '-1',table.item(row, 1).text(),'',table.item(row, 0).text()
|
|
496 |
uid, code, description, allowables = '-1', table.item(row, 1).text(), '', table.item(row, 0).text()
|
|
336 | 497 |
else: |
337 | 498 |
uid = table.item(row, 0).text() |
338 | 499 |
code = table.item(row, 1).text() |
... | ... | |
347 | 508 |
except Exception as ex: |
348 | 509 |
from App import App |
349 | 510 |
|
350 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
511 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
512 |
sys.exc_info()[-1].tb_lineno) |
|
351 | 513 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
352 | 514 |
|
353 | 515 |
''' |
... | ... | |
355 | 517 |
@author kyouho |
356 | 518 |
@date 2018.07.16 |
357 | 519 |
''' |
520 |
|
|
358 | 521 |
def saveNomialPipeSize(self): |
359 | 522 |
pipeSizes = [] |
360 | 523 |
try: |
361 | 524 |
docData = AppDocData.instance() |
362 | 525 |
|
363 | 526 |
from NominalPipeSize import NominalPipeSize |
364 |
|
|
527 |
|
|
365 | 528 |
table = self.ui.tableWidgetNominalDiameter |
366 | 529 |
rowCount = table.rowCount() |
367 | 530 |
for row in range(rowCount): |
... | ... | |
380 | 543 |
except Exception as ex: |
381 | 544 |
from App import App |
382 | 545 |
|
383 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
384 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
546 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
547 |
sys.exc_info()[-1].tb_lineno) |
|
548 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
DTI_PID/DTI_PID/CodeTable_UI.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 |
|
3 |
# Form implementation generated from reading ui file './UI/CodeTable.ui'
|
|
3 |
# Form implementation generated from reading ui file '.\UI\CodeTable.ui'
|
|
4 | 4 |
# |
5 |
# Created by: PyQt5 UI code generator 5.11.3
|
|
5 |
# Created by: PyQt5 UI code generator 5.13.0
|
|
6 | 6 |
# |
7 | 7 |
# WARNING! All changes made in this file will be lost! |
8 | 8 |
|
9 |
|
|
9 | 10 |
from PyQt5 import QtCore, QtGui, QtWidgets |
10 | 11 |
|
12 |
|
|
11 | 13 |
class Ui_CodeTableDialog(object): |
12 | 14 |
def setupUi(self, CodeTableDialog): |
13 | 15 |
CodeTableDialog.setObjectName("CodeTableDialog") |
... | ... | |
21 | 23 |
CodeTableDialog.setModal(True) |
22 | 24 |
self.gridLayout = QtWidgets.QGridLayout(CodeTableDialog) |
23 | 25 |
self.gridLayout.setObjectName("gridLayout") |
26 |
self.horizontalLayout_2 = QtWidgets.QHBoxLayout() |
|
27 |
self.horizontalLayout_2.setObjectName("horizontalLayout_2") |
|
28 |
self.pushButtonImport = QtWidgets.QPushButton(CodeTableDialog) |
|
29 |
self.pushButtonImport.setObjectName("pushButtonImport") |
|
30 |
self.horizontalLayout_2.addWidget(self.pushButtonImport) |
|
31 |
self.pushButtonExport = QtWidgets.QPushButton(CodeTableDialog) |
|
32 |
self.pushButtonExport.setObjectName("pushButtonExport") |
|
33 |
self.horizontalLayout_2.addWidget(self.pushButtonExport) |
|
34 |
self.buttonBox = QtWidgets.QDialogButtonBox(CodeTableDialog) |
|
35 |
self.buttonBox.setFocusPolicy(QtCore.Qt.TabFocus) |
|
36 |
self.buttonBox.setOrientation(QtCore.Qt.Horizontal) |
|
37 |
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) |
|
38 |
self.buttonBox.setObjectName("buttonBox") |
|
39 |
self.horizontalLayout_2.addWidget(self.buttonBox) |
|
40 |
self.gridLayout.addLayout(self.horizontalLayout_2, 2, 0, 1, 1) |
|
24 | 41 |
self.tabWidget = QtWidgets.QTabWidget(CodeTableDialog) |
25 | 42 |
self.tabWidget.setFocusPolicy(QtCore.Qt.NoFocus) |
26 | 43 |
self.tabWidget.setObjectName("tabWidget") |
... | ... | |
210 | 227 |
self.gridLayout_25.addWidget(self.groupBox_10, 0, 0, 1, 1) |
211 | 228 |
self.tabWidget.addTab(self.tabDIctionary, "") |
212 | 229 |
self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1) |
213 |
self.buttonBox = QtWidgets.QDialogButtonBox(CodeTableDialog) |
|
214 |
self.buttonBox.setFocusPolicy(QtCore.Qt.TabFocus) |
|
215 |
self.buttonBox.setOrientation(QtCore.Qt.Horizontal) |
|
216 |
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) |
|
217 |
self.buttonBox.setObjectName("buttonBox") |
|
218 |
self.gridLayout.addWidget(self.buttonBox, 1, 0, 1, 1) |
|
219 | 230 |
|
220 | 231 |
self.retranslateUi(CodeTableDialog) |
221 | 232 |
self.tabWidget.setCurrentIndex(0) |
... | ... | |
226 | 237 |
def retranslateUi(self, CodeTableDialog): |
227 | 238 |
_translate = QtCore.QCoreApplication.translate |
228 | 239 |
CodeTableDialog.setWindowTitle(_translate("CodeTableDialog", "Code Table")) |
240 |
self.pushButtonImport.setText(_translate("CodeTableDialog", "Import")) |
|
241 |
self.pushButtonExport.setText(_translate("CodeTableDialog", "Export")) |
|
229 | 242 |
self.groupBox.setTitle(_translate("CodeTableDialog", "Nominal Diameter")) |
230 | 243 |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabNominalDiameter), _translate("CodeTableDialog", "Nominal Diameter")) |
231 | 244 |
self.groupBox_2.setTitle(_translate("CodeTableDialog", "Fluid Code")) |
... | ... | |
252 | 265 |
item = self.tableWidgetDictionary.horizontalHeaderItem(2) |
253 | 266 |
item.setText(_translate("CodeTableDialog", "3")) |
254 | 267 |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabDIctionary), _translate("CodeTableDialog", "Dictionary")) |
255 |
|
|
256 | 268 |
import MainWindow_rc |
257 |
|
|
258 |
if __name__ == "__main__": |
|
259 |
import sys |
|
260 |
app = QtWidgets.QApplication(sys.argv) |
|
261 |
CodeTableDialog = QtWidgets.QDialog() |
|
262 |
ui = Ui_CodeTableDialog() |
|
263 |
ui.setupUi(CodeTableDialog) |
|
264 |
CodeTableDialog.show() |
|
265 |
sys.exit(app.exec_()) |
|
266 |
|
DTI_PID/DTI_PID/EqpDatasheetExportDialog.py | ||
---|---|---|
58 | 58 |
|
59 | 59 |
import re |
60 | 60 |
|
61 |
QApplication.setOverrideCursor(Qt.WaitCursor) |
|
61 | 62 |
try: |
62 | 63 |
app_doc_data = AppDocData.instance() |
63 | 64 |
path = app_doc_data.project.get_data_sheet_path() |
... | ... | |
73 | 74 |
for col in range(sheet.max_column): |
74 | 75 |
if row[col].value and reg_expr.match(str(row[col].value)): |
75 | 76 |
name = str(row[col].value)[2:-1] |
76 |
matches = [attr for attr in equipment if attr[0] == name] |
|
77 |
if matches: |
|
78 |
row[col].value = matches[0][1] |
|
77 |
if name == 'PROJECT_NO': |
|
78 |
row[col].value = app_doc_data.project.id |
|
79 |
elif name == 'PROJECT_NAME': |
|
80 |
row[col].value = app_doc_data.project.name |
|
81 |
else: |
|
82 |
matches = [attr for attr in equipment if attr[0] == name] |
|
83 |
if matches: |
|
84 |
row[col].value = matches[0][1] |
|
79 | 85 |
|
80 | 86 |
options = QFileDialog.Options() |
81 | 87 |
options |= QFileDialog.DontUseNativeDialog |
82 | 88 |
file_name = QFileDialog.getSaveFileName(self, f"{_type} xlsx file", app_doc_data.project.path, |
83 | 89 |
"xlsx files(*.xlsx)", options=options) |
90 |
save_file_name = None |
|
84 | 91 |
if file_name[0]: |
85 | 92 |
file_name, ext = os.path.splitext(file_name[0]) |
86 |
book.save(file_name + ext if ext.upper() == '.XLSX' else file_name + '.xlsx') |
|
93 |
save_file_name = file_name + ext if ext.upper() == '.XLSX' else file_name + '.xlsx' |
|
94 |
book.save(save_file_name) |
|
87 | 95 |
|
88 | 96 |
book.close() |
89 | 97 |
|
98 |
if save_file_name: |
|
99 |
os.startfile(save_file_name) |
|
90 | 100 |
except Exception as ex: |
91 | 101 |
from App import App |
92 | 102 |
message = 'error occurred({}) in {}:{}'.format(repr(ex), sys.exc_info()[-1].tb_frame.f_code.co_filename, |
93 | 103 |
sys.exc_info()[-1].tb_lineno) |
94 | 104 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
105 |
finally: |
|
106 |
QApplication.restoreOverrideCursor() |
DTI_PID/DTI_PID/ID2.pro | ||
---|---|---|
4 | 4 |
SOURCES += TrainingImageListDialog.py Configuration_UI.py Configuration_Area_UI.py ItemDataFormat_UI.py |
5 | 5 |
SOURCES += ItemDataExport_UI.py ItemDataExportDialog.py HMB_UI.py RecognitionDialog.py LineNoTracer.py |
6 | 6 |
SOURCES += ConnectAttr_UI.py ItemTreeWidget.py |
7 |
SOURCES += CodeTable_UI.py CodeTableDialog.py |
|
7 | 8 |
SOURCES += .\UI\DataTransfer_UI.py DataTransferDialog.py |
8 | 9 |
SOURCES += .\UI\DataExport_UI.py DataExportDialog.py |
9 | 10 |
SOURCES += .\UI\EqpDatasheetExport_UI.py DataExportDialog.py |
DTI_PID/DTI_PID/ItemDataExportDialog.py | ||
---|---|---|
162 | 162 |
elif tableName == 'PIPINGMATERIALSCLASS': |
163 | 163 |
self.pipingMaterialClassList = docData.getCodeTable(tableName, True) |
164 | 164 |
|
165 |
''' |
|
166 |
@brief save excel |
|
167 |
@author kyouho |
|
168 |
@date 2018.08.16 |
|
169 |
@history 2018.10.26 euisung export order apply |
|
170 |
''' |
|
171 |
|
|
172 | 165 |
def save_excel(self): |
173 |
try:
|
|
174 |
import subprocess |
|
175 |
appDocData = AppDocData.instance()
|
|
176 |
project = appDocData.getCurrentProject()
|
|
177 |
options = QFileDialog.Options()
|
|
178 |
options |= QFileDialog.DontUseNativeDialog
|
|
179 |
fileName = QFileDialog.getSaveFileName(self, "Save xlsx file", project.path, "xlsx files(*.xlsx)",
|
|
180 |
options=options)
|
|
181 |
if fileName == ('', ''):
|
|
182 |
return
|
|
166 |
"""save engineering list to excel"""
|
|
167 |
|
|
168 |
appDocData = AppDocData.instance() |
|
169 |
project = appDocData.getCurrentProject() |
|
170 |
options = QFileDialog.Options() |
|
171 |
options |= QFileDialog.DontUseNativeDialog |
|
172 |
fileName = QFileDialog.getSaveFileName(self, "Save xlsx file", project.path, "xlsx files(*.xlsx)", |
|
173 |
options=options) |
|
174 |
if fileName == ('', ''): |
|
175 |
return |
|
183 | 176 |
|
177 |
QApplication.setOverrideCursor(Qt.WaitCursor) |
|
178 |
|
|
179 |
try: |
|
184 | 180 |
wb = Workbook() |
185 | 181 |
wb.active.title = self.tr(self.ui.tabWidget.tabText(0)) |
186 | 182 |
for i in range(1, self.ui.tabWidget.count()): |
... | ... | |
191 | 187 |
index) |
192 | 188 |
|
193 | 189 |
fileName, ext = os.path.splitext(fileName[0]) |
194 |
wb.save(fileName + ext if ext == '.xlsx' else fileName + '.xlsx')
|
|
190 |
wb.save(fileName + ext if ext.upper() == '.XLSX' else fileName + '.xlsx')
|
|
195 | 191 |
|
196 | 192 |
QMessageBox.about(self, self.tr("Information"), self.tr('Successfully saved.')) |
197 | 193 |
|
... | ... | |
201 | 197 |
from App import App |
202 | 198 |
from AppDocData import MessageType |
203 | 199 |
|
204 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
|
|
200 |
message = 'error occurred({}) in {}:{}'.format(repr(ex), sys.exc_info()[-1].tb_frame.f_code.co_filename,
|
|
205 | 201 |
sys.exc_info()[-1].tb_lineno) |
206 | 202 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
203 |
finally: |
|
204 |
QApplication.restoreOverrideCursor() |
|
207 | 205 |
|
208 | 206 |
''' |
209 | 207 |
@brief save excel |
... | ... | |
283 | 281 |
|
284 | 282 |
def auto_resize_columns(self, sheet): |
285 | 283 |
""" auto resize columns with contents """ |
284 |
|
|
285 |
from openpyxl.utils import get_column_letter |
|
286 | 286 |
try: |
287 | 287 |
for col in sheet.columns: |
288 | 288 |
max_length = 0 |
... | ... | |
295 | 295 |
pass |
296 | 296 |
|
297 | 297 |
adjusted_width = (max_length + 2) * 1.2 |
298 |
sheet.column_dimensions[str(chr(64 + column)) if type(column) is int else column].width = adjusted_width
|
|
298 |
sheet.column_dimensions[get_column_letter(column) if type(column) is int else column].width = adjusted_width
|
|
299 | 299 |
except Exception as ex: |
300 | 300 |
from App import App |
301 | 301 |
from AppDocData import MessageType |
DTI_PID/DTI_PID/Project.py | ||
---|---|---|
5 | 5 |
from shutil import copyfile |
6 | 6 |
from AppDatabase import AppDatabase |
7 | 7 |
|
8 |
|
|
8 | 9 |
class Project: |
9 | 10 |
DATABASE = 'ITI_PID.db' |
10 | 11 |
|
... | ... | |
12 | 13 |
self.id = project['Id'] |
13 | 14 |
self.name = project['Name'] |
14 | 15 |
self._desc = project['Desc'] |
15 |
self._prj_unit = project['Unit']
|
|
16 |
self._prj_unit = project['Unit'] |
|
16 | 17 |
self.path = project['Path'] |
17 | 18 |
self.createDate = project['CreatedDate'] |
18 | 19 |
self.updateDate = project['UpdatedDate'] |
19 |
self._database = AppDatabase(type=project['DBType'], host=project['Host'], user=project['User'], password=project['Password'], |
|
20 |
db_path = os.path.join(self.path, 'db', Project.DATABASE) if project['DBType']=='SQLite' else project['Name']) |
|
20 |
self._database = AppDatabase(type=project['DBType'], host=project['Host'], user=project['User'], |
|
21 |
password=project['Password'], |
|
22 |
db_path=os.path.join(self.path, 'db', Project.DATABASE) if project[ |
|
23 |
'DBType'] == 'SQLite' else |
|
24 |
project['Name']) |
|
21 | 25 |
|
22 | 26 |
def setId(self, id): |
23 | 27 |
self.id = id |
... | ... | |
34 | 38 |
@property |
35 | 39 |
def desc(self): |
36 | 40 |
return self._desc |
37 |
|
|
41 |
|
|
38 | 42 |
@desc.setter |
39 | 43 |
def desc(self, value): |
40 | 44 |
""" setter of desc """ |
... | ... | |
65 | 69 |
@author humkyung |
66 | 70 |
@date 2018.07.09 |
67 | 71 |
''' |
72 |
|
|
68 | 73 |
def getDrawingFilePath(self): |
69 | 74 |
return os.path.join(self.getPath(), 'drawings') |
70 | 75 |
|
... | ... | |
73 | 78 |
@author humkyung |
74 | 79 |
@date 2018.04.10 |
75 | 80 |
''' |
81 |
|
|
76 | 82 |
def getOutputPath(self): |
77 | 83 |
return os.path.join(self.getPath(), 'output') |
78 | 84 |
|
... | ... | |
81 | 87 |
@author Jeongwoo |
82 | 88 |
@date 2018.04.10 |
83 | 89 |
''' |
90 |
|
|
84 | 91 |
def getImageFilePath(self): |
85 | 92 |
return os.path.join(self.getPath(), 'image') |
86 | 93 |
|
... | ... | |
89 | 96 |
@author Jeongwoo |
90 | 97 |
@date 2018.04.10 |
91 | 98 |
''' |
99 |
|
|
92 | 100 |
def getDbFilePath(self): |
93 | 101 |
return os.path.join(self.getPath(), 'db') |
94 | 102 |
|
... | ... | |
97 | 105 |
@author humkyung |
98 | 106 |
@date 2018.04.08 |
99 | 107 |
''' |
108 |
|
|
100 | 109 |
def getSvgFilePath(self): |
101 | 110 |
return os.path.join(self.getPath(), 'svg') |
102 |
|
|
111 |
|
|
103 | 112 |
''' |
104 | 113 |
@brief return temporary path |
105 | 114 |
@author humkyung |
106 | 115 |
@date 2018.04.10 |
107 | 116 |
''' |
117 |
|
|
108 | 118 |
def getTempPath(self): |
109 | 119 |
return os.path.join(self.getPath(), 'Temp') |
110 | 120 |
|
... | ... | |
113 | 123 |
@author euisung |
114 | 124 |
@date 2018.09.28 |
115 | 125 |
''' |
126 |
|
|
116 | 127 |
def getTrainingFilePath(self): |
117 | 128 |
return os.path.join(self.getPath(), 'Training') |
118 | 129 |
|
... | ... | |
142 | 153 |
@author humkyung |
143 | 154 |
@date 2018.04.25 |
144 | 155 |
''' |
156 |
|
|
145 | 157 |
def unit(self): |
146 | 158 |
from AppDocData import AppDocData |
147 | 159 |
res = 'Metric' # default value |
DTI_PID/DTI_PID/UI/CodeTable.ui | ||
---|---|---|
26 | 26 |
<bool>true</bool> |
27 | 27 |
</property> |
28 | 28 |
<layout class="QGridLayout" name="gridLayout"> |
29 |
<item row="2" column="0"> |
|
30 |
<layout class="QHBoxLayout" name="horizontalLayout_2"> |
|
31 |
<item> |
|
32 |
<widget class="QPushButton" name="pushButtonImport"> |
|
33 |
<property name="text"> |
|
34 |
<string>Import</string> |
|
35 |
</property> |
|
36 |
</widget> |
|
37 |
</item> |
|
38 |
<item> |
|
39 |
<widget class="QPushButton" name="pushButtonExport"> |
|
40 |
<property name="text"> |
|
41 |
<string>Export</string> |
|
42 |
</property> |
|
43 |
</widget> |
|
44 |
</item> |
|
45 |
<item> |
|
46 |
<widget class="QDialogButtonBox" name="buttonBox"> |
|
47 |
<property name="focusPolicy"> |
|
48 |
<enum>Qt::TabFocus</enum> |
|
49 |
</property> |
|
50 |
<property name="orientation"> |
|
51 |
<enum>Qt::Horizontal</enum> |
|
52 |
</property> |
|
53 |
<property name="standardButtons"> |
|
54 |
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> |
|
55 |
</property> |
|
56 |
</widget> |
|
57 |
</item> |
|
58 |
</layout> |
|
59 |
</item> |
|
29 | 60 |
<item row="0" column="0"> |
30 | 61 |
<widget class="QTabWidget" name="tabWidget"> |
31 | 62 |
<property name="focusPolicy"> |
... | ... | |
364 | 395 |
</widget> |
365 | 396 |
</widget> |
366 | 397 |
</item> |
367 |
<item row="1" column="0"> |
|
368 |
<widget class="QDialogButtonBox" name="buttonBox"> |
|
369 |
<property name="focusPolicy"> |
|
370 |
<enum>Qt::TabFocus</enum> |
|
371 |
</property> |
|
372 |
<property name="orientation"> |
|
373 |
<enum>Qt::Horizontal</enum> |
|
374 |
</property> |
|
375 |
<property name="standardButtons"> |
|
376 |
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> |
|
377 |
</property> |
|
378 |
</widget> |
|
379 |
</item> |
|
380 | 398 |
</layout> |
381 | 399 |
</widget> |
382 | 400 |
<tabstops> |
DTI_PID/DTI_PID/translate/ja_jp.ts | ||
---|---|---|
69 | 69 |
</message> |
70 | 70 |
</context> |
71 | 71 |
<context> |
72 |
<name>CodeTableDialog</name> |
|
73 |
<message> |
|
74 |
<location filename="../CodeTable_UI.py" line="239"/> |
|
75 |
<source>Code Table</source> |
|
76 |
<translation type="unfinished"></translation> |
|
77 |
</message> |
|
78 |
<message> |
|
79 |
<location filename="../CodeTable_UI.py" line="240"/> |
|
80 |
<source>Import</source> |
|
81 |
<translation type="unfinished"></translation> |
|
82 |
</message> |
|
83 |
<message> |
|
84 |
<location filename="../CodeTable_UI.py" line="241"/> |
|
85 |
<source>Export</source> |
|
86 |
<translation type="unfinished"></translation> |
|
87 |
</message> |
|
88 |
<message> |
|
89 |
<location filename="../CodeTable_UI.py" line="243"/> |
|
90 |
<source>Nominal Diameter</source> |
|
91 |
<translation type="unfinished"></translation> |
|
92 |
</message> |
|
93 |
<message> |
|
94 |
<location filename="../CodeTable_UI.py" line="245"/> |
|
95 |
<source>Fluid Code</source> |
|
96 |
<translation type="unfinished"></translation> |
|
97 |
</message> |
|
98 |
<message> |
|
99 |
<location filename="../CodeTable_UI.py" line="247"/> |
|
100 |
<source>Insulation Purpose</source> |
|
101 |
<translation type="unfinished"></translation> |
|
102 |
</message> |
|
103 |
<message> |
|
104 |
<location filename="../CodeTable_UI.py" line="249"/> |
|
105 |
<source>P&&ID Number</source> |
|
106 |
<translation type="unfinished"></translation> |
|
107 |
</message> |
|
108 |
<message> |
|
109 |
<location filename="../CodeTable_UI.py" line="251"/> |
|
110 |
<source>Piping Materials Class</source> |
|
111 |
<translation type="unfinished"></translation> |
|
112 |
</message> |
|
113 |
<message> |
|
114 |
<location filename="../CodeTable_UI.py" line="253"/> |
|
115 |
<source>Unit Number</source> |
|
116 |
<translation type="unfinished"></translation> |
|
117 |
</message> |
|
118 |
<message> |
|
119 |
<location filename="../CodeTable_UI.py" line="254"/> |
|
120 |
<source>Valve Oper Code</source> |
|
121 |
<translation type="unfinished"></translation> |
|
122 |
</message> |
|
123 |
<message> |
|
124 |
<location filename="../CodeTable_UI.py" line="255"/> |
|
125 |
<source>Valve Oper Codes</source> |
|
126 |
<translation type="unfinished"></translation> |
|
127 |
</message> |
|
128 |
<message> |
|
129 |
<location filename="../CodeTable_UI.py" line="256"/> |
|
130 |
<source>Tag Name</source> |
|
131 |
<translation type="unfinished"></translation> |
|
132 |
</message> |
|
133 |
<message> |
|
134 |
<location filename="../CodeTable_UI.py" line="257"/> |
|
135 |
<source>Eqp Tag Names</source> |
|
136 |
<translation type="unfinished"></translation> |
|
137 |
</message> |
|
138 |
<message> |
|
139 |
<location filename="../CodeTable_UI.py" line="258"/> |
|
140 |
<source>Reserved Word</source> |
|
141 |
<translation type="unfinished"></translation> |
|
142 |
</message> |
|
143 |
<message> |
|
144 |
<location filename="../CodeTable_UI.py" line="259"/> |
|
145 |
<source>Reserved Words</source> |
|
146 |
<translation type="unfinished"></translation> |
|
147 |
</message> |
|
148 |
<message> |
|
149 |
<location filename="../CodeTable_UI.py" line="267"/> |
|
150 |
<source>Dictionary</source> |
|
151 |
<translation type="unfinished"></translation> |
|
152 |
</message> |
|
153 |
<message> |
|
154 |
<location filename="../CodeTable_UI.py" line="262"/> |
|
155 |
<source>1</source> |
|
156 |
<translation type="unfinished"></translation> |
|
157 |
</message> |
|
158 |
<message> |
|
159 |
<location filename="../CodeTable_UI.py" line="264"/> |
|
160 |
<source>2</source> |
|
161 |
<translation type="unfinished"></translation> |
|
162 |
</message> |
|
163 |
<message> |
|
164 |
<location filename="../CodeTable_UI.py" line="266"/> |
|
165 |
<source>3</source> |
|
166 |
<translation type="unfinished"></translation> |
|
167 |
</message> |
|
168 |
</context> |
|
169 |
<context> |
|
72 | 170 |
<name>ConfigurationDialog</name> |
73 | 171 |
<message> |
74 | 172 |
<location filename="../Configuration_UI.py" line="641"/> |
... | ... | |
1592 | 1690 |
</message> |
1593 | 1691 |
</context> |
1594 | 1692 |
<context> |
1693 |
<name>QCodeTableDialog</name> |
|
1694 |
<message> |
|
1695 |
<location filename="../CodeTableDialog.py" line="240"/> |
|
1696 |
<source>Notice</source> |
|
1697 |
<translation type="unfinished"></translation> |
|
1698 |
</message> |
|
1699 |
<message> |
|
1700 |
<location filename="../CodeTableDialog.py" line="240"/> |
|
1701 |
<source>The same code already exists in the table.</source> |
|
1702 |
<translation type="unfinished"></translation> |
|
1703 |
</message> |
|
1704 |
</context> |
|
1705 |
<context> |
|
1595 | 1706 |
<name>QDataExportDialog</name> |
1596 | 1707 |
<message> |
1597 | 1708 |
<location filename="../DataExportDialog.py" line="27"/> |
... | ... | |
1650 | 1761 |
<context> |
1651 | 1762 |
<name>QItemDataExportDialog</name> |
1652 | 1763 |
<message> |
1653 |
<location filename="../ItemDataExportDialog.py" line="196"/>
|
|
1764 |
<location filename="../ItemDataExportDialog.py" line="192"/>
|
|
1654 | 1765 |
<source>Information</source> |
1655 | 1766 |
<translation type="unfinished"></translation> |
1656 | 1767 |
</message> |
1657 | 1768 |
<message> |
1658 |
<location filename="../ItemDataExportDialog.py" line="196"/>
|
|
1769 |
<location filename="../ItemDataExportDialog.py" line="192"/>
|
|
1659 | 1770 |
<source>Successfully saved.</source> |
1660 | 1771 |
<translation type="unfinished"></translation> |
1661 | 1772 |
</message> |
DTI_PID/DTI_PID/translate/ko_kr.ts | ||
---|---|---|
70 | 70 |
</message> |
71 | 71 |
</context> |
72 | 72 |
<context> |
73 |
<name>CodeTableDialog</name> |
|
74 |
<message> |
|
75 |
<location filename="../CodeTable_UI.py" line="239"/> |
|
76 |
<source>Code Table</source> |
|
77 |
<translation type="unfinished">코드 테이블</translation> |
|
78 |
</message> |
|
79 |
<message> |
|
80 |
<location filename="../CodeTable_UI.py" line="240"/> |
|
81 |
<source>Import</source> |
|
82 |
<translation type="unfinished">불러오기</translation> |
|
83 |
</message> |
|
84 |
<message> |
|
85 |
<location filename="../CodeTable_UI.py" line="241"/> |
|
86 |
<source>Export</source> |
|
87 |
<translation type="unfinished">내보내기</translation> |
|
88 |
</message> |
|
89 |
<message> |
|
90 |
<location filename="../CodeTable_UI.py" line="243"/> |
|
91 |
<source>Nominal Diameter</source> |
|
92 |
<translation type="unfinished"></translation> |
|
93 |
</message> |
|
94 |
<message> |
|
95 |
<location filename="../CodeTable_UI.py" line="245"/> |
|
96 |
<source>Fluid Code</source> |
|
97 |
<translation type="unfinished"></translation> |
|
98 |
</message> |
|
99 |
<message> |
|
100 |
<location filename="../CodeTable_UI.py" line="247"/> |
|
101 |
<source>Insulation Purpose</source> |
|
102 |
<translation type="unfinished"></translation> |
|
103 |
</message> |
|
104 |
<message> |
|
105 |
<location filename="../CodeTable_UI.py" line="249"/> |
|
106 |
<source>P&&ID Number</source> |
|
107 |
<translation type="unfinished"></translation> |
|
108 |
</message> |
|
109 |
<message> |
|
110 |
<location filename="../CodeTable_UI.py" line="251"/> |
|
111 |
<source>Piping Materials Class</source> |
|
112 |
<translation type="unfinished"></translation> |
|
113 |
</message> |
|
114 |
<message> |
|
115 |
<location filename="../CodeTable_UI.py" line="253"/> |
|
116 |
<source>Unit Number</source> |
|
117 |
<translation type="unfinished"></translation> |
|
118 |
</message> |
|
119 |
<message> |
|
120 |
<location filename="../CodeTable_UI.py" line="254"/> |
|
121 |
<source>Valve Oper Code</source> |
|
122 |
<translation type="unfinished"></translation> |
|
123 |
</message> |
|
124 |
<message> |
|
125 |
<location filename="../CodeTable_UI.py" line="255"/> |
|
126 |
<source>Valve Oper Codes</source> |
|
127 |
<translation type="unfinished"></translation> |
|
128 |
</message> |
|
129 |
<message> |
|
130 |
<location filename="../CodeTable_UI.py" line="256"/> |
|
131 |
<source>Tag Name</source> |
|
132 |
<translation type="unfinished"></translation> |
|
133 |
</message> |
|
134 |
<message> |
|
135 |
<location filename="../CodeTable_UI.py" line="257"/> |
|
136 |
<source>Eqp Tag Names</source> |
|
137 |
<translation type="unfinished"></translation> |
|
138 |
</message> |
|
139 |
<message> |
|
140 |
<location filename="../CodeTable_UI.py" line="258"/> |
|
141 |
<source>Reserved Word</source> |
|
142 |
<translation type="unfinished"></translation> |
|
143 |
</message> |
|
144 |
<message> |
|
145 |
<location filename="../CodeTable_UI.py" line="259"/> |
|
146 |
<source>Reserved Words</source> |
|
147 |
<translation type="unfinished"></translation> |
|
148 |
</message> |
|
149 |
<message> |
|
150 |
<location filename="../CodeTable_UI.py" line="267"/> |
|
151 |
<source>Dictionary</source> |
|
152 |
<translation type="unfinished"></translation> |
|
153 |
</message> |
|
154 |
<message> |
|
155 |
<location filename="../CodeTable_UI.py" line="262"/> |
|
156 |
<source>1</source> |
|
157 |
<translation type="unfinished"></translation> |
|
158 |
</message> |
|
159 |
<message> |
|
160 |
<location filename="../CodeTable_UI.py" line="264"/> |
|
161 |
<source>2</source> |
|
162 |
<translation type="unfinished"></translation> |
|
163 |
</message> |
|
164 |
<message> |
|
165 |
<location filename="../CodeTable_UI.py" line="266"/> |
|
166 |
<source>3</source> |
|
167 |
<translation type="unfinished"></translation> |
|
168 |
</message> |
|
169 |
</context> |
|
170 |
<context> |
|
73 | 171 |
<name>ConfigurationDialog</name> |
74 | 172 |
<message> |
75 | 173 |
<location filename="../Configuration_UI.py" line="641"/> |
... | ... | |
1731 | 1829 |
</message> |
1732 | 1830 |
</context> |
1733 | 1831 |
<context> |
1832 |
<name>QCodeTableDialog</name> |
|
1833 |
<message> |
|
1834 |
<location filename="../CodeTableDialog.py" line="240"/> |
|
1835 |
<source>Notice</source> |
|
1836 |
<translation type="unfinished">알림</translation> |
|
1837 |
</message> |
|
1838 |
<message> |
|
1839 |
<location filename="../CodeTableDialog.py" line="240"/> |
|
1840 |
<source>The same code already exists in the table.</source> |
|
1841 |
<translation type="unfinished"></translation> |
|
1842 |
</message> |
|
1843 |
</context> |
|
1844 |
<context> |
|
1734 | 1845 |
<name>QDataExportDialog</name> |
1735 | 1846 |
<message> |
1736 | 1847 |
<location filename="../DataExportDialog.py" line="27"/> |
... | ... | |
1819 | 1930 |
<translation type="obsolete">알림</translation> |
1820 | 1931 |
</message> |
1821 | 1932 |
<message> |
1822 |
<location filename="../ItemDataExportDialog.py" line="196"/>
|
|
1933 |
<location filename="../ItemDataExportDialog.py" line="192"/>
|
|
1823 | 1934 |
<source>Successfully saved.</source> |
1824 | 1935 |
<translation type="unfinished">성공적으로 저장하였습니다.</translation> |
1825 | 1936 |
</message> |
1826 | 1937 |
<message> |
1827 |
<location filename="../ItemDataExportDialog.py" line="196"/>
|
|
1938 |
<location filename="../ItemDataExportDialog.py" line="192"/>
|
|
1828 | 1939 |
<source>Information</source> |
1829 | 1940 |
<translation type="unfinished">정보</translation> |
1830 | 1941 |
</message> |
... | ... | |
2178 | 2289 |
<translation type="unfinished">텍스트</translation> |
2179 | 2290 |
</message> |
2180 | 2291 |
<message> |
2181 |
<location filename="../TextItemEdit_UI.py" line="55"/>
|
|
2182 |
<source>→</source>
|
|
2292 |
<location filename="../TextItemEdit_UI.py" line="58"/>
|
|
2293 |
<source>UID</source>
|
|
2183 | 2294 |
<translation type="unfinished"></translation> |
2184 | 2295 |
</message> |
2185 | 2296 |
<message> |
2186 |
<location filename="../TextItemEdit_UI.py" line="58"/>
|
|
2187 |
<source>UID</source>
|
|
2297 |
<location filename="../TextItemEdit_UI.py" line="55"/>
|
|
2298 |
<source>→</source>
|
|
2188 | 2299 |
<translation type="unfinished"></translation> |
2189 | 2300 |
</message> |
2190 | 2301 |
</context> |
내보내기 Unified diff