145 buttons = QMessageBox.Ok |
145 buttons = QMessageBox.Ok |
146 |
146 |
147 defaultButton = self.buttonsCodeListBinary[self.defaultCombo.currentIndex()] |
147 defaultButton = self.buttonsCodeListBinary[self.defaultCombo.currentIndex()] |
148 |
148 |
149 if self.rInformation.isChecked(): |
149 if self.rInformation.isChecked(): |
150 QMessageBox.information(None, |
150 QMessageBox.information(self, |
151 self.eCaption.text(), |
151 self.eCaption.text(), |
152 self.eMessage.toPlainText(), |
152 self.eMessage.toPlainText(), |
153 QMessageBox.StandardButtons(buttons), |
153 QMessageBox.StandardButtons(buttons), |
154 defaultButton |
154 defaultButton |
155 ) |
155 ) |
156 elif self.rQuestion.isChecked(): |
156 elif self.rQuestion.isChecked(): |
157 QMessageBox.question(None, |
157 QMessageBox.question(self, |
158 self.eCaption.text(), |
158 self.eCaption.text(), |
159 self.eMessage.toPlainText(), |
159 self.eMessage.toPlainText(), |
160 QMessageBox.StandardButtons(buttons), |
160 QMessageBox.StandardButtons(buttons), |
161 defaultButton |
161 defaultButton |
162 ) |
162 ) |
163 elif self.rWarning.isChecked(): |
163 elif self.rWarning.isChecked(): |
164 QMessageBox.warning(None, |
164 QMessageBox.warning(self, |
165 self.eCaption.text(), |
165 self.eCaption.text(), |
166 self.eMessage.toPlainText(), |
166 self.eMessage.toPlainText(), |
167 QMessageBox.StandardButtons(buttons), |
167 QMessageBox.StandardButtons(buttons), |
168 defaultButton |
168 defaultButton |
169 ) |
169 ) |
170 elif self.rCritical.isChecked(): |
170 elif self.rCritical.isChecked(): |
171 QMessageBox.critical(None, |
171 QMessageBox.critical(self, |
172 self.eCaption.text(), |
172 self.eCaption.text(), |
173 self.eMessage.toPlainText(), |
173 self.eMessage.toPlainText(), |
174 QMessageBox.StandardButtons(buttons), |
174 QMessageBox.StandardButtons(buttons), |
175 defaultButton |
175 defaultButton |
176 ) |
176 ) |