19 |
19 |
20 class ErrorLogDialog(QDialog, Ui_ErrorLogDialog): |
20 class ErrorLogDialog(QDialog, Ui_ErrorLogDialog): |
21 """ |
21 """ |
22 Class implementing a dialog to display an error log. |
22 Class implementing a dialog to display an error log. |
23 """ |
23 """ |
24 def __init__(self, logFile, parent=None): |
24 def __init__(self, logFile, showMode, parent=None): |
25 """ |
25 """ |
26 Constructor |
26 Constructor |
27 |
27 |
28 @param logFile name of the log file containing the error info (string) |
28 @param logFile name of the log file containing the error info (string) |
|
29 @param showMode flag indicating to just show the error log message |
|
30 (boolean) |
29 @param parent reference to the parent widget (QWidget) |
31 @param parent reference to the parent widget (QWidget) |
30 """ |
32 """ |
31 super(ErrorLogDialog, self).__init__(parent) |
33 super(ErrorLogDialog, self).__init__(parent) |
32 self.setupUi(self) |
34 self.setupUi(self) |
33 |
35 |
34 pixmap = self.style().standardIcon(QStyle.SP_MessageBoxQuestion)\ |
36 pixmap = self.style().standardIcon(QStyle.SP_MessageBoxQuestion)\ |
35 .pixmap(32, 32) |
37 .pixmap(32, 32) |
36 self.icon.setPixmap(pixmap) |
38 self.icon.setPixmap(pixmap) |
|
39 |
|
40 if showMode: |
|
41 self.icon.hide() |
|
42 self.label.hide() |
|
43 self.deleteButton.setText(self.trUtf8("Delete")) |
|
44 self.keepButton.setText(self.trUtf8("Close")) |
|
45 self.setWindowTitle(self.trUtf8("Error Log")) |
37 |
46 |
38 self.__ui = parent |
47 self.__ui = parent |
39 self.__logFile = logFile |
48 self.__logFile = logFile |
40 |
49 |
41 try: |
50 try: |