32 super(E5MessageBoxWizardDialog, self).__init__(parent) |
32 super(E5MessageBoxWizardDialog, self).__init__(parent) |
33 self.setupUi(self) |
33 self.setupUi(self) |
34 |
34 |
35 # keep the following three lists in sync |
35 # keep the following three lists in sync |
36 self.buttonsList = [ |
36 self.buttonsList = [ |
37 self.trUtf8("No button"), |
37 self.tr("No button"), |
38 self.trUtf8("Abort"), |
38 self.tr("Abort"), |
39 self.trUtf8("Apply"), |
39 self.tr("Apply"), |
40 self.trUtf8("Cancel"), |
40 self.tr("Cancel"), |
41 self.trUtf8("Close"), |
41 self.tr("Close"), |
42 self.trUtf8("Discard"), |
42 self.tr("Discard"), |
43 self.trUtf8("Help"), |
43 self.tr("Help"), |
44 self.trUtf8("Ignore"), |
44 self.tr("Ignore"), |
45 self.trUtf8("No"), |
45 self.tr("No"), |
46 self.trUtf8("No to all"), |
46 self.tr("No to all"), |
47 self.trUtf8("Ok"), |
47 self.tr("Ok"), |
48 self.trUtf8("Open"), |
48 self.tr("Open"), |
49 self.trUtf8("Reset"), |
49 self.tr("Reset"), |
50 self.trUtf8("Restore defaults"), |
50 self.tr("Restore defaults"), |
51 self.trUtf8("Retry"), |
51 self.tr("Retry"), |
52 self.trUtf8("Save"), |
52 self.tr("Save"), |
53 self.trUtf8("Save all"), |
53 self.tr("Save all"), |
54 self.trUtf8("Yes"), |
54 self.tr("Yes"), |
55 self.trUtf8("Yes to all"), |
55 self.tr("Yes to all"), |
56 ] |
56 ] |
57 self.buttonsCodeListBinary = [ |
57 self.buttonsCodeListBinary = [ |
58 E5MessageBox.NoButton, |
58 E5MessageBox.NoButton, |
59 E5MessageBox.Abort, |
59 E5MessageBox.Abort, |
60 E5MessageBox.Apply, |
60 E5MessageBox.Apply, |
98 ] |
98 ] |
99 |
99 |
100 self.defaultCombo.addItems(self.buttonsList) |
100 self.defaultCombo.addItems(self.buttonsList) |
101 |
101 |
102 self.bTest = self.buttonBox.addButton( |
102 self.bTest = self.buttonBox.addButton( |
103 self.trUtf8("Test"), QDialogButtonBox.ActionRole) |
103 self.tr("Test"), QDialogButtonBox.ActionRole) |
104 |
104 |
105 self.__enabledGroups() |
105 self.__enabledGroups() |
106 |
106 |
107 def __enabledGroups(self): |
107 def __enabledGroups(self): |
108 """ |
108 """ |
511 elif self.rOkToClearData.isChecked(): |
511 elif self.rOkToClearData.isChecked(): |
512 msgdlg = "{0} = E5MessageBox.okToClearData({1}".format( |
512 msgdlg = "{0} = E5MessageBox.okToClearData({1}".format( |
513 resvar, os.linesep) |
513 resvar, os.linesep) |
514 |
514 |
515 msgdlg += '{0}{1},{2}'.format(istring, parent, os.linesep) |
515 msgdlg += '{0}{1},{2}'.format(istring, parent, os.linesep) |
516 msgdlg += '{0}self.trUtf8("{1}")'.format( |
516 msgdlg += '{0}self.tr("{1}")'.format( |
517 istring, self.eCaption.text()) |
517 istring, self.eCaption.text()) |
518 |
518 |
519 if not self.rAboutQt.isChecked(): |
519 if not self.rAboutQt.isChecked(): |
520 msgdlg += ',{0}{1}self.trUtf8("""{2}""")'.format( |
520 msgdlg += ',{0}{1}self.tr("""{2}""")'.format( |
521 os.linesep, istring, self.eMessage.toPlainText()) |
521 os.linesep, istring, self.eMessage.toPlainText()) |
522 |
522 |
523 if self.rInformation.isChecked() or \ |
523 if self.rInformation.isChecked() or \ |
524 self.rQuestion.isChecked() or \ |
524 self.rQuestion.isChecked() or \ |
525 self.rWarning.isChecked() or \ |
525 self.rWarning.isChecked() or \ |
548 resvar = "dlg" |
548 resvar = "dlg" |
549 |
549 |
550 msgdlg = "{0} = E5MessageBox.E5MessageBox({1}".format( |
550 msgdlg = "{0} = E5MessageBox.E5MessageBox({1}".format( |
551 resvar, os.linesep) |
551 resvar, os.linesep) |
552 msgdlg += '{0}{1},{2}'.format(istring, icon, os.linesep) |
552 msgdlg += '{0}{1},{2}'.format(istring, icon, os.linesep) |
553 msgdlg += '{0}self.trUtf8("{1}")'.format( |
553 msgdlg += '{0}self.tr("{1}")'.format( |
554 istring, self.eCaption.text()) |
554 istring, self.eCaption.text()) |
555 msgdlg += ',{0}{1}self.trUtf8("""{2}""")'.format( |
555 msgdlg += ',{0}{1}self.tr("""{2}""")'.format( |
556 os.linesep, istring, self.eMessage.toPlainText()) |
556 os.linesep, istring, self.eMessage.toPlainText()) |
557 if self.modalCheck.isChecked(): |
557 if self.modalCheck.isChecked(): |
558 msgdlg += ',{0}{1}modal=True'.format(os.linesep, istring) |
558 msgdlg += ',{0}{1}modal=True'.format(os.linesep, istring) |
559 btnCode = self.__getStandardButtonCode( |
559 btnCode = self.__getStandardButtonCode( |
560 istring, indString, withIntro=False) |
560 istring, indString, withIntro=False) |