UI/SplashScreen.py

branch
Py2 comp.
changeset 2525
8b507a9a2d40
parent 2302
f29e9405c851
child 3057
10516539f238
equal deleted inserted replaced
2523:139f182b72f6 2525:8b507a9a2d40
4 # 4 #
5 5
6 """ 6 """
7 Module implementing a splashscreen for eric5. 7 Module implementing a splashscreen for eric5.
8 """ 8 """
9
10 from __future__ import unicode_literals # __IGNORE_WARNING__
9 11
10 import os.path 12 import os.path
11 import logging 13 import logging
12 14
13 from PyQt4.QtCore import Qt 15 from PyQt4.QtCore import Qt
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 """

eric ide

mercurial