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