프로젝트

일반

사용자정보

개정판 f6ff1533

IDf6ff1533675254ede2f59ee44e9af03bebe1d84b
상위 16dfc99b
하위 491572ed

함의성이(가) 8달 전에 추가함

add validation all

Change-Id: I6ad15a45197efde2f4ced94fe613266cae519a1f

차이점 보기:

DTI_PID/DTI_PID/ValidationDialog.py
6 6
from PyQt5.QtCore import *
7 7
from PyQt5.QtGui import *
8 8
from PyQt5.QtWidgets import *
9
from functools import reduce, partial
9 10
from AppDocData import AppDocData, MessageType, Config
10 11
from ValidateCommand import LineNoValidation, LineValidation, TextValidation, SymbolValidation
11 12

  
......
81 82
        #self.setFixedHeight(240)
82 83
        #self.setFixedWidth(350)
83 84

  
85
        self.ui.checkBoxAll.stateChanged.connect(partial(self.on_checkBox_changed, self.ui.checkBoxAll))
86
        self.ui.checkBoxSymbol.stateChanged.connect(partial(self.on_checkBox_changed, self.ui.checkBoxSymbol))
87
        self.ui.checkBoxText.stateChanged.connect(partial(self.on_checkBox_changed, self.ui.checkBoxText))
88
        self.ui.checkBoxLine.stateChanged.connect(partial(self.on_checkBox_changed, self.ui.checkBoxLine))
89
        self.ui.checkBoxLineNo.stateChanged.connect(partial(self.on_checkBox_changed, self.ui.checkBoxLineNo))
90

  
91
    def on_checkBox_changed(self, checkBox, checkState):
92
        if checkBox is self.ui.checkBoxAll:
93
            for check in self.ui.groupBox_1.children():
94
                if type(check) is QCheckBox:
95
                    check.setChecked(checkState)
96
            for check in self.ui.groupBox_2.children():
97
                if type(check) is QCheckBox:
98
                    check.setChecked(checkState)
99
            for check in self.ui.groupBox_3.children():
100
                if type(check) is QCheckBox:
101
                    check.setChecked(checkState)
102
            for check in self.ui.groupBox_4.children():
103
                if type(check) is QCheckBox:
104
                    check.setChecked(checkState)
105
        elif checkBox is self.ui.checkBoxSymbol:
106
            for check in self.ui.groupBox_1.children():
107
                if type(check) is QCheckBox:
108
                    check.setChecked(checkState)
109
        elif checkBox is self.ui.checkBoxText:
110
            for check in self.ui.groupBox_2.children():
111
                if type(check) is QCheckBox:
112
                    check.setChecked(checkState)
113
        elif checkBox is self.ui.checkBoxLine:
114
            for check in self.ui.groupBox_3.children():
115
                if type(check) is QCheckBox:
116
                    check.setChecked(checkState)
117
        elif checkBox is self.ui.checkBoxLineNo:
118
            for check in self.ui.groupBox_4.children():
119
                if type(check) is QCheckBox:
120
                    check.setChecked(checkState)
121

  
84 122
    def accept(self):
85 123
        if self.ui.checkBoxS_1.isChecked():
86 124
            self.rules.append(SymbolValidation.LineTypeError)

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)