forked from openlp/openlp
add objectName parameter to create_button_box method
remove QMetaObject.connectSlotsByName() calls as they do nothing in our code
This commit is contained in:
parent
d7ab06cc7e
commit
6657e27694
@ -170,7 +170,7 @@ def add_welcome_page(parent, image):
|
||||
parent.welcomeLayout.addStretch()
|
||||
parent.addPage(parent.welcomePage)
|
||||
|
||||
def create_button_box(dialog, standard_buttons, custom_buttons=[]):
|
||||
def create_button_box(dialog, name, standard_buttons, custom_buttons=[]):
|
||||
"""
|
||||
Creates a QDialogButtonBox with the given buttons. The ``accepted()`` and
|
||||
``rejected()`` signals of the button box are connected with the dialogs
|
||||
@ -179,9 +179,12 @@ def create_button_box(dialog, standard_buttons, custom_buttons=[]):
|
||||
``dialog``
|
||||
The parent object. This has to be a ``QDialog`` descendant.
|
||||
|
||||
``name``
|
||||
A string which is set as object name.
|
||||
|
||||
``standard_buttons``
|
||||
A list of strings for the used buttons. It might contain: ``ok``,
|
||||
``save``, and ``cancel``.
|
||||
``save``, ``cancel``, ``close``, and ``defaults``.
|
||||
|
||||
``custom_buttons``
|
||||
A list of additional buttons. If a item is a instance of
|
||||
@ -195,7 +198,12 @@ def create_button_box(dialog, standard_buttons, custom_buttons=[]):
|
||||
buttons |= QtGui.QDialogButtonBox.Save
|
||||
if u'cancel' in standard_buttons:
|
||||
buttons |= QtGui.QDialogButtonBox.Cancel
|
||||
if u'close' in standard_buttons:
|
||||
buttons |= QtGui.QDialogButtonBox.Close
|
||||
if u'defaults' in standard_buttons:
|
||||
buttons |= QtGui.QDialogButtonBox.RestoreDefaults
|
||||
button_box = QtGui.QDialogButtonBox(dialog)
|
||||
button_box.setObjectName(name)
|
||||
button_box.setStandardButtons(buttons)
|
||||
for button in custom_buttons:
|
||||
if isinstance(button, QtGui.QAbstractButton):
|
||||
|
@ -28,7 +28,7 @@
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import build_icon, translate
|
||||
from openlp.core.lib.ui import UiStrings
|
||||
from openlp.core.lib.ui import UiStrings, create_button_box
|
||||
|
||||
class Ui_AboutDialog(object):
|
||||
def setupUi(self, aboutDialog):
|
||||
@ -71,21 +71,15 @@ class Ui_AboutDialog(object):
|
||||
self.licenseTabLayout.addWidget(self.licenseTextEdit)
|
||||
self.aboutNotebook.addTab(self.licenseTab, u'')
|
||||
self.aboutDialogLayout.addWidget(self.aboutNotebook)
|
||||
self.buttonBox = QtGui.QDialogButtonBox(aboutDialog)
|
||||
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Close)
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.contributeButton = QtGui.QPushButton()
|
||||
self.contributeButton.setIcon(
|
||||
build_icon(u':/system/system_contribute.png'))
|
||||
self.contributeButton.setObjectName(u'contributeButton')
|
||||
self.buttonBox.addButton(self.contributeButton,
|
||||
QtGui.QDialogButtonBox.ActionRole)
|
||||
self.buttonBox = create_button_box(aboutDialog, u'buttonBox',
|
||||
[u'close'], [self.contributeButton])
|
||||
self.aboutDialogLayout.addWidget(self.buttonBox)
|
||||
self.retranslateUi(aboutDialog)
|
||||
self.aboutNotebook.setCurrentIndex(0)
|
||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'rejected()'),
|
||||
aboutDialog.close)
|
||||
QtCore.QMetaObject.connectSlotsByName(aboutDialog)
|
||||
|
||||
def retranslateUi(self, aboutDialog):
|
||||
aboutDialog.setWindowTitle(u'%s OpenLP' % UiStrings().About)
|
||||
|
@ -28,6 +28,7 @@
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate, build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
|
||||
class Ui_ExceptionDialog(object):
|
||||
def setupUi(self, exceptionDialog):
|
||||
@ -62,39 +63,30 @@ class Ui_ExceptionDialog(object):
|
||||
self.exceptionTextEdit.setReadOnly(True)
|
||||
self.exceptionTextEdit.setObjectName(u'exceptionTextEdit')
|
||||
self.exceptionLayout.addWidget(self.exceptionTextEdit)
|
||||
self.exceptionButtonBox = QtGui.QDialogButtonBox(exceptionDialog)
|
||||
self.exceptionButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Close)
|
||||
self.exceptionButtonBox.setObjectName(u'exceptionButtonBox')
|
||||
self.exceptionLayout.addWidget(self.exceptionButtonBox)
|
||||
self.sendReportButton = QtGui.QPushButton(exceptionDialog)
|
||||
self.sendReportButton.setIcon(build_icon(
|
||||
u':/general/general_email.png'))
|
||||
self.sendReportButton.setObjectName(u'sendReportButton')
|
||||
self.exceptionButtonBox.addButton(self.sendReportButton,
|
||||
QtGui.QDialogButtonBox.ActionRole)
|
||||
self.saveReportButton = QtGui.QPushButton(exceptionDialog)
|
||||
self.saveReportButton.setIcon(build_icon(u':/general/general_save.png'))
|
||||
self.saveReportButton.setObjectName(u'saveReportButton')
|
||||
self.exceptionButtonBox.addButton(self.saveReportButton,
|
||||
QtGui.QDialogButtonBox.ActionRole)
|
||||
self.attachFileButton = QtGui.QPushButton(exceptionDialog)
|
||||
self.attachFileButton.setIcon(build_icon(u':/general/general_open.png'))
|
||||
self.attachFileButton.setObjectName(u'attachFileButton')
|
||||
self.exceptionButtonBox.addButton(self.attachFileButton,
|
||||
QtGui.QDialogButtonBox.ActionRole)
|
||||
self.buttonBox = create_button_box(exceptionDialog, u'buttonBox',
|
||||
[u'close'], [self.sendReportButton, self.saveReportButton,
|
||||
self.attachFileButton])
|
||||
self.exceptionLayout.addWidget(self.buttonBox)
|
||||
|
||||
self.retranslateUi(exceptionDialog)
|
||||
QtCore.QObject.connect(self.descriptionTextEdit,
|
||||
QtCore.SIGNAL(u'textChanged()'), self.onDescriptionUpdated)
|
||||
QtCore.QObject.connect(self.exceptionButtonBox,
|
||||
QtCore.SIGNAL(u'rejected()'), exceptionDialog.reject)
|
||||
QtCore.QObject.connect(self.sendReportButton,
|
||||
QtCore.SIGNAL(u'pressed()'), self.onSendReportButtonPressed)
|
||||
QtCore.QObject.connect(self.saveReportButton,
|
||||
QtCore.SIGNAL(u'pressed()'), self.onSaveReportButtonPressed)
|
||||
QtCore.QObject.connect(self.attachFileButton,
|
||||
QtCore.SIGNAL(u'pressed()'), self.onAttachFileButtonPressed)
|
||||
QtCore.QMetaObject.connectSlotsByName(exceptionDialog)
|
||||
|
||||
def retranslateUi(self, exceptionDialog):
|
||||
exceptionDialog.setWindowTitle(
|
||||
|
@ -44,12 +44,11 @@ class Ui_FileRenameDialog(object):
|
||||
QtCore.QRegExp(r'[^/\\?*|<>\[\]":+%]+'), self))
|
||||
self.fileNameEdit.setObjectName(u'fileNameEdit')
|
||||
self.dialogLayout.addWidget(self.fileNameEdit, 0, 1)
|
||||
self.buttonBox = create_button_box(fileRenameDialog, [u'cancel', u'ok'])
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.buttonBox = create_button_box(fileRenameDialog, u'buttonBox',
|
||||
[u'cancel', u'ok'])
|
||||
self.dialogLayout.addWidget(self.buttonBox, 1, 0, 1, 2)
|
||||
self.retranslateUi(fileRenameDialog)
|
||||
self.setMaximumHeight(self.sizeHint().height())
|
||||
QtCore.QMetaObject.connectSlotsByName(fileRenameDialog)
|
||||
|
||||
def retranslateUi(self, fileRenameDialog):
|
||||
self.fileNameLabel.setText(translate('OpenLP.FileRenameForm',
|
||||
|
@ -52,13 +52,12 @@ class Ui_FirstTimeLanguageDialog(object):
|
||||
self.languageComboBox.setObjectName("languageComboBox")
|
||||
self.languageLayout.addWidget(self.languageComboBox)
|
||||
self.dialogLayout.addLayout(self.languageLayout)
|
||||
self.buttonBox = create_button_box(languageDialog, [u'cancel', u'ok'])
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.buttonBox = create_button_box(languageDialog, u'buttonBox',
|
||||
[u'cancel', u'ok'])
|
||||
self.dialogLayout.addWidget(self.buttonBox)
|
||||
|
||||
self.retranslateUi(languageDialog)
|
||||
self.setMaximumHeight(self.sizeHint().height())
|
||||
QtCore.QMetaObject.connectSlotsByName(languageDialog)
|
||||
|
||||
def retranslateUi(self, languageDialog):
|
||||
self.setWindowTitle(translate('OpenLP.FirstTimeLanguageForm',
|
||||
|
@ -28,7 +28,7 @@
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib.ui import UiStrings
|
||||
from openlp.core.lib.ui import UiStrings, create_button_box
|
||||
|
||||
class Ui_FormattingTagDialog(object):
|
||||
|
||||
@ -112,13 +112,11 @@ class Ui_FormattingTagDialog(object):
|
||||
self.savePushButton.setObjectName(u'savePushButton')
|
||||
self.dataGridLayout.addWidget(self.savePushButton, 4, 2, 1, 1)
|
||||
self.listdataGridLayout.addWidget(self.editGroupBox, 2, 0, 1, 1)
|
||||
self.buttonBox = QtGui.QDialogButtonBox(formattingTagDialog)
|
||||
self.buttonBox.setObjectName('formattingTagDialogButtonBox')
|
||||
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Close)
|
||||
self.buttonBox = create_button_box(formattingTagDialog, 'buttonBox',
|
||||
[u'close'])
|
||||
self.listdataGridLayout.addWidget(self.buttonBox, 3, 0, 1, 1)
|
||||
|
||||
self.retranslateUi(formattingTagDialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(formattingTagDialog)
|
||||
|
||||
def retranslateUi(self, formattingTagDialog):
|
||||
formattingTagDialog.setWindowTitle(translate(
|
||||
|
@ -372,7 +372,6 @@ class Ui_MainWindow(object):
|
||||
# Connect up some signals and slots
|
||||
QtCore.QObject.connect(self.fileMenu,
|
||||
QtCore.SIGNAL(u'aboutToShow()'), self.updateRecentFilesMenu)
|
||||
QtCore.QMetaObject.connectSlotsByName(mainWindow)
|
||||
# Hide the entry, as it does not have any functionality yet.
|
||||
self.toolsAddToolItem.setVisible(False)
|
||||
self.importLanguageItem.setVisible(False)
|
||||
|
@ -28,7 +28,7 @@
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib.ui import UiStrings
|
||||
from openlp.core.lib.ui import UiStrings, create_button_box
|
||||
|
||||
class Ui_PluginViewDialog(object):
|
||||
def setupUi(self, pluginViewDialog):
|
||||
@ -65,14 +65,10 @@ class Ui_PluginViewDialog(object):
|
||||
self.pluginInfoLayout.addRow(self.aboutLabel, self.aboutTextBrowser)
|
||||
self.listLayout.addWidget(self.pluginInfoGroupBox)
|
||||
self.pluginLayout.addLayout(self.listLayout)
|
||||
self.pluginListButtonBox = QtGui.QDialogButtonBox(pluginViewDialog)
|
||||
self.pluginListButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok)
|
||||
self.pluginListButtonBox.setObjectName(u'pluginListButtonBox')
|
||||
self.pluginLayout.addWidget(self.pluginListButtonBox)
|
||||
self.buttonBox = create_button_box(pluginViewDialog, u'buttonBox',
|
||||
[u'ok'])
|
||||
self.pluginLayout.addWidget(self.buttonBox)
|
||||
self.retranslateUi(pluginViewDialog)
|
||||
QtCore.QObject.connect(self.pluginListButtonBox,
|
||||
QtCore.SIGNAL(u'accepted()'), pluginViewDialog.close)
|
||||
QtCore.QMetaObject.connectSlotsByName(pluginViewDialog)
|
||||
|
||||
def retranslateUi(self, pluginViewDialog):
|
||||
pluginViewDialog.setWindowTitle(
|
||||
|
@ -126,7 +126,6 @@ class Ui_PrintServiceDialog(object):
|
||||
self.optionsLayout.addWidget(self.optionsGroupBox)
|
||||
|
||||
self.retranslateUi(printServiceDialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(printServiceDialog)
|
||||
QtCore.QObject.connect(self.optionsButton,
|
||||
QtCore.SIGNAL(u'toggled(bool)'), self.toggleOptions)
|
||||
|
||||
|
@ -55,12 +55,10 @@ class Ui_ServiceItemEditDialog(object):
|
||||
self.buttonLayout.addWidget(self.upButton)
|
||||
self.buttonLayout.addWidget(self.downButton)
|
||||
self.dialogLayout.addLayout(self.buttonLayout, 0, 1)
|
||||
self.buttonBox = create_button_box(serviceItemEditDialog,
|
||||
self.buttonBox = create_button_box(serviceItemEditDialog, u'buttonBox',
|
||||
[u'cancel', u'save'])
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.dialogLayout.addWidget(self.buttonBox , 1, 0, 1, 2)
|
||||
self.retranslateUi(serviceItemEditDialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(serviceItemEditDialog)
|
||||
|
||||
def retranslateUi(self, serviceItemEditDialog):
|
||||
serviceItemEditDialog.setWindowTitle(
|
||||
|
@ -55,10 +55,9 @@ class ServiceNoteForm(QtGui.QDialog):
|
||||
self.textEdit = SpellTextEdit(self, False)
|
||||
self.textEdit.setObjectName(u'textEdit')
|
||||
self.dialogLayout.addWidget(self.textEdit)
|
||||
self.buttonBox = create_button_box(self, [u'cancel', u'save'])
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.buttonBox = create_button_box(self, u'buttonBox',
|
||||
[u'cancel', u'save'])
|
||||
self.dialogLayout.addWidget(self.buttonBox)
|
||||
QtCore.QMetaObject.connectSlotsByName(self)
|
||||
|
||||
def retranslateUi(self):
|
||||
self.setWindowTitle(
|
||||
|
@ -49,11 +49,10 @@ class Ui_SettingsDialog(object):
|
||||
self.stackedLayout = QtGui.QStackedLayout()
|
||||
self.stackedLayout.setObjectName(u'stackedLayout')
|
||||
self.dialogLayout.addLayout(self.stackedLayout, 0, 1, 1, 1)
|
||||
self.buttonBox = create_button_box(settingsDialog, [u'cancel', u'ok'])
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.buttonBox = create_button_box(settingsDialog, u'buttonBox',
|
||||
[u'cancel', u'ok'])
|
||||
self.dialogLayout.addWidget(self.buttonBox, 1, 1, 1, 1)
|
||||
self.retranslateUi(settingsDialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(settingsDialog)
|
||||
QtCore.QObject.connect(self.settingListWidget,
|
||||
QtCore.SIGNAL(u'currentRowChanged(int)'),
|
||||
self.tabChanged)
|
||||
|
@ -28,6 +28,7 @@
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate, build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
|
||||
class CaptureShortcutButton(QtGui.QPushButton):
|
||||
"""
|
||||
@ -108,18 +109,11 @@ class Ui_ShortcutListDialog(object):
|
||||
self.alternateLabel.setObjectName(u'alternateLabel')
|
||||
self.detailsLayout.addWidget(self.alternateLabel, 0, 2, 1, 1)
|
||||
self.shortcutListLayout.addLayout(self.detailsLayout)
|
||||
self.buttonBox = QtGui.QDialogButtonBox(shortcutListDialog)
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.buttonBox = create_button_box(shortcutListDialog, u'buttonBox',
|
||||
[u'cancel', u'ok', u'defaults'])
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel |
|
||||
QtGui.QDialogButtonBox.Ok | QtGui.QDialogButtonBox.RestoreDefaults)
|
||||
self.shortcutListLayout.addWidget(self.buttonBox)
|
||||
self.retranslateUi(shortcutListDialog)
|
||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'accepted()'),
|
||||
shortcutListDialog.accept)
|
||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'rejected()'),
|
||||
shortcutListDialog.reject)
|
||||
QtCore.QMetaObject.connectSlotsByName(shortcutListDialog)
|
||||
|
||||
def retranslateUi(self, shortcutListDialog):
|
||||
shortcutListDialog.setWindowTitle(
|
||||
|
@ -42,4 +42,3 @@ class SplashScreen(QtGui.QSplashScreen):
|
||||
self.setPixmap(splash_image)
|
||||
self.setMask(splash_image.mask())
|
||||
self.resize(370, 370)
|
||||
QtCore.QMetaObject.connectSlotsByName(self)
|
||||
|
@ -99,12 +99,11 @@ class Ui_StartTimeDialog(object):
|
||||
self.secondFinishLabel.setAlignment(QtCore.Qt.AlignRight)
|
||||
self.dialogLayout.addWidget(self.secondFinishLabel, 3, 3, 1, 1)
|
||||
self.dialogLayout.addWidget(self.secondSpinBox, 3, 1, 1, 1)
|
||||
self.buttonBox = create_button_box(StartTimeDialog, [u'cancel', u'ok'])
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.buttonBox = create_button_box(StartTimeDialog, u'buttonBox',
|
||||
[u'cancel', u'ok'])
|
||||
self.dialogLayout.addWidget(self.buttonBox, 5, 2, 1, 2)
|
||||
self.retranslateUi(StartTimeDialog)
|
||||
self.setMaximumHeight(self.sizeHint().height())
|
||||
QtCore.QMetaObject.connectSlotsByName(StartTimeDialog)
|
||||
|
||||
def retranslateUi(self, StartTimeDialog):
|
||||
self.setWindowTitle(translate('OpenLP.StartTimeForm',
|
||||
|
@ -28,6 +28,7 @@
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
|
||||
|
||||
class Ui_ThemeLayoutDialog(object):
|
||||
@ -35,34 +36,30 @@ class Ui_ThemeLayoutDialog(object):
|
||||
themeLayoutDialog.setObjectName(u'themeLayoutDialogDialog')
|
||||
#themeLayoutDialog.resize(300, 200)
|
||||
self.previewLayout = QtGui.QVBoxLayout(themeLayoutDialog)
|
||||
self.previewLayout.setObjectName(u'PreviewLayout')
|
||||
self.previewLayout.setObjectName(u'previewLayout')
|
||||
self.previewArea = QtGui.QWidget(themeLayoutDialog)
|
||||
self.previewArea.setObjectName(u'PreviewArea')
|
||||
self.previewArea.setObjectName(u'previewArea')
|
||||
self.previewAreaLayout = QtGui.QGridLayout(self.previewArea)
|
||||
self.previewAreaLayout.setMargin(0)
|
||||
self.previewAreaLayout.setColumnStretch(0, 1)
|
||||
self.previewAreaLayout.setRowStretch(0, 1)
|
||||
self.previewAreaLayout.setObjectName(u'PreviewAreaLayout')
|
||||
self.previewAreaLayout.setObjectName(u'previewAreaLayout')
|
||||
self.themeDisplayLabel = QtGui.QLabel(self.previewArea)
|
||||
self.themeDisplayLabel.setFrameShape(QtGui.QFrame.Box)
|
||||
self.themeDisplayLabel.setScaledContents(True)
|
||||
self.themeDisplayLabel.setObjectName(u'ThemeDisplayLabel')
|
||||
self.themeDisplayLabel.setObjectName(u'themeDisplayLabel')
|
||||
self.previewAreaLayout.addWidget(self.themeDisplayLabel)
|
||||
self.previewLayout.addWidget(self.previewArea)
|
||||
self.mainColourLabel = QtGui.QLabel(self.previewArea)
|
||||
self.mainColourLabel.setObjectName(u'MainColourLabel')
|
||||
self.mainColourLabel.setObjectName(u'mainColourLabel')
|
||||
self.previewLayout.addWidget(self.mainColourLabel)
|
||||
self.footerColourLabel = QtGui.QLabel(self.previewArea)
|
||||
self.footerColourLabel.setObjectName(u'FooterColourLabel')
|
||||
self.footerColourLabel.setObjectName(u'footerColourLabel')
|
||||
self.previewLayout.addWidget(self.footerColourLabel)
|
||||
self.buttonBox = QtGui.QDialogButtonBox(themeLayoutDialog)
|
||||
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok)
|
||||
self.buttonBox.setObjectName(u'ButtonBox')
|
||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'accepted()'),
|
||||
themeLayoutDialog.accept)
|
||||
self.buttonBox = create_button_box(themeLayoutDialog, u'buttonBox',
|
||||
[u'ok'])
|
||||
self.previewLayout.addWidget(self.buttonBox)
|
||||
self.retranslateUi(themeLayoutDialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(themeLayoutDialog)
|
||||
|
||||
def retranslateUi(self, themeLayoutDialog):
|
||||
themeLayoutDialog.setWindowTitle(
|
||||
|
@ -417,7 +417,6 @@ class Ui_ThemeWizard(object):
|
||||
QtCore.QObject.connect(self.footerPositionCheckBox,
|
||||
QtCore.SIGNAL(u'toggled(bool)'), self.footerHeightSpinBox,
|
||||
QtCore.SLOT(u'setDisabled(bool)'))
|
||||
QtCore.QMetaObject.connectSlotsByName(themeWizard)
|
||||
|
||||
def retranslateUi(self, themeWizard):
|
||||
themeWizard.setWindowTitle(
|
||||
|
@ -114,7 +114,6 @@ class OpenLPWizard(QtGui.QWizard):
|
||||
self.addCustomPages()
|
||||
self.addProgressPage()
|
||||
self.retranslateUi()
|
||||
QtCore.QMetaObject.connectSlotsByName(self)
|
||||
|
||||
def registerFields(self):
|
||||
"""
|
||||
|
@ -28,7 +28,7 @@
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import build_icon, translate
|
||||
from openlp.core.lib.ui import create_button
|
||||
from openlp.core.lib.ui import create_button, create_button_box
|
||||
|
||||
class Ui_AlertDialog(object):
|
||||
def setupUi(self, alertDialog):
|
||||
@ -73,26 +73,19 @@ class Ui_AlertDialog(object):
|
||||
self.manageButtonLayout.addWidget(self.deleteButton)
|
||||
self.manageButtonLayout.addStretch()
|
||||
self.alertDialogLayout.addLayout(self.manageButtonLayout, 1, 1)
|
||||
self.buttonBox = QtGui.QDialogButtonBox(alertDialog)
|
||||
self.buttonBox.addButton(QtGui.QDialogButtonBox.Close)
|
||||
displayIcon = build_icon(u':/general/general_live.png')
|
||||
self.displayButton = QtGui.QPushButton(alertDialog)
|
||||
self.displayButton.setEnabled(False)
|
||||
self.displayButton.setIcon(displayIcon)
|
||||
self.displayButton.setObjectName(u'displayButton')
|
||||
self.buttonBox.addButton(self.displayButton,
|
||||
QtGui.QDialogButtonBox.ActionRole)
|
||||
self.displayCloseButton = QtGui.QPushButton(alertDialog)
|
||||
self.displayCloseButton.setEnabled(False)
|
||||
self.displayCloseButton.setIcon(displayIcon)
|
||||
self.displayCloseButton.setObjectName(u'displayCloseButton')
|
||||
self.buttonBox.addButton(self.displayCloseButton,
|
||||
QtGui.QDialogButtonBox.ActionRole)
|
||||
self.buttonBox = create_button_box(alertDialog, u'buttonBox',
|
||||
[u'close'], [self.displayButton, self.displayCloseButton])
|
||||
self.alertDialogLayout.addWidget(self.buttonBox, 2, 0, 1, 2)
|
||||
self.retranslateUi(alertDialog)
|
||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'rejected()'),
|
||||
alertDialog.close)
|
||||
QtCore.QMetaObject.connectSlotsByName(alertDialog)
|
||||
|
||||
def retranslateUi(self, alertDialog):
|
||||
alertDialog.setWindowTitle(
|
||||
|
@ -27,6 +27,7 @@
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
|
||||
class Ui_BookNameDialog(object):
|
||||
def setupUi(self, bookNameDialog):
|
||||
@ -78,21 +79,11 @@ class Ui_BookNameDialog(object):
|
||||
self.apocryphaCheckBox.setCheckState(QtCore.Qt.Checked)
|
||||
self.optionsLayout.addWidget(self.apocryphaCheckBox)
|
||||
self.bookNameLayout.addWidget(self.optionsGroupBox)
|
||||
self.buttonBox = QtGui.QDialogButtonBox(bookNameDialog)
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.buttonBox.setStandardButtons(
|
||||
QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.buttonBox = create_button_box(bookNameDialog, u'buttonBox',
|
||||
[u'cancel', u'ok'])
|
||||
self.bookNameLayout.addWidget(self.buttonBox)
|
||||
|
||||
self.retranslateUi(bookNameDialog)
|
||||
QtCore.QObject.connect(
|
||||
self.buttonBox, QtCore.SIGNAL(u'accepted()'),
|
||||
bookNameDialog.accept)
|
||||
QtCore.QObject.connect(
|
||||
self.buttonBox, QtCore.SIGNAL(u'rejected()'),
|
||||
bookNameDialog.reject)
|
||||
QtCore.QMetaObject.connectSlotsByName(bookNameDialog)
|
||||
|
||||
def retranslateUi(self, bookNameDialog):
|
||||
bookNameDialog.setWindowTitle(translate('BiblesPlugin.BookNameDialog',
|
||||
|
@ -27,6 +27,7 @@
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
|
||||
class Ui_LanguageDialog(object):
|
||||
def setupUi(self, languageDialog):
|
||||
@ -60,18 +61,11 @@ class Ui_LanguageDialog(object):
|
||||
self.languageComboBox.setObjectName(u'languageComboBox')
|
||||
self.languageHBoxLayout.addWidget(self.languageComboBox)
|
||||
self.languageLayout.addLayout(self.languageHBoxLayout)
|
||||
self.buttonBox = QtGui.QDialogButtonBox(languageDialog)
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|
|
||||
QtGui.QDialogButtonBox.Ok)
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.buttonBox = create_button_box(languageDialog, u'buttonBox',
|
||||
[u'cancel', u'ok'])
|
||||
self.languageLayout.addWidget(self.buttonBox)
|
||||
|
||||
self.retranslateUi(languageDialog)
|
||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'accepted()'),
|
||||
languageDialog.accept)
|
||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'rejected()'),
|
||||
languageDialog.reject)
|
||||
|
||||
def retranslateUi(self, languageDialog):
|
||||
languageDialog.setWindowTitle(
|
||||
|
@ -97,12 +97,10 @@ class Ui_CustomEditDialog(object):
|
||||
self.bottomFormLayout.addRow(self.creditLabel, self.creditEdit)
|
||||
self.dialogLayout.addLayout(self.bottomFormLayout)
|
||||
self.previewButton = QtGui.QPushButton()
|
||||
self.buttonBox = create_button_box(customEditDialog,
|
||||
self.buttonBox = create_button_box(customEditDialog, u'buttonBox',
|
||||
[u'cancel', u'save'], [self.previewButton])
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.dialogLayout.addWidget(self.buttonBox)
|
||||
self.retranslateUi(customEditDialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(customEditDialog)
|
||||
|
||||
def retranslateUi(self, customEditDialog):
|
||||
customEditDialog.setWindowTitle(
|
||||
|
@ -44,12 +44,10 @@ class Ui_CustomSlideEditDialog(object):
|
||||
self.insertButton = QtGui.QPushButton(customSlideEditDialog)
|
||||
self.insertButton.setIcon(build_icon(u':/general/general_add.png'))
|
||||
self.insertButton.setObjectName(u'insertButton')
|
||||
self.buttonBox = create_button_box(customSlideEditDialog,
|
||||
self.buttonBox = create_button_box(customSlideEditDialog, u'buttonBox',
|
||||
[u'cancel', u'save'], [self.splitButton, self.insertButton])
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.dialogLayout.addWidget(self.buttonBox)
|
||||
self.retranslateUi(customSlideEditDialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(customSlideEditDialog)
|
||||
|
||||
def retranslateUi(self, customSlideEditDialog):
|
||||
self.splitButton.setText(UiStrings().Split)
|
||||
|
@ -57,12 +57,11 @@ class Ui_AuthorsDialog(object):
|
||||
self.displayLabel.setBuddy(self.displayEdit)
|
||||
self.authorLayout.addRow(self.displayLabel, self.displayEdit)
|
||||
self.dialogLayout.addLayout(self.authorLayout)
|
||||
self.buttonBox = create_button_box(authorsDialog, [u'cancel', u'save'])
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.buttonBox = create_button_box(authorsDialog, u'buttonBox',
|
||||
[u'cancel', u'save'])
|
||||
self.dialogLayout.addWidget(self.buttonBox)
|
||||
self.retranslateUi(authorsDialog)
|
||||
authorsDialog.setMaximumHeight(authorsDialog.sizeHint().height())
|
||||
QtCore.QMetaObject.connectSlotsByName(authorsDialog)
|
||||
|
||||
def retranslateUi(self, authorsDialog):
|
||||
authorsDialog.setWindowTitle(
|
||||
|
@ -287,12 +287,11 @@ class Ui_EditSongDialog(object):
|
||||
self.warningLabel.setObjectName(u'warningLabel')
|
||||
self.warningLabel.setVisible(False)
|
||||
self.bottomLayout.addWidget(self.warningLabel)
|
||||
self.buttonBox = create_button_box(editSongDialog, [u'cancel', u'save'])
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.buttonBox = create_button_box(editSongDialog, u'buttonBox',
|
||||
[u'cancel', u'save'])
|
||||
self.bottomLayout.addWidget(self.buttonBox)
|
||||
self.dialogLayout.addLayout(self.bottomLayout)
|
||||
self.retranslateUi(editSongDialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(editSongDialog)
|
||||
|
||||
def retranslateUi(self, editSongDialog):
|
||||
editSongDialog.setWindowTitle(
|
||||
|
@ -65,12 +65,10 @@ class Ui_EditVerseDialog(object):
|
||||
self.verseTypeLayout.addWidget(self.insertButton)
|
||||
self.verseTypeLayout.addStretch()
|
||||
self.dialogLayout.addLayout(self.verseTypeLayout)
|
||||
self.buttonBox = create_button_box(editVerseDialog,
|
||||
self.buttonBox = create_button_box(editVerseDialog, u'buttonBox',
|
||||
[u'cancel', u'save'])
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.dialogLayout.addWidget(self.buttonBox)
|
||||
self.retranslateUi(editVerseDialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(editVerseDialog)
|
||||
|
||||
def retranslateUi(self, editVerseDialog):
|
||||
editVerseDialog.setWindowTitle(
|
||||
|
@ -28,6 +28,7 @@
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate, build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
|
||||
class Ui_MediaFilesDialog(object):
|
||||
def setupUi(self, mediaFilesDialog):
|
||||
@ -51,19 +52,11 @@ class Ui_MediaFilesDialog(object):
|
||||
QtGui.QAbstractItemView.ExtendedSelection)
|
||||
self.fileListWidget.setObjectName(u'fileListWidget')
|
||||
self.filesVerticalLayout.addWidget(self.fileListWidget)
|
||||
self.buttonBox = QtGui.QDialogButtonBox(mediaFilesDialog)
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.buttonBox.setStandardButtons(
|
||||
QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok)
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.buttonBox = create_button_box(mediaFilesDialog, u'buttonBox',
|
||||
[u'cancel', u'ok'])
|
||||
self.filesVerticalLayout.addWidget(self.buttonBox)
|
||||
|
||||
self.retranslateUi(mediaFilesDialog)
|
||||
QtCore.QObject.connect(self.buttonBox,
|
||||
QtCore.SIGNAL(u'accepted()'), mediaFilesDialog.accept)
|
||||
QtCore.QObject.connect(self.buttonBox,
|
||||
QtCore.SIGNAL(u'rejected()'), mediaFilesDialog.reject)
|
||||
QtCore.QMetaObject.connectSlotsByName(mediaFilesDialog)
|
||||
|
||||
def retranslateUi(self, mediaFilesDialog):
|
||||
mediaFilesDialog.setWindowTitle(
|
||||
|
@ -51,12 +51,11 @@ class Ui_SongBookDialog(object):
|
||||
self.publisherLabel.setBuddy(self.publisherEdit)
|
||||
self.bookLayout.addRow(self.publisherLabel, self.publisherEdit)
|
||||
self.dialogLayout.addLayout(self.bookLayout)
|
||||
self.buttonBox = create_button_box(songBookDialog, [u'cancel', u'save'])
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.buttonBox = create_button_box(songBookDialog, u'buttonBox',
|
||||
[u'cancel', u'save'])
|
||||
self.dialogLayout.addWidget(self.buttonBox)
|
||||
self.retranslateUi(songBookDialog)
|
||||
songBookDialog.setMaximumHeight(songBookDialog.sizeHint().height())
|
||||
QtCore.QMetaObject.connectSlotsByName(songBookDialog)
|
||||
|
||||
def retranslateUi(self, songBookDialog):
|
||||
songBookDialog.setWindowTitle(
|
||||
|
@ -28,7 +28,7 @@
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import UiStrings
|
||||
from openlp.core.lib.ui import UiStrings, create_button_box
|
||||
from openlp.plugins.songs.lib.ui import SongStrings
|
||||
|
||||
class Ui_SongMaintenanceDialog(object):
|
||||
@ -132,18 +132,14 @@ class Ui_SongMaintenanceDialog(object):
|
||||
self.stackedLayout.addWidget(self.booksPage)
|
||||
#
|
||||
self.dialogLayout.addLayout(self.stackedLayout, 0, 1)
|
||||
self.buttonBox = QtGui.QDialogButtonBox(songMaintenanceDialog)
|
||||
self.buttonBox.addButton(QtGui.QDialogButtonBox.Close)
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.buttonBox = create_button_box(songMaintenanceDialog, u'buttonBox',
|
||||
[u'close'])
|
||||
self.dialogLayout.addWidget(self.buttonBox, 1, 0, 1, 2)
|
||||
self.retranslateUi(songMaintenanceDialog)
|
||||
self.stackedLayout.setCurrentIndex(0)
|
||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'rejected()'),
|
||||
songMaintenanceDialog.accept)
|
||||
QtCore.QObject.connect(self.typeListWidget,
|
||||
QtCore.SIGNAL(u'currentRowChanged(int)'),
|
||||
self.stackedLayout.setCurrentIndex)
|
||||
QtCore.QMetaObject.connectSlotsByName(songMaintenanceDialog)
|
||||
|
||||
def retranslateUi(self, songMaintenanceDialog):
|
||||
songMaintenanceDialog.setWindowTitle(SongStrings.SongMaintenance)
|
||||
|
@ -45,12 +45,11 @@ class Ui_TopicsDialog(object):
|
||||
self.nameLabel.setBuddy(self.nameEdit)
|
||||
self.nameLayout.addRow(self.nameLabel, self.nameEdit)
|
||||
self.dialogLayout.addLayout(self.nameLayout)
|
||||
self.buttonBox = create_button_box(topicsDialog, [u'cancel', u'save'])
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.buttonBox = create_button_box(topicsDialog, u'buttonBox',
|
||||
[u'cancel', u'save'])
|
||||
self.dialogLayout.addWidget(self.buttonBox)
|
||||
self.retranslateUi(topicsDialog)
|
||||
topicsDialog.setMaximumHeight(topicsDialog.sizeHint().height())
|
||||
QtCore.QMetaObject.connectSlotsByName(topicsDialog)
|
||||
|
||||
def retranslateUi(self, topicsDialog):
|
||||
topicsDialog.setWindowTitle(
|
||||
|
@ -28,6 +28,7 @@
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
|
||||
class Ui_SongUsageDeleteDialog(object):
|
||||
def setupUi(self, songUsageDeleteDialog):
|
||||
@ -47,10 +48,8 @@ class Ui_SongUsageDeleteDialog(object):
|
||||
QtGui.QCalendarWidget.NoVerticalHeader)
|
||||
self.deleteCalendar.setObjectName(u'deleteCalendar')
|
||||
self.verticalLayout.addWidget(self.deleteCalendar)
|
||||
self.buttonBox = QtGui.QDialogButtonBox(songUsageDeleteDialog)
|
||||
self.buttonBox.setStandardButtons(
|
||||
QtGui.QDialogButtonBox.Ok | QtGui.QDialogButtonBox.Cancel)
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.buttonBox = create_button_box(songUsageDeleteDialog, u'buttonBox',
|
||||
[u'cancel', u'ok'])
|
||||
self.verticalLayout.addWidget(self.buttonBox)
|
||||
self.retranslateUi(songUsageDeleteDialog)
|
||||
|
||||
|
@ -74,15 +74,13 @@ class Ui_SongUsageDetailDialog(object):
|
||||
self.saveFilePushButton.setObjectName(u'saveFilePushButton')
|
||||
self.fileHorizontalLayout.addWidget(self.saveFilePushButton)
|
||||
self.verticalLayout.addWidget(self.fileGroupBox)
|
||||
self.buttonBox = create_button_box(songUsageDetailDialog,
|
||||
self.buttonBox = create_button_box(songUsageDetailDialog, u'buttonBox',
|
||||
[u'cancel', u'ok'])
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.verticalLayout.addWidget(self.buttonBox)
|
||||
self.retranslateUi(songUsageDetailDialog)
|
||||
QtCore.QObject.connect(self.saveFilePushButton,
|
||||
QtCore.SIGNAL(u'pressed()'),
|
||||
songUsageDetailDialog.defineOutputLocation)
|
||||
QtCore.QMetaObject.connectSlotsByName(songUsageDetailDialog)
|
||||
|
||||
def retranslateUi(self, songUsageDetailDialog):
|
||||
songUsageDetailDialog.setWindowTitle(
|
||||
|
Loading…
Reference in New Issue
Block a user