Made some tweaks: Added an icon to the main form, set the splash screen to use an image via it's pixmap property. Saved the Eric4's session to the project.

bzr-revno: 76
This commit is contained in:
Raoul Snyman 2008-11-03 21:05:30 +00:00
parent dd19494bbf
commit cc5ab4bc4f
6 changed files with 57 additions and 13 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Project SYSTEM "Project-4.2.dtd">
<!-- eric4 project file for project openlp.org 2.0 -->
<!-- Saved: 2008-11-03, 19:55:02 -->
<!-- Saved: 2008-11-03, 22:59:32 -->
<!-- Copyright (C) 2008 Raoul Snyman, raoulsnyman@openlp.org -->
<Project version="4.2">
<ProgLanguage mixed="0">Python</ProgLanguage>
@ -237,6 +237,12 @@
<Dir>test</Dir>
<Name>test_plugin_manager.py</Name>
</Source>
<Source>
<Dir>openlp</Dir>
<Dir>ui</Dir>
<Dir>forms</Dir>
<Name>splashscreen.py</Name>
</Source>
</Sources>
<Forms>
<Form>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE UserProject SYSTEM "UserProject-4.0.dtd">
<!-- eric4 user project file for project openlp.org 2.0 -->
<!-- Saved: 2008-11-03, 19:55:07 -->
<!-- Saved: 2008-11-03, 23:03:11 -->
<!-- Copyright (C) 2008 Raoul Snyman, raoulsnyman@openlp.org -->
<UserProject version="4.0">
</UserProject>

32
openlp.org 2.0.e4s Normal file
View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Session SYSTEM "Session-4.0.dtd">
<!-- eric4 session file for project openlp.org 2.0 -->
<!-- This file was generated automatically, do not edit. -->
<!-- Saved: 2008-11-03, 22:49:15 -->
<Session version="4.0">
<Filenames>
<Filename cline="24" cindex="13">/home/raoul/Projects/openlp-2/openlp.pyw</Filename>
<Filename cline="30" cindex="0">/home/raoul/Projects/openlp-2/openlp/ui/forms/splashscreen.py</Filename>
<Filename cline="31" cindex="30">/home/raoul/Projects/openlp-2/openlp/ui/forms/mainwindow.py</Filename>
<Filename cline="22" cindex="53">/home/raoul/Projects/openlp-2/openlp/ui/forms/__init__.py</Filename>
</Filenames>
<ActiveWindow cline="24" cindex="13">/home/raoul/Projects/openlp-2/openlp.pyw</ActiveWindow>
<Breakpoints>
</Breakpoints>
<Watchpoints>
</Watchpoints>
<DebugInfo>
<CommandLine></CommandLine>
<WorkingDirectory></WorkingDirectory>
<Environment></Environment>
<ReportExceptions value="True" />
<Exceptions>
</Exceptions>
<AutoClearShell value="True" />
<TracePython value="False" />
<AutoContinue value="True" />
<CovexcPattern></CovexcPattern>
</DebugInfo>
<Bookmarks>
</Bookmarks>
</Session>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Tasks SYSTEM "Tasks-4.1.dtd">
<!-- eric4 tasks file for project openlp.org 2.0 -->
<!-- Saved: 2008-11-03, 19:55:07 -->
<!-- Saved: 2008-11-03, 23:03:11 -->
<Tasks version="4.1">
</Tasks>

View File

@ -29,6 +29,7 @@ from time import sleep
from PyQt4 import QtCore, QtGui
from openlp.ui.forms.about import AboutForm
from openlp.resources import *
class MainWindow(object):
def __init__(self):
@ -44,6 +45,9 @@ class MainWindow(object):
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.main_window.sizePolicy().hasHeightForWidth())
self.main_window.setSizePolicy(sizePolicy)
main_icon = QtGui.QIcon()
main_icon.addPixmap(QtGui.QPixmap(":/icon/openlp.org-icon-32.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.main_window.setWindowIcon(main_icon)
self.MainContent = QtGui.QWidget(self.main_window)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
@ -1009,7 +1013,7 @@ class MainWindow(object):
self.ModeLiveItem.setText(QtGui.QApplication.translate("main_window", "&Live", None, QtGui.QApplication.UnicodeUTF8))
def show(self):
sleep(5)
sleep(2)
self.main_window.showMaximized()
def onHelpAboutItemClicked(self):

View File

@ -27,7 +27,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
from PyQt4 import QtCore, QtGui
#from openlp.resources import *
from openlp.resources import *
class SplashScreen(object):
def __init__(self):
@ -48,14 +48,15 @@ class SplashScreen(object):
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/icon/openlp.org-icon-32.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.splash_screen.setWindowIcon(icon)
self.verticalLayout = QtGui.QVBoxLayout(self.splash_screen)
self.verticalLayout.setSpacing(0)
self.verticalLayout.setMargin(0)
self.verticalLayout.setObjectName("verticalLayout")
self.SplashImage = QtGui.QLabel(self.splash_screen)
self.SplashImage.setPixmap(QtGui.QPixmap(":/graphics/splash-screen-new.bmp"))
self.SplashImage.setObjectName("SplashImage")
self.verticalLayout.addWidget(self.SplashImage)
#self.verticalLayout = QtGui.QVBoxLayout(self.splash_screen)
#self.verticalLayout.setSpacing(0)
#self.verticalLayout.setMargin(0)
#self.verticalLayout.setObjectName("verticalLayout")
#self.SplashImage = QtGui.QLabel(self.splash_screen)
#self.SplashImage.setPixmap(QtGui.QPixmap(":/graphics/splash-screen-new.bmp"))
#self.SplashImage.setObjectName("SplashImage")
#self.verticalLayout.addWidget(self.SplashImage)
self.splash_screen.setPixmap(QtGui.QPixmap(":/graphics/splash-screen-new.bmp"))
self.splash_screen.setWindowFlags(QtCore.Qt.SplashScreen | QtCore.Qt.WindowStaysOnTopHint)
self.retranslateUi()
@ -66,6 +67,7 @@ class SplashScreen(object):
def show(self):
self.splash_screen.show()
self.splash_screen.showMessage(u'Starting...', QtCore.Qt.AlignLeft | QtCore.Qt.AlignBottom, QtCore.Qt.black)
self.splash_screen.repaint()
def finish(self, widget):