Added the About dialog in!

bzr-revno: 49
This commit is contained in:
Raoul Snyman 2008-10-29 19:40:28 +00:00
parent fa0f97c2dc
commit 8f2da0e677
7 changed files with 56 additions and 44 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-10-29, 21:35:04 -->
<!-- Saved: 2008-10-29, 22:39:51 -->
<!-- Copyright (C) 2008 Raoul Snyman, raoulsnyman@openlp.org -->
<Project version="4.2">
<ProgLanguage mixed="0">Python</ProgLanguage>
@ -67,24 +67,12 @@
<Dir>ui</Dir>
<Name>__init__.py</Name>
</Source>
<Source>
<Dir>openlp</Dir>
<Dir>ui</Dir>
<Dir>forms</Dir>
<Name>Ui_mainwindow.py</Name>
</Source>
<Source>
<Dir>openlp</Dir>
<Dir>ui</Dir>
<Dir>forms</Dir>
<Name>__init__.py</Name>
</Source>
<Source>
<Dir>openlp</Dir>
<Dir>ui</Dir>
<Dir>forms</Dir>
<Name>Ui_about.py</Name>
</Source>
<Source>
<Dir>openlp</Dir>
<Name>__init__.py</Name>
@ -141,9 +129,15 @@
</Source>
<Source>
<Dir>openlp</Dir>
<Dir>resources</Dir>
<Dir>ui</Dir>
<Dir>forms</Dir>
<Name>Ui_about.py</Name>
<Name>about.py</Name>
</Source>
<Source>
<Dir>openlp</Dir>
<Dir>ui</Dir>
<Dir>forms</Dir>
<Name>mainwindow.py</Name>
</Source>
</Sources>
<Forms>

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-10-29, 21:40:00 -->
<!-- Saved: 2008-10-29, 22:39:51 -->
<!-- Copyright (C) 2008 Raoul Snyman, raoulsnyman@openlp.org -->
<UserProject version="4.0">
</UserProject>

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-10-29, 21:40:00 -->
<!-- Saved: 2008-10-29, 22:39:51 -->
<Tasks version="4.1">
</Tasks>

View File

