개정판 d88d6f39
issue #000: fix msgbox
Change-Id: Ib3dfa0f41d5326a0cd7fbf018ef60d545aec3059
DTI_PID/DTI_PID/CodeTableDialog.py | ||
---|---|---|
237 | 237 |
self.checkRowAndAddRow(tabText, table) |
238 | 238 |
self.setCurrentCode(table, tabText) |
239 | 239 |
else: |
240 |
QMessageBox.warning(self, '알림', '같은 코드가 존재합니다.')
|
|
240 |
QMessageBox.warning(self, self.tr('Notice'), self.tr('The same code already exists in the table.'))
|
|
241 | 241 |
item.setText(self.currentCode[tabText][row]) |
242 | 242 |
elif column == 2: |
243 | 243 |
table.resizeColumnToContents(2) |
DTI_PID/DTI_PID/Commands/AreaOcrCommand.py | ||
---|---|---|
72 | 72 |
rect = rect.toAlignedRect() |
73 | 73 |
self.onSuccess.emit(rect.left(), rect.top(), rect.width(), rect.height()) |
74 | 74 |
else: |
75 |
QMessageBox.about(self.imageViewer, "알림", "부적절한 이미지입니다.\n이미지를 확인해주세요.")
|
|
75 |
QMessageBox.about(self.imageViewer, self.tr('Notice'), self.tr('Please check the image.'))
|
|
76 | 76 |
elif event.button() == Qt.RightButton: |
77 | 77 |
if self.isLeftClicked == False: |
78 | 78 |
self.onRejected.emit(self) |
DTI_PID/DTI_PID/Commands/ConnectionPointCommand.py | ||
---|---|---|
67 | 67 |
self.connectionPointLineEdit.setText(text) |
68 | 68 |
self.onSuccess.emit(conn) |
69 | 69 |
else: |
70 |
QMessageBox.about(self.imageViewer, "알림", "심볼 내부를 선택해주세요.")
|
|
70 |
QMessageBox.about(self.imageViewer, self.tr('Notice'), self.tr('Please select inside of the symbol.'))
|
|
71 | 71 |
|
72 | 72 |
QGraphicsView.mousePressEvent(self.imageViewer, event) |
73 | 73 |
elif 'mouseMoveEvent' == param[0]: |
DTI_PID/DTI_PID/Commands/OriginalPointCommand.py | ||
---|---|---|
65 | 65 |
self.imageViewer.isOriginalPointSelected = True |
66 | 66 |
self.onSuccess.emit(origin) |
67 | 67 |
else: |
68 |
QMessageBox.about(self.imageViewer, "알림", "심볼 내부를 선택해주세요.")
|
|
68 |
QMessageBox.about(self.imageViewer, self.tr('Notice'), self.tr('Please select inside of the symbol.'))
|
|
69 | 69 |
|
70 | 70 |
QGraphicsView.mousePressEvent(self.imageViewer, event) |
71 | 71 |
elif 'mouseMoveEvent' == param[0]: |
DTI_PID/DTI_PID/ItemDataAddEditDialog.py | ||
---|---|---|
41 | 41 |
self.newColName = self.ui.lineEdit.text() |
42 | 42 |
|
43 | 43 |
if not self.validationCheck(self.newColName): |
44 |
QMessageBox.warning(self, self.tr('INFO'), self.tr('Please check column name'))
|
|
44 |
QMessageBox.warning(self, self.tr('Notice'), self.tr('Please check column name'))
|
|
45 | 45 |
return |
46 | 46 |
self.isAccepted = True |
47 | 47 |
|
DTI_PID/DTI_PID/ItemDataExportDialog.py | ||
---|---|---|
166 | 166 |
fileName, ext = os.path.splitext(fileName[0]) |
167 | 167 |
wb.save(fileName + ext if ext == '.xlsx' else fileName + '.xlsx') |
168 | 168 |
|
169 |
QMessageBox.about(self, self.tr("Notice"), self.tr('Successfully saved.'))
|
|
169 |
QMessageBox.about(self, self.tr("INFO"), self.tr('Successfully saved.'))
|
|
170 | 170 |
|
171 | 171 |
command = os.path.join(project.path, fileName + '.xlsx') |
172 | 172 |
subprocess.call(command, shell=True) |
DTI_PID/DTI_PID/ItemTreeWidget.py | ||
---|---|---|
749 | 749 |
return |
750 | 750 |
|
751 | 751 |
## Not found |
752 |
msg = QMessageBox() |
|
753 |
msg.setIcon(QMessageBox.Warning) |
|
754 |
msg.setText('선택하신 심볼의 데이터를 찾을 수 없습니다.') |
|
752 |
QMessageBox.warning(self, self.tr('Error'), self.tr('Can not find data for the selected symbol.')) |
|
755 | 753 |
|
756 | 754 |
''' |
757 | 755 |
@brief remove given item |
DTI_PID/DTI_PID/OcrResultDialog.py | ||
---|---|---|
72 | 72 |
trainingImgPath = os.path.join(project.getTrainingFilePath(), uid) |
73 | 73 |
|
74 | 74 |
self.image.save(trainingImgPath) |
75 |
QMessageBox.about(self, "알림", '저장하였습니다.')
|
|
75 |
QMessageBox.about(self, self.tr("INFO"), self.tr('Successfully saved.'))
|
|
76 | 76 |
QDialog.reject(self) |
77 | 77 |
|
78 | 78 |
def rotateImage(self, isCounterClock): |
... | ... | |
156 | 156 |
try: |
157 | 157 |
text = self.ui.detectResultTextEdit.toPlainText() |
158 | 158 |
if text == '' or text == 'Not Found': |
159 |
QMessageBox.about(self.ui.ocrDialogButtonBox, "알림", "텍스트를 검출(입력) 하신 후 다시 시도해주세요.")
|
|
159 |
QMessageBox.about(self.ui.ocrDialogButtonBox, 'Notice', 'Please try again after recognition or type.')
|
|
160 | 160 |
return |
161 | 161 |
|
162 | 162 |
splitText = text.split('\n') |
DTI_PID/DTI_PID/ProjectDialog.py | ||
---|---|---|
93 | 93 |
if self.selectedProject: |
94 | 94 |
msg = QMessageBox() |
95 | 95 |
msg.setIcon(QMessageBox.Critical) |
96 |
msg.setText("선택한 인식한 프로젝트(" + self.selectedProject.name + ")를 삭제하시겠습니까?\n삭제된 항목은 복구할 수 없습니다.")
|
|
97 |
msg.setWindowTitle("항목 삭제")
|
|
96 |
msg.setText(self.tr('Are you sure you want to delete project "{}" ?\nData can not be restored! '.format(self.selectedProject.name)))
|
|
97 |
msg.setWindowTitle(self.tr('Delete Project'))
|
|
98 | 98 |
msg.setStandardButtons(QMessageBox.Ok|QMessageBox.Cancel) |
99 | 99 |
if QMessageBox.Ok == msg.exec_(): |
100 | 100 |
AppDocData.instance().removeProjectInfo(self.selectedProject) |
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
1084 | 1084 |
if currentPointModeIndex is not None: |
1085 | 1085 |
item.currentPointModeIndex = int(currentPointModeIndex.text) |
1086 | 1086 |
|
1087 |
if type(item) is QEngineeringSpecBreakItem: |
|
1088 |
item.connectors[0].setPos((item.connectors[0].connectPoint[0], item.connectors[0].connectPoint[1])) |
|
1087 |
#if type(item) is QEngineeringSpecBreakItem:
|
|
1088 |
# item.connectors[0].setPos((item.connectors[0].connectPoint[0], item.connectors[0].connectPoint[1]))
|
|
1089 | 1089 |
except Exception as ex: |
1090 | 1090 |
from App import App |
1091 | 1091 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
DTI_PID/DTI_PID/SymbolEditorDialog.py | ||
---|---|---|
513 | 513 |
else: |
514 | 514 |
self.resetUpdateSymbol(imagePath, fileName) ### update roll back 으로 변경해야함 |
515 | 515 |
self.isAccepted = False |
516 |
QMessageBox.about(self.ui.buttonBox, "알림", "심볼 저장 과정 중 문제가 발생했습니다.")
|
|
516 |
QMessageBox.about(self.ui.buttonBox, self.tr('Error'), self.tr('Error occurs during saving symbol, please check data.'))
|
|
517 | 517 |
else: |
518 |
QMessageBox.about(self.ui.buttonBox, "알림", "심볼 저장 과정 중 문제가 발생했습니다.")
|
|
518 |
QMessageBox.about(self.ui.buttonBox, self.tr('Error'), self.tr('Error occurs during saving symbol, please check data.'))
|
|
519 | 519 |
else: |
520 |
print("invalid symbol info") |
|
521 |
QMessageBox.about(self.ui.buttonBox, "알림", exceptionMsg)
|
|
520 |
#print("invalid symbol info")
|
|
521 |
QMessageBox.about(self.ui.buttonBox, self.tr('Notice'), exceptionMsg)
|
|
522 | 522 |
|
523 | 523 |
''' |
524 | 524 |
@brief Called When Close Button Clicked |
... | ... | |
687 | 687 |
text = "{},{},{}".format(parent_index, direction, symbolName) |
688 | 688 |
|
689 | 689 |
if self.isAlreadyAdded(text): |
690 |
QMessageBox.about(self.ui.buttonBox, self.tr("알림"), self.tr("이미 추가된 아이템입니다."))
|
|
690 |
QMessageBox.about(self.ui.buttonBox, self.tr('Notice'), self.tr('Already add item'))
|
|
691 | 691 |
else: |
692 | 692 |
self.ui.additionalSymbolListWidget.addItem(text) |
693 | 693 |
|
... | ... | |
860 | 860 |
@history 2018.05.03 Jeongwoo Change self.dbHelper to AppDocData |
861 | 861 |
''' |
862 | 862 |
def isValidSymbolInfo(self): |
863 |
EXCEPTION_MSG_FORMAT = "{} 입력을 확인해주세요."
|
|
864 |
EXCEPTION_MSG_DUPLICATED_FORMAT = "이미 저장된 {} 값입니다."
|
|
863 |
EXCEPTION_MSG_FORMAT = self.tr('{} Please check input data.')
|
|
864 |
EXCEPTION_MSG_DUPLICATED_FORMAT = self.tr('Already exist data {}.')
|
|
865 | 865 |
infoTitle = "" |
866 | 866 |
|
867 | 867 |
if not self.ui.nameLineEdit.text(): |
DTI_PID/DTI_PID/SymbolTreeWidget.py | ||
---|---|---|
102 | 102 |
def deleteSymbolActionClickEvent(self, itemType, itemName): |
103 | 103 |
msg = QMessageBox() |
104 | 104 |
msg.setIcon(QMessageBox.Critical) |
105 |
msg.setText("선택한 심볼을 삭제하시겠습니까?\n삭제된 심볼은 복구할 수 없습니다.")
|
|
106 |
msg.setWindowTitle("심볼 삭제")
|
|
105 |
msg.setText(self.tr('Are you sure you want to delete selected symbol?\nData can not be restored!'))
|
|
106 |
msg.setWindowTitle(self.tr('Delete symbol'))
|
|
107 | 107 |
msg.setStandardButtons(QMessageBox.Ok|QMessageBox.Cancel) |
108 | 108 |
result = msg.exec_() |
109 | 109 |
self.handleDeleteSymbolAction(result, itemType, itemName) |
... | ... | |
203 | 203 |
(isAccepted, isImmediateInsert, offsetX, offsetY, newSym) = symbolEditorDialog.showDialog() |
204 | 204 |
self.initDirTreeWidget() |
205 | 205 |
else: |
206 |
QMessageBox.about(self, "알림", "심볼 데이터를 불러오는 중 에러가 발생했습니다.")
|
|
206 |
QMessageBox.about(self, self.tr('Error'), self.tr('Error occurs during loading symbol data.'))
|
|
207 | 207 |
except Exception as ex: |
208 | 208 |
from App import App |
209 | 209 |
|
내보내기 Unified diff