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

View File

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

View File

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