Icons and naming for aboutdialog

This commit is contained in:
Jon Tibble 2010-07-08 12:24:45 +01:00
parent cea09a4214
commit 6e57776884
3 changed files with 107 additions and 117 deletions

View File

@ -24,98 +24,89 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
from openlp.core.lib import build_icon, translate
class Ui_AboutDialog(object):
def setupUi(self, AboutDialog):
AboutDialog.setObjectName(u'AboutDialog')
AboutDialog.resize(516, 481)
LogoIcon = QtGui.QIcon()
LogoIcon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
AboutDialog.setWindowIcon(LogoIcon)
self.AboutDialogLayout = QtGui.QVBoxLayout(AboutDialog)
self.AboutDialogLayout.setSpacing(8)
self.AboutDialogLayout.setMargin(8)
self.AboutDialogLayout.setObjectName(u'AboutDialogLayout')
self.LogoLabel = QtGui.QLabel(AboutDialog)
self.LogoLabel.setPixmap(
def setupUi(self, aboutDialog):
aboutDialog.setObjectName(u'aboutDialog')
aboutDialog.resize(516, 481)
aboutDialog.setWindowIcon(build_icon(u':/icon/openlp-logo-16x16.png'))
self.aboutDialogLayout = QtGui.QVBoxLayout(aboutDialog)
self.aboutDialogLayout.setSpacing(8)
self.aboutDialogLayout.setMargin(8)
self.aboutDialogLayout.setObjectName(u'aboutDialogLayout')
self.logoLabel = QtGui.QLabel(aboutDialog)
self.logoLabel.setPixmap(
QtGui.QPixmap(u':/graphics/openlp-about-logo.png'))
self.LogoLabel.setScaledContents(False)
self.LogoLabel.setIndent(0)
self.LogoLabel.setObjectName(u'LogoLabel')
self.AboutDialogLayout.addWidget(self.LogoLabel)
self.AboutNotebook = QtGui.QTabWidget(AboutDialog)
self.AboutNotebook.setObjectName(u'AboutNotebook')
self.AboutTab = QtGui.QWidget()
self.AboutTab.setObjectName(u'AboutTab')
self.AboutTabLayout = QtGui.QVBoxLayout(self.AboutTab)
self.AboutTabLayout.setSpacing(0)
self.AboutTabLayout.setMargin(8)
self.AboutTabLayout.setObjectName(u'AboutTabLayout')
self.AboutTextEdit = QtGui.QPlainTextEdit(self.AboutTab)
self.AboutTextEdit.setReadOnly(True)
self.AboutTextEdit.setObjectName(u'AboutTextEdit')
self.AboutTabLayout.addWidget(self.AboutTextEdit)
self.AboutNotebook.addTab(self.AboutTab, '')
self.CreditsTab = QtGui.QWidget()
self.CreditsTab.setObjectName(u'CreditsTab')
self.CreditsTabLayout = QtGui.QVBoxLayout(self.CreditsTab)
self.CreditsTabLayout.setSpacing(0)
self.CreditsTabLayout.setMargin(8)
self.CreditsTabLayout.setObjectName(u'CreditsTabLayout')
self.CreditsTextEdit = QtGui.QPlainTextEdit(self.CreditsTab)
self.CreditsTextEdit.setReadOnly(True)
self.CreditsTextEdit.setObjectName(u'CreditsTextEdit')
self.CreditsTabLayout.addWidget(self.CreditsTextEdit)
self.AboutNotebook.addTab(self.CreditsTab, '')
self.LicenseTab = QtGui.QWidget()
self.LicenseTab.setObjectName(u'LicenseTab')
self.LicenseTabLayout = QtGui.QVBoxLayout(self.LicenseTab)
self.LicenseTabLayout.setSpacing(8)
self.LicenseTabLayout.setMargin(8)
self.LicenseTabLayout.setObjectName(u'LicenseTabLayout')
self.LicenseTextEdit = QtGui.QPlainTextEdit(self.LicenseTab)
self.LicenseTextEdit.setReadOnly(True)
self.LicenseTextEdit.setObjectName(u'LicenseTextEdit')
self.LicenseTabLayout.addWidget(self.LicenseTextEdit)
self.AboutNotebook.addTab(self.LicenseTab, '')
self.AboutDialogLayout.addWidget(self.AboutNotebook)
self.ButtonWidget = QtGui.QWidget(AboutDialog)
self.ButtonWidget.setObjectName(u'ButtonWidget')
self.ButtonWidgetLayout = QtGui.QHBoxLayout(self.ButtonWidget)
self.ButtonWidgetLayout.setSpacing(8)
self.ButtonWidgetLayout.setMargin(0)
self.ButtonWidgetLayout.setObjectName(u'ButtonWidgetLayout')
ButtonSpacer = QtGui.QSpacerItem(275, 20,
self.logoLabel.setScaledContents(False)
self.logoLabel.setIndent(0)
self.logoLabel.setObjectName(u'logoLabel')
self.aboutDialogLayout.addWidget(self.logoLabel)
self.aboutNotebook = QtGui.QTabWidget(aboutDialog)
self.aboutNotebook.setObjectName(u'aboutNotebook')
self.aboutTab = QtGui.QWidget()
self.aboutTab.setObjectName(u'aboutTab')
self.aboutTabLayout = QtGui.QVBoxLayout(self.aboutTab)
self.aboutTabLayout.setSpacing(0)
self.aboutTabLayout.setMargin(8)
self.aboutTabLayout.setObjectName(u'aboutTabLayout')
self.aboutTextEdit = QtGui.QPlainTextEdit(self.aboutTab)
self.aboutTextEdit.setReadOnly(True)
self.aboutTextEdit.setObjectName(u'aboutTextEdit')
self.aboutTabLayout.addWidget(self.aboutTextEdit)
self.aboutNotebook.addTab(self.aboutTab, '')
self.creditsTab = QtGui.QWidget()
self.creditsTab.setObjectName(u'creditsTab')
self.creditsTabLayout = QtGui.QVBoxLayout(self.creditsTab)
self.creditsTabLayout.setSpacing(0)
self.creditsTabLayout.setMargin(8)
self.creditsTabLayout.setObjectName(u'creditsTabLayout')
self.creditsTextEdit = QtGui.QPlainTextEdit(self.creditsTab)
self.creditsTextEdit.setReadOnly(True)
self.creditsTextEdit.setObjectName(u'creditsTextEdit')
self.creditsTabLayout.addWidget(self.creditsTextEdit)
self.aboutNotebook.addTab(self.creditsTab, '')
self.licenseTab = QtGui.QWidget()
self.licenseTab.setObjectName(u'licenseTab')
self.licenseTabLayout = QtGui.QVBoxLayout(self.licenseTab)
self.licenseTabLayout.setSpacing(8)
self.licenseTabLayout.setMargin(8)
self.licenseTabLayout.setObjectName(u'licenseTabLayout')
self.licenseTextEdit = QtGui.QPlainTextEdit(self.licenseTab)
self.licenseTextEdit.setReadOnly(True)
self.licenseTextEdit.setObjectName(u'licenseTextEdit')
self.licenseTabLayout.addWidget(self.licenseTextEdit)
self.aboutNotebook.addTab(self.licenseTab, '')
self.aboutDialogLayout.addWidget(self.aboutNotebook)
self.buttonWidget = QtGui.QWidget(aboutDialog)
self.buttonWidget.setObjectName(u'buttonWidget')
self.buttonWidgetLayout = QtGui.QHBoxLayout(self.buttonWidget)
self.buttonWidgetLayout.setSpacing(8)
self.buttonWidgetLayout.setMargin(0)
self.buttonWidgetLayout.setObjectName(u'buttonWidgetLayout')
buttonSpacer = QtGui.QSpacerItem(275, 20,
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.ButtonWidgetLayout.addItem(ButtonSpacer)
self.ContributeButton = QtGui.QPushButton(self.ButtonWidget)
ContributeIcon = QtGui.QIcon()
ContributeIcon.addPixmap(
QtGui.QPixmap(u':/system/system_contribute.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.ContributeButton.setIcon(ContributeIcon)
self.ContributeButton.setObjectName(u'ContributeButton')
self.ButtonWidgetLayout.addWidget(self.ContributeButton)
self.CloseButton = QtGui.QPushButton(self.ButtonWidget)
CloseIcon = QtGui.QIcon()
CloseIcon.addPixmap(QtGui.QPixmap(u':/system/system_close.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.CloseButton.setIcon(CloseIcon)
self.CloseButton.setObjectName(u'CloseButton')
self.ButtonWidgetLayout.addWidget(self.CloseButton)
self.AboutDialogLayout.addWidget(self.ButtonWidget)
self.buttonWidgetLayout.addItem(buttonSpacer)
self.contributeButton = QtGui.QPushButton(self.buttonWidget)
self.contributeButton.setIcon(
build_icon(u':/system/system_contribute.png'))
self.contributeButton.setObjectName(u'contributeButton')
self.buttonWidgetLayout.addWidget(self.contributeButton)
self.closeButton = QtGui.QPushButton(self.buttonWidget)
self.closeButton.setIcon(build_icon(u':/system/system_close.png'))
self.closeButton.setObjectName(u'closeButton')
self.buttonWidgetLayout.addWidget(self.closeButton)
self.aboutDialogLayout.addWidget(self.buttonWidget)
self.retranslateUi(aboutDialog)
self.aboutNotebook.setCurrentIndex(0)
QtCore.QObject.connect(self.closeButton, QtCore.SIGNAL(u'clicked()'),
aboutDialog.close)
QtCore.QMetaObject.connectSlotsByName(aboutDialog)
self.retranslateUi(AboutDialog)
self.AboutNotebook.setCurrentIndex(0)
QtCore.QObject.connect(self.CloseButton, QtCore.SIGNAL(u'clicked()'),
AboutDialog.close)
QtCore.QMetaObject.connectSlotsByName(AboutDialog)
def retranslateUi(self, AboutDialog):
AboutDialog.setWindowTitle(translate('AboutForm', 'About OpenLP'))
self.AboutTextEdit.setPlainText(translate('AboutForm',
def retranslateUi(self, aboutDialog):
aboutDialog.setWindowTitle(translate('AboutForm', 'About OpenLP'))
self.aboutTextEdit.setPlainText(translate('AboutForm',
'OpenLP <version><revision> - Open Source Lyrics '
'Projection\n'
'\n'
@ -131,11 +122,10 @@ class Ui_AboutDialog(object):
'like to see more free Christian software being written, please '
'consider contributing by using the button below.'
))
self.AboutNotebook.setTabText(
self.AboutNotebook.indexOf(self.AboutTab),
self.aboutNotebook.setTabText(
self.aboutNotebook.indexOf(self.aboutTab),
translate('AboutForm', 'About'))
self.CreditsTextEdit.setPlainText(translate('AboutForm',
self.creditsTextEdit.setPlainText(translate('AboutForm',
'Project Lead\n'
' Raoul "superfly" Snyman\n'
'\n'
@ -165,10 +155,10 @@ class Ui_AboutDialog(object):
' Matthias "matthub" Hub (Mac OS X)\n'
' Raoul "superfly" Snyman (Windows)\n'
))
self.AboutNotebook.setTabText(
self.AboutNotebook.indexOf(self.CreditsTab),
self.aboutNotebook.setTabText(
self.aboutNotebook.indexOf(self.creditsTab),
translate('AboutForm', 'Credits'))
self.LicenseTextEdit.setPlainText(translate('AboutForm',
self.licenseTextEdit.setPlainText(translate('AboutForm',
'Copyright \xa9 2004-2010 Raoul Snyman\n'
'Portions copyright \xa9 2004-2010 '
'Tim Bentley, Jonathan Corwin, Michael Gorven, Scott Guerrieri, '
@ -557,8 +547,8 @@ class Ui_AboutDialog(object):
'linking proprietary applications with the library. If this is '
'what you want to do, use the GNU Lesser General Public License '
'instead of this License.'))
self.AboutNotebook.setTabText(
self.AboutNotebook.indexOf(self.LicenseTab),
self.aboutNotebook.setTabText(
self.aboutNotebook.indexOf(self.licenseTab),
translate('AboutForm', 'License'))
self.ContributeButton.setText(translate('AboutForm', 'Contribute'))
self.CloseButton.setText(translate('AboutForm', 'Close'))
self.contributeButton.setText(translate('AboutForm', 'Contribute'))
self.closeButton.setText(translate('AboutForm', 'Close'))

View File

@ -40,7 +40,7 @@ class AboutForm(QtGui.QDialog, Ui_AboutDialog):
QtGui.QDialog.__init__(self, parent)
self.applicationVersion = applicationVersion
self.setupUi(self)
about_text = self.AboutTextEdit.toPlainText()
about_text = self.aboutTextEdit.toPlainText()
about_text = about_text.replace(u'<version>',
self.applicationVersion[u'version'])
if self.applicationVersion[u'build']:
@ -49,8 +49,8 @@ class AboutForm(QtGui.QDialog, Ui_AboutDialog):
else:
build_text = u''
about_text = about_text.replace(u'<revision>', build_text)
self.AboutTextEdit.setPlainText(about_text)
QtCore.QObject.connect(self.ContributeButton,
self.aboutTextEdit.setPlainText(about_text)
QtCore.QObject.connect(self.contributeButton,
QtCore.SIGNAL(u'clicked()'), self.onContributeButtonClicked)
def onContributeButtonClicked(self):

View File

@ -23,7 +23,7 @@
<property name="modal">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="AboutDialogLayout">
<layout class="QVBoxLayout" name="aboutDialogLayout">
<property name="spacing">
<number>8</number>
</property>
@ -47,11 +47,11 @@
</widget>
</item>
<item>
<widget class="QTabWidget" name="AboutNotebook">
<widget class="QTabWidget" name="aboutNotebook">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="AboutTab">
<widget class="QWidget" name="aboutTab">
<attribute name="title">
<string>About</string>
</attribute>
@ -63,7 +63,7 @@
<number>8</number>
</property>
<item>
<widget class="QPlainTextEdit" name="AboutTextEdit">
<widget class="QPlainTextEdit" name="aboutTextEdit">
<property name="readOnly">
<bool>true</bool>
</property>
@ -80,11 +80,11 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr
</item>
</layout>
</widget>
<widget class="QWidget" name="CreditsTab">
<widget class="QWidget" name="creditsTab">
<attribute name="title">
<string>Credits</string>
</attribute>
<layout class="QVBoxLayout" name="CreditsTabLayout">
<layout class="QVBoxLayout" name="creditsTabLayout">
<property name="spacing">
<number>0</number>
</property>
@ -92,7 +92,7 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr
<number>8</number>
</property>
<item>
<widget class="QPlainTextEdit" name="CreditsTextEdit">
<widget class="QPlainTextEdit" name="creditsTextEdit">
<property name="readOnly">
<bool>true</bool>
</property>
@ -116,11 +116,11 @@ Testers
</item>
</layout>
</widget>
<widget class="QWidget" name="LicenseTab">
<widget class="QWidget" name="licenseTab">
<attribute name="title">
<string>License</string>
</attribute>
<layout class="QVBoxLayout" name="LicenseTabLayout">
<layout class="QVBoxLayout" name="licenseTabLayout">
<property name="spacing">
<number>8</number>
</property>
@ -128,7 +128,7 @@ Testers
<number>8</number>
</property>
<item>
<widget class="QPlainTextEdit" name="LicenseTextEdit">
<widget class="QPlainTextEdit" name="licenseTextEdit">
<property name="readOnly">
<bool>true</bool>
</property>
@ -272,8 +272,8 @@ This General Public License does not permit incorporating your program into prop
</widget>
</item>
<item>
<widget class="QWidget" name="ButtonWidget" native="true">
<layout class="QHBoxLayout" name="ButtonWidgetLayout">
<widget class="QWidget" name="buttonWidget" native="true">
<layout class="QHBoxLayout" name="buttonWidgetLayout">
<property name="spacing">
<number>8</number>
</property>
@ -294,7 +294,7 @@ This General Public License does not permit incorporating your program into prop
</spacer>
</item>
<item>
<widget class="QPushButton" name="ContributeButton">
<widget class="QPushButton" name="contributeButton">
<property name="text">
<string>Contribute</string>
</property>
@ -305,7 +305,7 @@ This General Public License does not permit incorporating your program into prop
</widget>
</item>
<item>
<widget class="QPushButton" name="CloseButton">
<widget class="QPushButton" name="closeButton">
<property name="text">
<string>Close</string>
</property>
@ -326,14 +326,14 @@ This General Public License does not permit incorporating your program into prop
</action>
</widget>
<tabstops>
<tabstop>ContributeButton</tabstop>
<tabstop>contributeButton</tabstop>
</tabstops>
<resources>
<include location="../images/openlp-2.qrc"/>
</resources>
<connections>
<connection>
<sender>CloseButton</sender>
<sender>closeButton</sender>
<signal>clicked()</signal>
<receiver>AboutDialog</receiver>
<slot>close()</slot>