@ -15,4 +15,3 @@ You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA
"""

View File

@ -18,3 +18,5 @@ Place, Suite 330, Boston, MA 02111-1307 USA
from mainwindow import MainWindow
from about import AboutForm
__all__ = ['MainWindow', 'AboutForm']

View File

@ -11,17 +11,21 @@ from PyQt4 import QtCore, QtGui
from openlp.resources import *
class AboutForm(object):
def setupUi(self, AboutDialog):
AboutDialog.setObjectName("AboutDialog")
AboutDialog.resize(470, 481)
def __init__(self):
self.about_form = QtGui.QDialog()
self.setupUi()
def setupUi(self):
self.about_form.setObjectName("about_form")
self.about_form.resize(470, 481)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/Logo/favicon.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
AboutDialog.setWindowIcon(icon)
self.AboutDialogLayout = QtGui.QVBoxLayout(AboutDialog)
self.about_form.setWindowIcon(icon)
self.AboutDialogLayout = QtGui.QVBoxLayout(self.about_form)
self.AboutDialogLayout.setSpacing(8)
self.AboutDialogLayout.setMargin(8)
self.AboutDialogLayout.setObjectName("AboutDialogLayout")
self.Logo = QtGui.QLabel(AboutDialog)
self.Logo = QtGui.QLabel(self.about_form)
self.Logo.setAutoFillBackground(True)
self.Logo.setStyleSheet("background-color: rgb(255, 255, 255);")
self.Logo.setFrameShape(QtGui.QFrame.WinPanel)
@ -32,7 +36,7 @@ class AboutForm(object):
self.Logo.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.Logo.setObjectName("Logo")
self.AboutDialogLayout.addWidget(self.Logo)
self.AboutNotebook = QtGui.QTabWidget(AboutDialog)
self.AboutNotebook = QtGui.QTabWidget(self.about_form)
self.AboutNotebook.setObjectName("AboutNotebook")
self.LicenseTab = QtGui.QWidget()
self.LicenseTab.setObjectName("LicenseTab")
@ -112,7 +116,7 @@ class AboutForm(object):
self.CreditsTabLayout.addWidget(self.CreditsScrollArea)
self.AboutNotebook.addTab(self.CreditsTab, "")
self.AboutDialogLayout.addWidget(self.AboutNotebook)
self.ButtonWidget = QtGui.QWidget(AboutDialog)
self.ButtonWidget = QtGui.QWidget(self.about_form)
self.ButtonWidget.setObjectName("ButtonWidget")
self.ButtonWidgetLayout = QtGui.QHBoxLayout(self.ButtonWidget)
self.ButtonWidgetLayout.setSpacing(8)
@ -127,24 +131,24 @@ class AboutForm(object):
self.CloseButton.setObjectName("CloseButton")
self.ButtonWidgetLayout.addWidget(self.CloseButton)
self.AboutDialogLayout.addWidget(self.ButtonWidget)
self.extContributeItem = QtGui.QAction(AboutDialog)
self.extContributeItem = QtGui.QAction(self.about_form)
self.extContributeItem.setObjectName("extContributeItem")
self.retranslateUi(AboutDialog)
self.retranslateUi()
self.AboutNotebook.setCurrentIndex(0)
QtCore.QObject.connect(self.CloseButton, QtCore.SIGNAL("clicked()"), AboutDialog.close)
QtCore.QMetaObject.connectSlotsByName(AboutDialog)
AboutDialog.setTabOrder(self.CreditsScrollArea, self.ContributeButton)
QtCore.QObject.connect(self.CloseButton, QtCore.SIGNAL("clicked()"), self.about_form.close)
QtCore.QMetaObject.connectSlotsByName(self.about_form)
self.about_form.setTabOrder(self.CreditsScrollArea, self.ContributeButton)
def retranslateUi(self, AboutDialog):
AboutDialog.setWindowTitle(QtGui.QApplication.translate("AboutDialog", "About openlp.org", None, QtGui.QApplication.UnicodeUTF8))
self.CopyrightLabel.setText(QtGui.QApplication.translate("AboutDialog", "Copyright © 2004-2008 openlp.org Foundation", None, QtGui.QApplication.UnicodeUTF8))
self.AboutAuthors.setText(QtGui.QApplication.translate("AboutDialog", "openlp.org is written and maintained by volunteers. If you would like to see more free Christian software being written, please consider contributing by using the button below.", None, QtGui.QApplication.UnicodeUTF8))
self.License1Label.setText(QtGui.QApplication.translate("AboutDialog", "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.", None, QtGui.QApplication.UnicodeUTF8))
self.License2Label.setText(QtGui.QApplication.translate("AboutDialog", "You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.", None, QtGui.QApplication.UnicodeUTF8))
self.License3Label.setText(QtGui.QApplication.translate("AboutDialog", "This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.", None, QtGui.QApplication.UnicodeUTF8))
self.AboutNotebook.setTabText(self.AboutNotebook.indexOf(self.LicenseTab), QtGui.QApplication.translate("AboutDialog", "License", None, QtGui.QApplication.UnicodeUTF8))
self.CreditsLabel.setText(QtGui.QApplication.translate("AboutDialog", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
def retranslateUi(self):
self.about_form.setWindowTitle(QtGui.QApplication.translate("about_form", "About openlp.org", None, QtGui.QApplication.UnicodeUTF8))
self.CopyrightLabel.setText(QtGui.QApplication.translate("about_form", "Copyright © 2004-2008 openlp.org Foundation", None, QtGui.QApplication.UnicodeUTF8))
self.AboutAuthors.setText(QtGui.QApplication.translate("about_form", "openlp.org is written and maintained by volunteers. If you would like to see more free Christian software being written, please consider contributing by using the button below.", None, QtGui.QApplication.UnicodeUTF8))
self.License1Label.setText(QtGui.QApplication.translate("about_form", "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.", None, QtGui.QApplication.UnicodeUTF8))
self.License2Label.setText(QtGui.QApplication.translate("about_form", "You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.", None, QtGui.QApplication.UnicodeUTF8))
self.License3Label.setText(QtGui.QApplication.translate("about_form", "This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.", None, QtGui.QApplication.UnicodeUTF8))
self.AboutNotebook.setTabText(self.AboutNotebook.indexOf(self.LicenseTab), QtGui.QApplication.translate("about_form", "License", None, QtGui.QApplication.UnicodeUTF8))
self.CreditsLabel.setText(QtGui.QApplication.translate("about_form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'DejaVu Sans\'; font-size:12pt; font-weight:400; font-style:normal;\">\n"
@ -201,7 +205,13 @@ class AboutForm(object):
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'MS Shell Dlg 2\'; font-size:10pt;\">on the cross, setting us free from sin. We</p>\n"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'MS Shell Dlg 2\'; font-size:10pt;\">bring this software to you for free because</p>\n"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'MS Shell Dlg 2\'; font-size:10pt;\">He has set us free.</p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
self.AboutNotebook.setTabText(self.AboutNotebook.indexOf(self.CreditsTab), QtGui.QApplication.translate("AboutDialog", "Credits", None, QtGui.QApplication.UnicodeUTF8))
self.ContributeButton.setText(QtGui.QApplication.translate("AboutDialog", "Contribute", None, QtGui.QApplication.UnicodeUTF8))
self.CloseButton.setText(QtGui.QApplication.translate("AboutDialog", "Close", None, QtGui.QApplication.UnicodeUTF8))
self.extContributeItem.setText(QtGui.QApplication.translate("AboutDialog", "&Contribute", None, QtGui.QApplication.UnicodeUTF8))
self.AboutNotebook.setTabText(self.AboutNotebook.indexOf(self.CreditsTab), QtGui.QApplication.translate("about_form", "Credits", None, QtGui.QApplication.UnicodeUTF8))
self.ContributeButton.setText(QtGui.QApplication.translate("about_form", "Contribute", None, QtGui.QApplication.UnicodeUTF8))
self.CloseButton.setText(QtGui.QApplication.translate("about_form", "Close", None, QtGui.QApplication.UnicodeUTF8))
self.extContributeItem.setText(QtGui.QApplication.translate("about_form", "&Contribute", None, QtGui.QApplication.UnicodeUTF8))
def show(self):
screen = QtGui.QDesktopWidget().screenGeometry()
size = self.about_form.geometry()
self.about_form.move((screen.width() - size.width()) / 2, (screen.height() - size.height()) / 2)
self.about_form.show()

View File

@ -27,11 +27,13 @@ Place, Suite 330, Boston, MA 02111-1307 USA
from PyQt4 import QtCore, QtGui
from openlp.resources import *
from openlp.ui.forms.about import AboutForm
class MainWindow(object):
def __init__(self):
self.main_window = QtGui.QMainWindow()
self.setupUi()
self.about_form = AboutForm()
def setupUi(self):
self.main_window.setObjectName("main_window")
@ -860,6 +862,8 @@ class MainWindow(object):
QtCore.QObject.connect(self.ThemeManagerDock, QtCore.SIGNAL("visibilityChanged(bool)"), self.ViewThemeManagerItem.setChecked)
QtCore.QMetaObject.connectSlotsByName(self.main_window)
QtCore.QObject.connect(self.HelpAboutItem, QtCore.SIGNAL("triggered()"), self.onHelpAboutItemClicked)
def retranslateUi(self):
self.main_window.setWindowTitle(QtGui.QApplication.translate("main_window", "openlp.org 2.0", None, QtGui.QApplication.UnicodeUTF8))
self.FileMenu.setTitle(QtGui.QApplication.translate("main_window", "&File", None, QtGui.QApplication.UnicodeUTF8))
@ -1005,3 +1009,6 @@ class MainWindow(object):
def show(self):
self.main_window.showMaximized()
def onHelpAboutItemClicked(self):
self.about_form.show()