hytos / DTI_PID / DTI_PID / BMSettingDialog.py @ 1e20221d
이력 | 보기 | 이력해설 | 다운로드 (1.03 KB)
1 |
# coding: utf-8
|
---|---|
2 |
"""
|
3 |
This is area configuration module
|
4 |
"""
|
5 |
import os |
6 |
import sys |
7 |
from PyQt5.QtCore import * |
8 |
from PyQt5.QtGui import * |
9 |
from PyQt5.QtWidgets import * |
10 |
from AppDocData import AppDocData |
11 | |
12 |
import BMSetting_UI |
13 | |
14 |
class BMSettingDialog(QDialog): |
15 |
def __init__(self, parent): |
16 |
QDialog.__init__(self, parent)
|
17 | |
18 |
self.ui = BMSetting_UI.Ui_BMSettingDialog()
|
19 |
self.ui.setupUi(self) |
20 | |
21 | |
22 | |
23 |
|
24 |
def accept(self): |
25 |
try:
|
26 |
self.isAccepted = False |
27 |
QDialog.accept(self)
|
28 | |
29 |
except Exception as ex: |
30 |
from App import App |
31 |
from AppDocData import MessageType |
32 | |
33 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
34 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
35 | |
36 |
def showDialog(self): |
37 |
self.setWindowFlags(self.windowFlags() & ~Qt.WindowCloseButtonHint & ~Qt.WindowContextHelpButtonHint) |
38 |
self.exec_()
|
39 |
return self.isAccepted, self.target |