Use build_icon

This commit is contained in:
Jon Tibble 2010-07-08 12:46:03 +01:00
parent 6e57776884
commit 1b9830429b
6 changed files with 26 additions and 64 deletions

View File

@ -25,16 +25,13 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
from openlp.core.lib import build_icon, translate
class Ui_AlertDialog(object):
def setupUi(self, AlertDialog):
AlertDialog.setObjectName(u'AlertDialog')
AlertDialog.resize(567, 440)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
AlertDialog.setWindowIcon(icon)
AlertDialog.setWindowIcon(build_icon(u':/icon/openlp.org-icon-32.bmp'))
self.AlertDialogLayout = QtGui.QVBoxLayout(AlertDialog)
self.AlertDialogLayout.setSpacing(8)
self.AlertDialogLayout.setMargin(8)
@ -79,25 +76,16 @@ class Ui_AlertDialog(object):
self.ManageButtonLayout.setSpacing(8)
self.ManageButtonLayout.setObjectName(u'ManageButtonLayout')
self.NewButton = QtGui.QPushButton(AlertDialog)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(u':/general/general_new.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.NewButton.setIcon(icon1)
self.NewButton.setIcon(build_icon(u':/general/general_new.png'))
self.NewButton.setObjectName(u'NewButton')
self.ManageButtonLayout.addWidget(self.NewButton)
self.SaveButton = QtGui.QPushButton(AlertDialog)
self.SaveButton.setEnabled(False)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(u':/general/general_save.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.SaveButton.setIcon(icon2)
self.SaveButton.setIcon(build_icon(u':/general/general_save.png'))
self.SaveButton.setObjectName(u'SaveButton')
self.ManageButtonLayout.addWidget(self.SaveButton)
self.DeleteButton = QtGui.QPushButton(AlertDialog)
icon3 = QtGui.QIcon()
icon3.addPixmap(QtGui.QPixmap(u':/general/general_delete.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.DeleteButton.setIcon(icon3)
self.DeleteButton.setIcon(build_icon(u':/general/general_delete.png'))
self.DeleteButton.setObjectName(u'DeleteButton')
self.ManageButtonLayout.addWidget(self.DeleteButton)
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
@ -112,10 +100,7 @@ class Ui_AlertDialog(object):
QtGui.QSizePolicy.Minimum)
self.AlertButtonLayout.addItem(spacerItem1)
self.DisplayButton = QtGui.QPushButton(AlertDialog)
icon4 = QtGui.QIcon()
icon4.addPixmap(QtGui.QPixmap(u':/general/general_live.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.DisplayButton.setIcon(icon4)
self.DisplayButton.setIcon(build_icon(u':/general/general_live.png'))
self.DisplayButton.setObjectName(u'DisplayButton')
self.AlertButtonLayout.addWidget(self.DisplayButton)
self.DisplayCloseButton = QtGui.QPushButton(AlertDialog)
@ -123,10 +108,7 @@ class Ui_AlertDialog(object):
self.DisplayCloseButton.setObjectName(u'DisplayCloseButton')
self.AlertButtonLayout.addWidget(self.DisplayCloseButton)
self.CloseButton = QtGui.QPushButton(AlertDialog)
icon5 = QtGui.QIcon()
icon5.addPixmap(QtGui.QPixmap(u':/system/system_close.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.CloseButton.setIcon(icon5)
self.CloseButton.setIcon(build_icon(u':/system/system_close.png'))
self.CloseButton.setObjectName(u'CloseButton')
self.AlertButtonLayout.addWidget(self.CloseButton)
self.AlertDialogLayout.addLayout(self.AlertButtonLayout)

View File

@ -24,7 +24,8 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
from openlp.core.lib import build_icon, translate
class Ui_BibleImportWizard(object):
def setupUi(self, BibleImportWizard):
@ -104,10 +105,7 @@ class Ui_BibleImportWizard(object):
self.OsisLocationLayout.addWidget(self.OSISLocationEdit)
self.OsisFileButton = QtGui.QToolButton(self.OsisPage)
self.OsisFileButton.setMaximumSize(QtCore.QSize(32, 16777215))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(u':/general/general_open.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.OsisFileButton.setIcon(icon)
self.OsisFileButton.setIcon(build_icon(u':/general/general_open.png'))
self.OsisFileButton.setObjectName(u'OsisFileButton')
self.OsisLocationLayout.addWidget(self.OsisFileButton)
self.OsisLayout.setLayout(1, QtGui.QFormLayout.FieldRole,

View File

@ -25,16 +25,14 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
from openlp.core.lib import build_icon, translate
class Ui_customEditDialog(object):
def setupUi(self, customEditDialog):
customEditDialog.setObjectName(u'customEditDialog')
customEditDialog.resize(590, 541)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
customEditDialog.setWindowIcon(icon)
customEditDialog.setWindowIcon(
build_icon(u':/icon/openlp.org-icon-32.bmp'))
self.gridLayout = QtGui.QGridLayout(customEditDialog)
self.gridLayout.setObjectName(u'gridLayout')
self.horizontalLayout = QtGui.QHBoxLayout()
@ -56,20 +54,14 @@ class Ui_customEditDialog(object):
self.verticalLayout = QtGui.QVBoxLayout()
self.verticalLayout.setObjectName(u'verticalLayout')
self.UpButton = QtGui.QPushButton(customEditDialog)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(u':/services/service_up.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.UpButton.setIcon(icon1)
self.UpButton.setIcon(build_icon(u':/services/service_up.png'))
self.UpButton.setObjectName(u'UpButton')
self.verticalLayout.addWidget(self.UpButton)
spacerItem = QtGui.QSpacerItem(20, 128, QtGui.QSizePolicy.Minimum,
QtGui.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem)
self.DownButton = QtGui.QPushButton(customEditDialog)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(u':/services/service_down.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.DownButton.setIcon(icon2)
self.DownButton.setIcon(build_icon(u':/services/service_down.png'))
self.DownButton.setObjectName(u'DownButton')
self.verticalLayout.addWidget(self.DownButton)
self.horizontalLayout_4.addLayout(self.verticalLayout)
@ -138,7 +130,6 @@ class Ui_customEditDialog(object):
QtGui.QDialogButtonBox.Save)
self.buttonBox.setObjectName(u'buttonBox')
self.gridLayout.addWidget(self.buttonBox, 5, 0, 1, 1)
self.retranslateUi(customEditDialog)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'accepted()'),
customEditDialog.accept)

View File

@ -25,7 +25,7 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
from openlp.core.lib import build_icon, translate
from openlp.plugins.songs.lib import VerseType
class Ui_EditVerseDialog(object):
@ -61,10 +61,7 @@ class Ui_EditVerseDialog(object):
self.VerseNumberBox.setObjectName(u'VerseNumberBox')
self.VerseTypeLayout.addWidget(self.VerseNumberBox)
self.InsertButton = QtGui.QPushButton(EditVerseDialog)
self.AddIcon = QtGui.QIcon()
self.AddIcon.addPixmap(QtGui.QPixmap(u':/general/general_add.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.InsertButton.setIcon(self.AddIcon)
self.InsertButton.setIcon(build_icon(u':/general/general_add.png'))
self.InsertButton.setObjectName(u'InsertButton')
self.VerseTypeLayout.addWidget(self.InsertButton)
self.VerseTypeSpacer = QtGui.QSpacerItem(40, 20,

View File

@ -25,7 +25,7 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
from openlp.core.lib import build_icon, translate
class Ui_SongImportWizard(object):
def setupUi(self, SongImportWizard):
@ -109,21 +109,16 @@ class Ui_SongImportWizard(object):
self.OpenLyricsButtonLayout.setSpacing(8)
self.OpenLyricsButtonLayout.setObjectName(u'OpenLyricsButtonLayout')
self.OpenLyricsAddButton = QtGui.QPushButton(self.OpenLyricsPage)
self.OpenIcon = QtGui.QIcon()
self.OpenIcon.addPixmap(QtGui.QPixmap(u':/general/general_open.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.DeleteIcon = QtGui.QIcon()
self.DeleteIcon.addPixmap(
QtGui.QPixmap(u':/general/general_delete.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.OpenLyricsAddButton.setIcon(self.OpenIcon)
self.OpenLyricsAddButton.setIcon(
build_icon(u':/general/general_open.png'))
self.OpenLyricsAddButton.setObjectName(u'OpenLyricsAddButton')
self.OpenLyricsButtonLayout.addWidget(self.OpenLyricsAddButton)
self.OpenLyricsButtonSpacer = QtGui.QSpacerItem(40, 20,
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.OpenLyricsButtonLayout.addItem(self.OpenLyricsButtonSpacer)
self.OpenLyricsRemoveButton = QtGui.QPushButton(self.OpenLyricsPage)
self.OpenLyricsRemoveButton.setIcon(self.DeleteIcon)
self.OpenLyricsRemoveButton.setIcon(
build_icon(u':/general/general_delete.png'))
self.OpenLyricsRemoveButton.setObjectName(u'OpenLyricsRemoveButton')
self.OpenLyricsButtonLayout.addWidget(self.OpenLyricsRemoveButton)
self.OpenLyricsLayout.addLayout(self.OpenLyricsButtonLayout)

View File

@ -24,7 +24,8 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
from openlp.core.lib import build_icon, translate
class Ui_SongUsageDetailDialog(object):
def setupUi(self, SongUsageDetailDialog):
@ -60,10 +61,8 @@ class Ui_SongUsageDetailDialog(object):
self.FileLineEdit.setObjectName(u'FileLineEdit')
self.horizontalLayout.addWidget(self.FileLineEdit)
self.SaveFilePushButton = QtGui.QPushButton(self.FileGroupBox)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(u':/general/general_load.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.SaveFilePushButton.setIcon(icon)
self.SaveFilePushButton.setIcon(
build_icon(u':/general/general_load.png'))
self.SaveFilePushButton.setObjectName(u'SaveFilePushButton')
self.horizontalLayout.addWidget(self.SaveFilePushButton)
self.verticalLayout_4.addLayout(self.horizontalLayout)