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