420 buttons.append("E5MessageBox.YesToAll") |
420 buttons.append("E5MessageBox.YesToAll") |
421 if len(buttons) == 0: |
421 if len(buttons) == 0: |
422 return "" |
422 return "" |
423 |
423 |
424 istring2 = istring + indString |
424 istring2 = istring + indString |
425 joinstring = ' | \\{0}{1}'.format(os.linesep, istring2) |
425 joinstring = ' |{0}{1}'.format(os.linesep, istring2) |
426 if withIntro: |
426 if withIntro: |
427 btnCode = ',{0}{1}E5MessageBox.StandardButtons('.format( |
427 btnCode = ',{0}{1}E5MessageBox.StandardButtons('.format( |
428 os.linesep, istring) |
428 os.linesep, istring) |
429 else: |
429 else: |
430 btnCode = 'E5MessageBox.StandardButtons('.format( |
430 btnCode = 'E5MessageBox.StandardButtons('.format( |
480 icon = "E5MessageBox.Warning" |
480 icon = "E5MessageBox.Warning" |
481 elif self.iconCritical.isChecked(): |
481 elif self.iconCritical.isChecked(): |
482 icon = "E5MessageBox.Critical" |
482 icon = "E5MessageBox.Critical" |
483 |
483 |
484 if not self.rStandard.isChecked(): |
484 if not self.rStandard.isChecked(): |
|
485 resvar = self.eResultVar.text() |
|
486 if not resvar: |
|
487 resvar = "res" |
|
488 |
485 if self.rAbout.isChecked(): |
489 if self.rAbout.isChecked(): |
486 msgdlg = "E5MessageBox.about({0}".format(os.linesep) |
490 msgdlg = "E5MessageBox.about({0}".format(os.linesep) |
487 elif self.rAboutQt.isChecked(): |
491 elif self.rAboutQt.isChecked(): |
488 msgdlg = "E5MessageBox.aboutQt({0}".format(os.linesep) |
492 msgdlg = "E5MessageBox.aboutQt({0}".format(os.linesep) |
489 elif self.rInformation.isChecked(): |
493 elif self.rInformation.isChecked(): |
490 msgdlg = "res = E5MessageBox.information({0}".format( |
494 msgdlg = "{0} = E5MessageBox.information({1}".format( |
491 os.linesep) |
495 resvar, os.linesep) |
492 elif self.rQuestion.isChecked(): |
496 elif self.rQuestion.isChecked(): |
493 msgdlg = "res = E5MessageBox.question({0}".format(os.linesep) |
497 msgdlg = "{0} = E5MessageBox.question({1}".format( |
|
498 resvar, os.linesep) |
494 elif self.rWarning.isChecked(): |
499 elif self.rWarning.isChecked(): |
495 msgdlg = "res = E5MessageBox.warning({0}".format(os.linesep) |
500 msgdlg = "{0} = E5MessageBox.warning({1}".format( |
|
501 resvar, os.linesep) |
496 elif self.rCritical.isChecked(): |
502 elif self.rCritical.isChecked(): |
497 msgdlg = "res = E5MessageBox.critical({0}".format(os.linesep) |
503 msgdlg = "{0} = E5MessageBox.critical({1}".format( |
|
504 resvar, os.linesep) |
498 elif self.rYesNo.isChecked(): |
505 elif self.rYesNo.isChecked(): |
499 msgdlg = "res = E5MessageBox.yesNo({0}".format(os.linesep) |
506 msgdlg = "{0} = E5MessageBox.yesNo({1}".format( |
|
507 resvar, os.linesep) |
500 elif self.rRetryAbort.isChecked(): |
508 elif self.rRetryAbort.isChecked(): |
501 msgdlg = "res = E5MessageBox.retryAbort({0}".format(os.linesep) |
509 msgdlg = "{0} = E5MessageBox.retryAbort({1}".format( |
|
510 resvar, os.linesep) |
502 elif self.rOkToClearData.isChecked(): |
511 elif self.rOkToClearData.isChecked(): |
503 msgdlg = "res = E5MessageBox.okToClearData({0}".format( |
512 msgdlg = "{0} = E5MessageBox.okToClearData({1}".format( |
504 os.linesep) |
513 resvar, os.linesep) |
505 |
514 |
506 msgdlg += '{0}{1}{2}'.format(istring, parent, os.linesep) |
515 msgdlg += '{0}{1},{2}'.format(istring, parent, os.linesep) |
507 msgdlg += '{0}self.trUtf8("{1}")'.format( |
516 msgdlg += '{0}self.trUtf8("{1}")'.format( |
508 istring, self.eCaption.text()) |
517 istring, self.eCaption.text()) |
509 |
518 |
510 if not self.rAboutQt.isChecked(): |
519 if not self.rAboutQt.isChecked(): |
511 msgdlg += ',{0}{1}self.trUtf8("""{2}""")'.format( |
520 msgdlg += ',{0}{1}self.trUtf8("""{2}""")'.format( |
532 saveFunc = self.saveFuncEdit.text() |
541 saveFunc = self.saveFuncEdit.text() |
533 if saveFunc == "": |
542 if saveFunc == "": |
534 saveFunc = "lambda: True" |
543 saveFunc = "lambda: True" |
535 msgdlg += ',{0}{1}{2}'.format(os.linesep, istring, saveFunc) |
544 msgdlg += ',{0}{1}{2}'.format(os.linesep, istring, saveFunc) |
536 else: |
545 else: |
537 msgdlg = "E5MessageBox.E5MessageBox({0}".format(os.linesep) |
546 resvar = self.eResultVar.text() |
538 msgdlg += '{0}{1}{2}'.format(istring, icon, os.linesep) |
547 if not resvar: |
|
548 resvar = "dlg" |
|
549 |
|
550 msgdlg = "{0} = E5MessageBox.E5MessageBox({1}".format( |
|
551 resvar, os.linesep) |
|
552 msgdlg += '{0}{1},{2}'.format(istring, icon, os.linesep) |
539 msgdlg += '{0}self.trUtf8("{1}")'.format( |
553 msgdlg += '{0}self.trUtf8("{1}")'.format( |
540 istring, self.eCaption.text()) |
554 istring, self.eCaption.text()) |
541 msgdlg += ',{0}{1}self.trUtf8("""{2}""")'.format( |
555 msgdlg += ',{0}{1}self.trUtf8("""{2}""")'.format( |
542 os.linesep, istring, self.eMessage.toPlainText()) |
556 os.linesep, istring, self.eMessage.toPlainText()) |
543 if self.modalCheck.isChecked(): |
557 if self.modalCheck.isChecked(): |