25 Constructor |
25 Constructor |
26 """ |
26 """ |
27 ericPic = QPixmap(os.path.join(getConfig('ericPixDir'), 'ericSplash.png')) |
27 ericPic = QPixmap(os.path.join(getConfig('ericPixDir'), 'ericSplash.png')) |
28 self.labelAlignment = \ |
28 self.labelAlignment = \ |
29 Qt.Alignment(Qt.AlignBottom | Qt.AlignRight | Qt.AlignAbsolute) |
29 Qt.Alignment(Qt.AlignBottom | Qt.AlignRight | Qt.AlignAbsolute) |
30 QSplashScreen.__init__(self, ericPic) |
30 super().__init__(ericPic) |
31 self.show() |
31 self.show() |
32 QApplication.flush() |
32 QApplication.flush() |
33 |
33 |
34 def showMessage(self, msg): |
34 def showMessage(self, msg): |
35 """ |
35 """ |
36 Public method to show a message in the bottom part of the splashscreen. |
36 Public method to show a message in the bottom part of the splashscreen. |
37 |
37 |
38 @param msg message to be shown (string) |
38 @param msg message to be shown (string) |
39 """ |
39 """ |
40 logging.debug(msg) |
40 logging.debug(msg) |
41 QSplashScreen.showMessage(self, msg, self.labelAlignment, QColor(Qt.white)) |
41 super().showMessage(msg, self.labelAlignment, QColor(Qt.white)) |
42 QApplication.processEvents() |
42 QApplication.processEvents() |
43 |
43 |
44 def clearMessage(self): |
44 def clearMessage(self): |
45 """ |
45 """ |
46 Public method to clear the message shown. |
46 Public method to clear the message shown. |
47 """ |
47 """ |
48 QSplashScreen.clearMessage(self) |
48 super().clearMessage() |
49 QApplication.processEvents() |
49 QApplication.processEvents() |
50 |
50 |
51 |
51 |
52 class NoneSplashScreen(object): |
52 class NoneSplashScreen(object): |
53 """ |
53 """ |