openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #05245
[Merge] lp:~m2j/openlp/work into lp:openlp
m2j has proposed merging lp:~m2j/openlp/work into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
#609356 Web bibles don't download all their books on import
https://bugs.launchpad.net/bugs/609356
#661867 Invalid author added in song dialog
https://bugs.launchpad.net/bugs/661867
#686103 Labels in theme wizard out of alignment on Windows
https://bugs.launchpad.net/bugs/686103
For more details, see:
https://code.launchpad.net/~m2j/openlp/work/+merge/45009
There were some layout issues with translated strings because of some static layout. I purged the setupUI() calls all over openlp.core and the setting tabs.
About the settings tabs. Some code is repeating on all setting tabs. I left it because I didn't want to change basic things before alpha4.
--
https://code.launchpad.net/~m2j/openlp/work/+merge/45009
Your team OpenLP Core is requested to review the proposed merge of lp:~m2j/openlp/work into lp:openlp.
=== modified file 'openlp/core/lib/dockwidget.py'
--- openlp/core/lib/dockwidget.py 2010-12-28 10:35:59 +0000
+++ openlp/core/lib/dockwidget.py 2011-01-02 22:57:56 +0000
@@ -48,4 +48,3 @@
self.setObjectName(name)
if icon:
self.setWindowIcon(icon)
- self.setFloating(False)
=== modified file 'openlp/core/ui/__init__.py'
--- openlp/core/ui/__init__.py 2010-12-26 11:04:47 +0000
+++ openlp/core/ui/__init__.py 2011-01-02 22:57:56 +0000
@@ -29,9 +29,10 @@
class HideMode(object):
"""
- This is basically an enumeration class which specifies the mode of a Bible.
- Mode refers to whether or not a Bible in OpenLP is a full Bible or needs to
- be downloaded from the Internet on an as-needed basis.
+ This is basically an enumeration class which specifies differnt hiding modes
+ for the display. The option ``Blank`` to cover the display black. The option
+ ``Theme`` removes the content from the theme. ``Screen`` finally hides the
+ output, so that the users desktop is usually shown.
"""
Blank = 1
Theme = 2
@@ -58,4 +59,4 @@
__all__ = ['SplashScreen', 'AboutForm', 'SettingsForm',
'MainDisplay', 'SlideController', 'ServiceManager', 'ThemeManager',
- 'MediaDockManager', 'ServiceItemEditForm']
\ No newline at end of file
+ 'MediaDockManager', 'ServiceItemEditForm']
=== modified file 'openlp/core/ui/aboutdialog.py'
--- openlp/core/ui/aboutdialog.py 2010-12-26 11:04:47 +0000
+++ openlp/core/ui/aboutdialog.py 2011-01-02 22:57:56 +0000
@@ -31,17 +31,12 @@
class Ui_AboutDialog(object):
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)
@@ -49,59 +44,44 @@
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.aboutNotebook.addTab(self.aboutTab, u'')
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.aboutNotebook.addTab(self.creditsTab, u'')
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.aboutNotebook.addTab(self.licenseTab, u'')
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)
+ 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.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.buttonBox.addButton(self.contributeButton,
+ QtGui.QDialogButtonBox.ActionRole)
+ self.aboutDialogLayout.addWidget(self.buttonBox)
self.retranslateUi(aboutDialog)
self.aboutNotebook.setCurrentIndex(0)
- QtCore.QObject.connect(self.closeButton, QtCore.SIGNAL(u'clicked()'),
+ QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'rejected()'),
aboutDialog.close)
QtCore.QMetaObject.connectSlotsByName(aboutDialog)
@@ -575,4 +555,3 @@
translate('OpenLP.AboutForm', 'License'))
self.contributeButton.setText(translate('OpenLP.AboutForm',
'Contribute'))
- self.closeButton.setText(translate('OpenLP.AboutForm', 'Close'))
\ No newline at end of file
=== modified file 'openlp/core/ui/advancedtab.py'
--- openlp/core/ui/advancedtab.py 2010-12-26 11:04:47 +0000
+++ openlp/core/ui/advancedtab.py 2011-01-02 22:57:56 +0000
@@ -46,92 +46,65 @@
Configure the UI elements for the tab.
"""
self.setObjectName(u'AdvancedTab')
- self.tabTitleVisible = translate('OpenLP.AdvancedTab', 'Advanced')
self.advancedTabLayout = QtGui.QHBoxLayout(self)
- self.advancedTabLayout.setSpacing(8)
- self.advancedTabLayout.setMargin(8)
+ self.advancedTabLayout.setObjectName(u'advancedTabLayout')
self.leftWidget = QtGui.QWidget(self)
+ self.leftWidget.setObjectName(u'leftWidget')
self.leftLayout = QtGui.QVBoxLayout(self.leftWidget)
- self.leftLayout.setSpacing(8)
self.leftLayout.setMargin(0)
+ self.leftLayout.setObjectName(u'leftLayout')
self.uiGroupBox = QtGui.QGroupBox(self.leftWidget)
self.uiGroupBox.setObjectName(u'uiGroupBox')
- self.uiLayout = QtGui.QVBoxLayout(self.uiGroupBox)
- self.uiLayout.setSpacing(8)
- self.uiLayout.setMargin(6)
+ self.uiLayout = QtGui.QFormLayout(self.uiGroupBox)
self.uiLayout.setObjectName(u'uiLayout')
- self.recentLayout = QtGui.QHBoxLayout()
- self.recentLayout.setSpacing(8)
- self.recentLayout.setMargin(0)
- self.recentLayout.setObjectName(u'recentLayout')
self.recentLabel = QtGui.QLabel(self.uiGroupBox)
self.recentLabel.setObjectName(u'recentLabel')
- self.recentLayout.addWidget(self.recentLabel)
self.recentSpinBox = QtGui.QSpinBox(self.uiGroupBox)
self.recentSpinBox.setObjectName(u'recentSpinBox')
self.recentSpinBox.setMinimum(0)
- self.recentLayout.addWidget(self.recentSpinBox)
- self.recentSpacer = QtGui.QSpacerItem(50, 20,
- QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
- self.recentLayout.addItem(self.recentSpacer)
- self.uiLayout.addLayout(self.recentLayout)
+ self.uiLayout.addRow(self.recentLabel, self.recentSpinBox)
self.mediaPluginCheckBox = QtGui.QCheckBox(self.uiGroupBox)
self.mediaPluginCheckBox.setObjectName(u'mediaPluginCheckBox')
- self.uiLayout.addWidget(self.mediaPluginCheckBox)
+ self.uiLayout.addRow(self.mediaPluginCheckBox)
self.doubleClickLiveCheckBox = QtGui.QCheckBox(self.uiGroupBox)
self.doubleClickLiveCheckBox.setObjectName(u'doubleClickLiveCheckBox')
- self.uiLayout.addWidget(self.doubleClickLiveCheckBox)
-# self.expandServiceItemCheckBox = QtGui.QCheckBox(self.uiGroupBox)
-# self.expandServiceItemCheckBox.setObjectName(
-# u'expandServiceItemCheckBox')
-# self.uiLayout.addWidget(self.expandServiceItemCheckBox)
- self.leftLayout.addWidget(self.uiGroupBox)
+ self.uiLayout.addRow(self.doubleClickLiveCheckBox)
self.expandServiceItemCheckBox = QtGui.QCheckBox(self.uiGroupBox)
self.expandServiceItemCheckBox.setObjectName(
u'expandServiceItemCheckBox')
- self.uiLayout.addWidget(self.expandServiceItemCheckBox)
+ self.uiLayout.addRow(self.expandServiceItemCheckBox)
+ self.leftLayout.addWidget(self.uiGroupBox)
# self.sharedDirGroupBox = QtGui.QGroupBox(self.leftWidget)
# self.sharedDirGroupBox.setObjectName(u'sharedDirGroupBox')
-# self.sharedDirGroupBox.setGeometry(QtCore.QRect(0, 65, 500, 85))
-# self.sharedDirGroupBox.setMaximumSize(QtCore.QSize(500, 85))
-# self.sharedDirLayout = QtGui.QVBoxLayout(self.sharedDirGroupBox)
-# self.sharedDirLayout.setSpacing(8)
-# self.sharedDirLayout.setMargin(8)
+# self.sharedDirLayout = QtGui.QFormLayout(self.sharedDirGroupBox)
# self.sharedCheckBox = QtGui.QCheckBox(self.sharedDirGroupBox)
# self.sharedCheckBox.setObjectName(u'sharedCheckBox')
-# self.sharedDirLayout.addWidget(self.sharedCheckBox)
-# self.sharedSubLayout = QtGui.QHBoxLayout()
-# self.sharedSubLayout.setSpacing(8)
-# self.sharedSubLayout.setMargin(0)
+# self.sharedDirLayout.addRow(self.sharedCheckBox)
# self.sharedLabel = QtGui.QLabel(self.sharedDirGroupBox)
# self.sharedLabel.setObjectName(u'sharedLabel')
-# self.sharedSubLayout.addWidget(self.sharedLabel)
+# self.sharedSubLayout = QtGui.QHBoxLayout()
+# self.sharedSubLayout.setObjectName(u'sharedSubLayout')
# self.sharedLineEdit = QtGui.QLineEdit(self.sharedDirGroupBox)
# self.sharedLineEdit.setObjectName(u'sharedLineEdit')
# self.sharedSubLayout.addWidget(self.sharedLineEdit)
# self.sharedPushButton = QtGui.QPushButton(self.sharedDirGroupBox)
# self.sharedPushButton.setObjectName(u'sharedPushButton')
# self.sharedSubLayout.addWidget(self.sharedPushButton)
-# self.sharedDirLayout.addLayout(self.sharedSubLayout)
+# self.sharedDirLayout.addRow(self.sharedLabel, self.sharedSubLayout)
# self.leftLayout.addWidget(self.sharedDirGroupBox)
- self.leftSpacer = QtGui.QSpacerItem(20, 40,
- QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.leftLayout.addItem(self.leftSpacer)
+ self.leftLayout.addStretch()
self.advancedTabLayout.addWidget(self.leftWidget)
self.rightWidget = QtGui.QWidget(self)
+ self.rightWidget.setObjectName(u'rightWidget')
self.rightLayout = QtGui.QVBoxLayout(self.rightWidget)
- self.rightLayout.setSpacing(8)
self.rightLayout.setMargin(0)
+ self.rightLayout.setObjectName(u'rightLayout')
# self.databaseGroupBox = QtGui.QGroupBox(self.rightWidget)
# self.databaseGroupBox.setObjectName(u'databaseGroupBox')
# self.databaseGroupBox.setEnabled(False)
# self.databaseLayout = QtGui.QVBoxLayout(self.databaseGroupBox)
-# self.databaseLayout.setSpacing(8)
-# self.databaseLayout.setMargin(8)
# self.rightLayout.addWidget(self.databaseGroupBox)
- self.rightSpacer = QtGui.QSpacerItem(20, 40,
- QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
- self.rightLayout.addItem(self.rightSpacer)
+ self.rightLayout.addStretch()
self.advancedTabLayout.addWidget(self.rightWidget)
# QtCore.QObject.connect(self.sharedCheckBox,
# QtCore.SIGNAL(u'stateChanged(int)'), self.onSharedCheckBoxChanged)
@@ -140,6 +113,7 @@
"""
Setup the interface translation strings.
"""
+ self.tabTitleVisible = translate('OpenLP.AdvancedTab', 'Advanced')
self.uiGroupBox.setTitle(translate('OpenLP.AdvancedTab', 'UI Settings'))
self.recentLabel.setText(
translate('OpenLP.AdvancedTab',
@@ -158,6 +132,20 @@
# self.sharedPushButton.setText(translate('AdvancedTab', 'Browse...'))
# self.databaseGroupBox.setTitle(translate('AdvancedTab', 'Databases'))
+ def resizeEvent(self, event=None):
+ """
+ Resize the sides in two equal halves if the layout allows this.
+ """
+ if event:
+ SettingsTab.resizeEvent(self, event)
+ width = self.width() - self.advancedTabLayout.spacing() - \
+ self.advancedTabLayout.contentsMargins().left() - \
+ self.advancedTabLayout.contentsMargins().right()
+ left_width = min(width - self.rightWidget.minimumSizeHint().width(),
+ width / 2)
+ left_width = max(left_width, self.leftWidget.minimumSizeHint().width())
+ self.leftWidget.setMinimumWidth(left_width)
+
def load(self):
"""
Load settings from disk.
@@ -204,4 +192,4 @@
"""
self.sharedLabel.setEnabled(checked)
self.sharedTextEdit.setEnabled(checked)
- self.sharedPushButton.setEnabled(checked)
\ No newline at end of file
+ self.sharedPushButton.setEnabled(checked)
=== modified file 'openlp/core/ui/exceptiondialog.py'
--- openlp/core/ui/exceptiondialog.py 2010-12-26 11:04:47 +0000
+++ openlp/core/ui/exceptiondialog.py 2011-01-02 22:57:56 +0000
@@ -31,23 +31,16 @@
class Ui_ExceptionDialog(object):
def setupUi(self, exceptionDialog):
exceptionDialog.setObjectName(u'exceptionDialog')
- exceptionDialog.resize(580, 407)
self.exceptionLayout = QtGui.QVBoxLayout(exceptionDialog)
- self.exceptionLayout.setSpacing(8)
- self.exceptionLayout.setMargin(8)
self.exceptionLayout.setObjectName(u'exceptionLayout')
self.messageLayout = QtGui.QHBoxLayout()
- self.messageLayout.setSpacing(0)
- self.messageLayout.setContentsMargins(0, -1, 0, -1)
self.messageLayout.setObjectName(u'messageLayout')
+ self.messageLayout.addSpacing(12)
self.bugLabel = QtGui.QLabel(exceptionDialog)
- self.bugLabel.setMinimumSize(QtCore.QSize(64, 64))
- self.bugLabel.setMaximumSize(QtCore.QSize(64, 64))
- self.bugLabel.setText(u'')
self.bugLabel.setPixmap(QtGui.QPixmap(u':/graphics/exception.png'))
- self.bugLabel.setAlignment(QtCore.Qt.AlignCenter)
self.bugLabel.setObjectName(u'bugLabel')
self.messageLayout.addWidget(self.bugLabel)
+ self.messageLayout.addSpacing(12)
self.messageLabel = QtGui.QLabel(exceptionDialog)
self.messageLabel.setWordWrap(True)
self.messageLabel.setObjectName(u'messageLabel')
@@ -55,11 +48,9 @@
self.exceptionLayout.addLayout(self.messageLayout)
self.exceptionTextEdit = QtGui.QPlainTextEdit(exceptionDialog)
self.exceptionTextEdit.setReadOnly(True)
- self.exceptionTextEdit.setBackgroundVisible(False)
self.exceptionTextEdit.setObjectName(u'exceptionTextEdit')
self.exceptionLayout.addWidget(self.exceptionTextEdit)
self.exceptionButtonBox = QtGui.QDialogButtonBox(exceptionDialog)
- self.exceptionButtonBox.setOrientation(QtCore.Qt.Horizontal)
self.exceptionButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Close)
self.exceptionButtonBox.setObjectName(u'exceptionButtonBox')
self.exceptionLayout.addWidget(self.exceptionButtonBox)
@@ -77,8 +68,6 @@
self.retranslateUi(exceptionDialog)
QtCore.QObject.connect(self.exceptionButtonBox,
- QtCore.SIGNAL(u'accepted()'), exceptionDialog.accept)
- QtCore.QObject.connect(self.exceptionButtonBox,
QtCore.SIGNAL(u'rejected()'), exceptionDialog.reject)
QtCore.QObject.connect(self.sendReportButton,
QtCore.SIGNAL(u'pressed()'), self.onSendReportButtonPressed)
@@ -98,4 +87,4 @@
self.sendReportButton.setText(translate('OpenLP.ExceptionDialog',
'Send E-Mail'))
self.saveReportButton.setText(translate('OpenLP.ExceptionDialog',
- 'Save to File'))
\ No newline at end of file
+ 'Save to File'))
=== modified file 'openlp/core/ui/filerenamedialog.py'
--- openlp/core/ui/filerenamedialog.py 2010-12-26 11:04:47 +0000
+++ openlp/core/ui/filerenamedialog.py 2011-01-02 22:57:56 +0000
@@ -31,27 +31,25 @@
class Ui_FileRenameDialog(object):
def setupUi(self, FileRenameDialog):
FileRenameDialog.setObjectName(u'FileRenameDialog')
- FileRenameDialog.resize(400, 87)
+ self.dialogLayout = QtGui.QGridLayout(FileRenameDialog)
+ self.dialogLayout.setObjectName(u'dialogLayout')
+ self.fileNameLabel = QtGui.QLabel(FileRenameDialog)
+ self.fileNameLabel.setObjectName(u'fileNameLabel')
+ self.dialogLayout.addWidget(self.fileNameLabel, 0, 0)
+ self.fileNameEdit = QtGui.QLineEdit(FileRenameDialog)
+ self.fileNameEdit.resize(self.fileNameEdit.sizeHint().width() * 2,
+ self.fileNameEdit.sizeHint().height())
+ self.fileNameEdit.setObjectName(u'fileNameEdit')
+ self.dialogLayout.addWidget(self.fileNameEdit, 0, 1)
self.buttonBox = QtGui.QDialogButtonBox(FileRenameDialog)
- self.buttonBox.setGeometry(QtCore.QRect(210, 50, 171, 25))
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel |
QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName(u'buttonBox')
- self.widget = QtGui.QWidget(FileRenameDialog)
- self.widget.setGeometry(QtCore.QRect(10, 10, 381, 35))
- self.widget.setObjectName(u'widget')
- self.horizontalLayout = QtGui.QHBoxLayout(self.widget)
- self.horizontalLayout.setObjectName(u'horizontalLayout')
- self.fileRenameLabel = QtGui.QLabel(self.widget)
- self.fileRenameLabel.setObjectName(u'fileRenameLabel')
- self.horizontalLayout.addWidget(self.fileRenameLabel)
- self.fileNameEdit = QtGui.QLineEdit(self.widget)
- self.fileNameEdit.setObjectName(u'fileNameEdit')
- self.horizontalLayout.addWidget(self.fileNameEdit)
-
+ 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.fileRenameLabel.setText(translate('OpenLP.FileRenameForm',
- 'New File Name:'))
\ No newline at end of file
+ self.fileNameLabel.setText(translate('OpenLP.FileRenameForm',
+ 'New File Name:'))
=== modified file 'openlp/core/ui/filerenameform.py'
--- openlp/core/ui/filerenameform.py 2010-12-26 11:04:47 +0000
+++ openlp/core/ui/filerenameform.py 2011-01-02 22:57:56 +0000
@@ -52,4 +52,4 @@
else:
self.setWindowTitle(translate('OpenLP.FileRenameForm',
'File Rename'))
- return QtGui.QDialog.exec_(self)
\ No newline at end of file
+ return QtGui.QDialog.exec_(self)
=== modified file 'openlp/core/ui/generaltab.py'
--- openlp/core/ui/generaltab.py 2010-12-31 19:22:41 +0000
+++ openlp/core/ui/generaltab.py 2011-01-02 22:57:56 +0000
@@ -85,37 +85,30 @@
Create the user interface for the general settings tab
"""
self.setObjectName(u'GeneralTab')
- self.tabTitleVisible = translate('OpenLP.GeneralTab', 'General')
self.generalLayout = QtGui.QHBoxLayout(self)
- self.generalLayout.setSpacing(8)
- self.generalLayout.setMargin(8)
self.generalLayout.setObjectName(u'generalLayout')
- self.generalLeftLayout = QtGui.QVBoxLayout()
- self.generalLeftLayout.setObjectName(u'generalLeftLayout')
- self.generalLeftLayout.setSpacing(8)
- self.generalLeftLayout.setMargin(0)
- self.generalLayout.addLayout(self.generalLeftLayout)
- self.monitorGroupBox = QtGui.QGroupBox(self)
+ self.leftWidget = QtGui.QWidget(self)
+ self.leftWidget.setObjectName(u'leftWidget')
+ self.leftLayout = QtGui.QVBoxLayout(self.leftWidget)
+ self.leftLayout.setMargin(0)
+ self.leftLayout.setObjectName(u'leftLayout')
+ self.monitorGroupBox = QtGui.QGroupBox(self.leftWidget)
self.monitorGroupBox.setObjectName(u'monitorGroupBox')
- self.monitorLayout = QtGui.QVBoxLayout(self.monitorGroupBox)
- self.monitorLayout.setSpacing(8)
- self.monitorLayout.setMargin(8)
+ self.monitorLayout = QtGui.QFormLayout(self.monitorGroupBox)
self.monitorLayout.setObjectName(u'monitorLayout')
self.monitorLabel = QtGui.QLabel(self.monitorGroupBox)
self.monitorLabel.setObjectName(u'monitorLabel')
- self.monitorLayout.addWidget(self.monitorLabel)
+ self.monitorLayout.addRow(self.monitorLabel)
self.monitorComboBox = QtGui.QComboBox(self.monitorGroupBox)
self.monitorComboBox.setObjectName(u'monitorComboBox')
- self.monitorLayout.addWidget(self.monitorComboBox)
+ self.monitorLayout.addRow(self.monitorComboBox)
self.displayOnMonitorCheck = QtGui.QCheckBox(self.monitorGroupBox)
self.displayOnMonitorCheck.setObjectName(u'monitorComboBox')
- self.monitorLayout.addWidget(self.displayOnMonitorCheck)
- self.generalLeftLayout.addWidget(self.monitorGroupBox)
- self.startupGroupBox = QtGui.QGroupBox(self)
+ self.monitorLayout.addRow(self.displayOnMonitorCheck)
+ self.leftLayout.addWidget(self.monitorGroupBox)
+ self.startupGroupBox = QtGui.QGroupBox(self.leftWidget)
self.startupGroupBox.setObjectName(u'startupGroupBox')
self.startupLayout = QtGui.QVBoxLayout(self.startupGroupBox)
- self.startupLayout.setSpacing(8)
- self.startupLayout.setMargin(8)
self.startupLayout.setObjectName(u'startupLayout')
self.warningCheckBox = QtGui.QCheckBox(self.startupGroupBox)
self.warningCheckBox.setObjectName(u'warningCheckBox')
@@ -126,189 +119,113 @@
self.showSplashCheckBox = QtGui.QCheckBox(self.startupGroupBox)
self.showSplashCheckBox.setObjectName(u'showSplashCheckBox')
self.startupLayout.addWidget(self.showSplashCheckBox)
- self.generalLeftLayout.addWidget(self.startupGroupBox)
- self.settingsGroupBox = QtGui.QGroupBox(self)
+ self.leftLayout.addWidget(self.startupGroupBox)
+ self.settingsGroupBox = QtGui.QGroupBox(self.leftWidget)
self.settingsGroupBox.setObjectName(u'settingsGroupBox')
- self.settingsLayout = QtGui.QGridLayout(self.settingsGroupBox)
- self.settingsLayout.setSpacing(8)
- self.settingsLayout.setMargin(8)
+ self.settingsLayout = QtGui.QFormLayout(self.settingsGroupBox)
self.settingsLayout.setObjectName(u'settingsLayout')
self.saveCheckServiceCheckBox = QtGui.QCheckBox(self.settingsGroupBox)
self.saveCheckServiceCheckBox.setObjectName(u'saveCheckServiceCheckBox')
- self.settingsLayout.addWidget(self.saveCheckServiceCheckBox, 0, 0, 1, 2)
+ self.settingsLayout.addRow(self.saveCheckServiceCheckBox)
self.autoPreviewCheckBox = QtGui.QCheckBox(self.settingsGroupBox)
self.autoPreviewCheckBox.setObjectName(u'autoPreviewCheckBox')
- self.settingsLayout.addWidget(self.autoPreviewCheckBox, 1, 0, 1, 2)
+ self.settingsLayout.addRow(self.autoPreviewCheckBox)
# Moved here from image tab
self.timeoutLabel = QtGui.QLabel(self.settingsGroupBox)
self.timeoutLabel.setObjectName(u'timeoutLabel')
- self.settingsLayout.addWidget(self.timeoutLabel, 2, 0, 1, 1)
self.timeoutSpinBox = QtGui.QSpinBox(self.settingsGroupBox)
self.timeoutSpinBox.setObjectName(u'timeoutSpinBox')
- self.settingsLayout.addWidget(self.timeoutSpinBox, 2, 1, 1, 1)
- self.generalLeftLayout.addWidget(self.settingsGroupBox)
- self.generalLeftSpacer = QtGui.QSpacerItem(20, 40,
- QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.generalLeftLayout.addItem(self.generalLeftSpacer)
- self.generalRightLayout = QtGui.QVBoxLayout()
- self.generalRightLayout.setSpacing(8)
- self.generalRightLayout.setMargin(0)
- self.generalRightLayout.setObjectName(u'generalRightLayout')
- self.generalLayout.addLayout(self.generalRightLayout)
- self.ccliGroupBox = QtGui.QGroupBox(self)
+ self.settingsLayout.addRow(self.timeoutLabel, self.timeoutSpinBox)
+ self.leftLayout.addWidget(self.settingsGroupBox)
+ self.leftLayout.addStretch()
+ self.generalLayout.addWidget(self.leftWidget)
+ self.rightWidget = QtGui.QWidget(self)
+ self.rightWidget.setObjectName(u'rightWidget')
+ self.rightLayout = QtGui.QVBoxLayout(self.rightWidget)
+ self.rightLayout.setMargin(0)
+ self.rightLayout.setObjectName(u'rightLayout')
+ self.ccliGroupBox = QtGui.QGroupBox(self.rightWidget)
self.ccliGroupBox.setObjectName(u'ccliGroupBox')
- self.ccliLayout = QtGui.QGridLayout(self.ccliGroupBox)
- self.ccliLayout.setMargin(8)
- self.ccliLayout.setSpacing(8)
+ self.ccliLayout = QtGui.QFormLayout(self.ccliGroupBox)
self.ccliLayout.setObjectName(u'ccliLayout')
self.numberLabel = QtGui.QLabel(self.ccliGroupBox)
self.numberLabel.setObjectName(u'numberLabel')
- self.ccliLayout.addWidget(self.numberLabel, 0, 0, 1, 1)
self.numberEdit = QtGui.QLineEdit(self.ccliGroupBox)
self.numberEdit.setObjectName(u'numberEdit')
- self.ccliLayout.addWidget(self.numberEdit, 0, 1, 1, 1)
+ self.ccliLayout.addRow(self.numberLabel, self.numberEdit)
self.usernameLabel = QtGui.QLabel(self.ccliGroupBox)
self.usernameLabel.setObjectName(u'usernameLabel')
- self.ccliLayout.addWidget(self.usernameLabel, 1, 0, 1, 1)
self.usernameEdit = QtGui.QLineEdit(self.ccliGroupBox)
self.usernameEdit.setObjectName(u'usernameEdit')
- self.ccliLayout.addWidget(self.usernameEdit, 1, 1, 1, 1)
+ self.ccliLayout.addRow(self.usernameLabel, self.usernameEdit)
self.passwordLabel = QtGui.QLabel(self.ccliGroupBox)
self.passwordLabel.setObjectName(u'passwordLabel')
- self.ccliLayout.addWidget(self.passwordLabel, 2, 0, 1, 1)
self.passwordEdit = QtGui.QLineEdit(self.ccliGroupBox)
self.passwordEdit.setEchoMode(QtGui.QLineEdit.Password)
self.passwordEdit.setObjectName(u'passwordEdit')
- self.ccliLayout.addWidget(self.passwordEdit, 2, 1, 1, 1)
- self.generalRightLayout.addWidget(self.ccliGroupBox)
+ self.ccliLayout.addRow(self.passwordLabel, self.passwordEdit)
+ self.rightLayout.addWidget(self.ccliGroupBox)
# Moved here from display tab
- self.displayGroupBox = QtGui.QGroupBox(self)
+ self.displayGroupBox = QtGui.QGroupBox(self.rightWidget)
self.displayGroupBox.setObjectName(u'displayGroupBox')
- self.displayLayout = QtGui.QVBoxLayout(self.displayGroupBox)
- self.displayLayout.setSpacing(8)
- self.displayLayout.setMargin(8)
+ self.displayLayout = QtGui.QGridLayout(self.displayGroupBox)
self.displayLayout.setObjectName(u'displayLayout')
- self.currentLayout = QtGui.QHBoxLayout()
- self.currentLayout.setSpacing(8)
- self.currentLayout.setMargin(0)
- self.currentLayout.setObjectName(u'currentLayout')
- self.currentXLayout = QtGui.QVBoxLayout()
- self.currentXLayout.setSpacing(0)
- self.currentXLayout.setMargin(0)
- self.currentXLayout.setObjectName(u'currentXLayout')
self.currentXLabel = QtGui.QLabel(self.displayGroupBox)
- self.currentXLabel.setAlignment(QtCore.Qt.AlignCenter)
self.currentXLabel.setObjectName(u'currentXLabel')
- self.currentXLayout.addWidget(self.currentXLabel)
+ self.displayLayout.addWidget(self.currentXLabel, 0, 0)
self.currentXValueLabel = QtGui.QLabel(self.displayGroupBox)
- self.currentXValueLabel.setAlignment(QtCore.Qt.AlignCenter)
self.currentXValueLabel.setObjectName(u'currentXValueLabel')
- self.currentXLayout.addWidget(self.currentXValueLabel)
- self.currentLayout.addLayout(self.currentXLayout)
- self.currentYLayout = QtGui.QVBoxLayout()
- self.currentYLayout.setSpacing(0)
- self.currentYLayout.setMargin(0)
- self.currentYLayout.setObjectName(u'currentYLayout')
+ self.displayLayout.addWidget(self.currentXValueLabel, 1, 0)
self.currentYLabel = QtGui.QLabel(self.displayGroupBox)
- self.currentYLabel.setAlignment(QtCore.Qt.AlignCenter)
self.currentYLabel.setObjectName(u'currentYLabel')
- self.currentYLayout.addWidget(self.currentYLabel)
+ self.displayLayout.addWidget(self.currentYLabel, 0, 1)
self.currentYValueLabel = QtGui.QLabel(self.displayGroupBox)
- self.currentYValueLabel.setAlignment(QtCore.Qt.AlignCenter)
self.currentYValueLabel.setObjectName(u'currentYValueLabel')
- self.currentYLayout.addWidget(self.currentYValueLabel)
- self.currentLayout.addLayout(self.currentYLayout)
- self.currentWidthLayout = QtGui.QVBoxLayout()
- self.currentWidthLayout.setSpacing(0)
- self.currentWidthLayout.setMargin(0)
- self.currentWidthLayout.setObjectName(u'currentWidthLayout')
+ self.displayLayout.addWidget(self.currentYValueLabel, 1, 1)
self.currentWidthLabel = QtGui.QLabel(self.displayGroupBox)
- self.currentWidthLabel.setAlignment(QtCore.Qt.AlignCenter)
self.currentWidthLabel.setObjectName(u'currentWidthLabel')
- self.currentWidthLayout.addWidget(self.currentWidthLabel)
+ self.displayLayout.addWidget(self.currentWidthLabel, 0, 2)
self.currentWidthValueLabel = QtGui.QLabel(self.displayGroupBox)
- self.currentWidthValueLabel.setAlignment(QtCore.Qt.AlignCenter)
self.currentWidthValueLabel.setObjectName(u'currentWidthValueLabel')
- self.currentWidthLayout.addWidget(self.currentWidthValueLabel)
- self.currentLayout.addLayout(self.currentWidthLayout)
- self.currentHeightLayout = QtGui.QVBoxLayout()
- self.currentHeightLayout.setSpacing(0)
- self.currentHeightLayout.setMargin(0)
- self.currentHeightLayout.setObjectName(u'currentHeightLayout')
+ self.displayLayout.addWidget(self.currentWidthValueLabel, 1, 2)
self.currentHeightLabel = QtGui.QLabel(self.displayGroupBox)
- self.currentHeightLabel.setMaximumSize(QtCore.QSize(100, 16777215))
- self.currentHeightLabel.setAlignment(QtCore.Qt.AlignCenter)
self.currentHeightLabel.setObjectName(u'currentHeightLabel')
- self.currentHeightLayout.addWidget(self.currentHeightLabel)
+ self.displayLayout.addWidget(self.currentHeightLabel, 0, 3)
self.currentHeightValueLabel = QtGui.QLabel(self.displayGroupBox)
- self.currentHeightValueLabel.setAlignment(QtCore.Qt.AlignCenter)
self.currentHeightValueLabel.setObjectName(u'Height')
- self.currentHeightLayout.addWidget(self.currentHeightValueLabel)
- self.currentLayout.addLayout(self.currentHeightLayout)
- self.displayLayout.addLayout(self.currentLayout)
+ self.displayLayout.addWidget(self.currentHeightValueLabel, 1, 3)
self.overrideCheckBox = QtGui.QCheckBox(self.displayGroupBox)
self.overrideCheckBox.setObjectName(u'overrideCheckBox')
- self.displayLayout.addWidget(self.overrideCheckBox)
- self.generalRightLayout.addWidget(self.displayGroupBox)
+ self.displayLayout.addWidget(self.overrideCheckBox, 2, 0, 1, 4)
+ self.rightLayout.addWidget(self.displayGroupBox)
# Custom position
- self.customLayout = QtGui.QHBoxLayout()
- self.customLayout.setSpacing(8)
- self.customLayout.setMargin(0)
- self.customLayout.setObjectName(u'customLayout')
- self.customXLayout = QtGui.QVBoxLayout()
- self.customXLayout.setSpacing(0)
- self.customXLayout.setMargin(0)
- self.customXLayout.setObjectName(u'customXLayout')
self.customXLabel = QtGui.QLabel(self.displayGroupBox)
- self.customXLabel.setAlignment(QtCore.Qt.AlignCenter)
self.customXLabel.setObjectName(u'customXLabel')
- self.customXLayout.addWidget(self.customXLabel)
+ self.displayLayout.addWidget(self.customXLabel, 3, 0)
self.customXValueEdit = ValidEdit(self.displayGroupBox)
self.customXValueEdit.setObjectName(u'customXValueEdit')
- self.customXLayout.addWidget(self.customXValueEdit)
- self.customLayout.addLayout(self.customXLayout)
- self.customYLayout = QtGui.QVBoxLayout()
- self.customYLayout.setSpacing(0)
- self.customYLayout.setMargin(0)
- self.customYLayout.setObjectName(u'customYLayout')
+ self.displayLayout.addWidget(self.customXValueEdit, 4, 0)
self.customYLabel = QtGui.QLabel(self.displayGroupBox)
- self.customYLabel.setAlignment(QtCore.Qt.AlignCenter)
self.customYLabel.setObjectName(u'customYLabel')
- self.customYLayout.addWidget(self.customYLabel)
+ self.displayLayout.addWidget(self.customYLabel, 3, 1)
self.customYValueEdit = ValidEdit(self.displayGroupBox)
self.customYValueEdit.setObjectName(u'customYValueEdit')
- self.customYLayout.addWidget(self.customYValueEdit)
- self.customLayout.addLayout(self.customYLayout)
- self.customWidthLayout = QtGui.QVBoxLayout()
- self.customWidthLayout.setSpacing(0)
- self.customWidthLayout.setMargin(0)
- self.customWidthLayout.setSizeConstraint(QtGui.QLayout.SetMinimumSize)
- self.customWidthLayout.setObjectName(u'customWidthLayout')
+ self.displayLayout.addWidget(self.customYValueEdit, 4, 1)
self.customWidthLabel = QtGui.QLabel(self.displayGroupBox)
- self.customWidthLabel.setAlignment(QtCore.Qt.AlignCenter)
self.customWidthLabel.setObjectName(u'customWidthLabel')
- self.customWidthLayout.addWidget(self.customWidthLabel)
+ self.displayLayout.addWidget(self.customWidthLabel, 3, 2)
self.customWidthValueEdit = ValidEdit(self.displayGroupBox)
self.customWidthValueEdit.setObjectName(u'customWidthValueEdit')
- self.customWidthLayout.addWidget(self.customWidthValueEdit)
- self.customLayout.addLayout(self.customWidthLayout)
- self.customHeightLayout = QtGui.QVBoxLayout()
- self.customHeightLayout.setSpacing(0)
- self.customHeightLayout.setMargin(0)
- self.customHeightLayout.setObjectName(u'customHeightLayout')
+ self.displayLayout.addWidget(self.customWidthValueEdit, 4, 2)
self.customHeightLabel = QtGui.QLabel(self.displayGroupBox)
- self.customHeightLabel.setAlignment(QtCore.Qt.AlignCenter)
self.customHeightLabel.setObjectName(u'customHeightLabel')
- self.customHeightLayout.addWidget(self.customHeightLabel)
+ self.displayLayout.addWidget(self.customHeightLabel, 3, 3)
self.customHeightValueEdit = ValidEdit(self.displayGroupBox)
self.customHeightValueEdit.setObjectName(u'customHeightValueEdit')
- self.customHeightLayout.addWidget(self.customHeightValueEdit)
- self.customLayout.addLayout(self.customHeightLayout)
- self.displayLayout.addLayout(self.customLayout)
- # Bottom spacer
- self.generalRightSpacer = QtGui.QSpacerItem(20, 40,
- QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.generalRightLayout.addItem(self.generalRightSpacer)
+ self.displayLayout.addWidget(self.customHeightValueEdit, 4, 3)
+ self.rightLayout.addWidget(self.displayGroupBox)
+ self.rightLayout.addStretch()
+ self.generalLayout.addWidget(self.rightWidget)
# Signals and slots
QtCore.QObject.connect(self.overrideCheckBox,
QtCore.SIGNAL(u'toggled(bool)'), self.onOverrideCheckBoxToggled)
@@ -329,6 +246,7 @@
"""
Translate the general settings tab to the currently selected language
"""
+ self.tabTitleVisible = translate('OpenLP.GeneralTab', 'General')
self.monitorGroupBox.setTitle(translate('OpenLP.GeneralTab',
'Monitors'))
self.monitorLabel.setText(translate('OpenLP.GeneralTab',
@@ -382,6 +300,20 @@
translate('OpenLP.GeneralTab', 'Height'))
self.customWidthLabel.setText(translate('OpenLP.GeneralTab', 'Width'))
+ def resizeEvent(self, event=None):
+ """
+ Resize the sides in two equal halves if the layout allows this.
+ """
+ if event:
+ SettingsTab.resizeEvent(self, event)
+ width = self.width() - self.generalLayout.spacing() - \
+ self.generalLayout.contentsMargins().left() - \
+ self.generalLayout.contentsMargins().right()
+ left_width = min(width - self.rightWidget.minimumSizeHint().width(),
+ width / 2)
+ left_width = max(left_width, self.leftWidget.minimumSizeHint().width())
+ self.leftWidget.setMinimumWidth(left_width)
+
def load(self):
"""
Load the settings to populate the form
@@ -389,11 +321,11 @@
settings = QtCore.QSettings()
settings.beginGroup(self.settingsSection)
for screen in self.screens.screen_list:
- screen_name = unicode(translate('OpenLP.GeneralTab', 'Screen %d')) \
- % (screen[u'number'] + 1)
+ screen_name = u'%s %d' % (translate('OpenLP.GeneralTab', 'Screen'),
+ screen[u'number'] + 1)
if screen[u'primary']:
- screen_name = unicode(translate('OpenLP.GeneralTab',
- '%s (primary)')) % screen_name
+ screen_name = u'%s (%s)' % (screen_name,
+ translate('OpenLP.GeneralTab', 'primary'))
self.monitorComboBox.addItem(screen_name)
self.numberEdit.setText(unicode(settings.value(
u'ccli number', QtCore.QVariant(u'')).toString()))
=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py 2010-12-27 22:57:35 +0000
+++ openlp/core/ui/maindisplay.py 2011-01-02 22:57:56 +0000
@@ -31,7 +31,8 @@
from PyQt4 import QtCore, QtGui, QtWebKit
from PyQt4.phonon import Phonon
-from openlp.core.lib import Receiver, build_html, ServiceItem, image_to_byte
+from openlp.core.lib import Receiver, build_html, ServiceItem, image_to_byte, \
+ translate
from openlp.core.ui import HideMode
log = logging.getLogger(__name__)
@@ -102,7 +103,7 @@
self.isLive = live
self.alertTab = None
self.hideMode = None
- self.setWindowTitle(u'OpenLP Display')
+ self.retranslateUi()
self.setStyleSheet(u'border: 0px; margin: 0px; padding: 0px;')
self.setWindowFlags(QtCore.Qt.FramelessWindowHint |
QtCore.Qt.WindowStaysOnTopHint)
@@ -112,6 +113,12 @@
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'maindisplay_show'), self.showDisplay)
+ def retranslateUi(self):
+ """
+ Setup the interface translation strings.
+ """
+ self.setWindowTitle(translate('OpenLP.MainDisplay', 'OpenLP Display'))
+
def setup(self):
"""
Set up and build the output screen
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2011-01-02 13:57:55 +0000
+++ openlp/core/ui/mainwindow.py 2011-01-02 22:57:56 +0000
@@ -66,25 +66,10 @@
MainWindow.setObjectName(u'MainWindow')
MainWindow.resize(self.settingsmanager.width,
self.settingsmanager.height)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
- QtGui.QSizePolicy.Expanding)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(
- MainWindow.sizePolicy().hasHeightForWidth())
- MainWindow.setSizePolicy(sizePolicy)
- MainIcon = build_icon(u':/icon/openlp-logo-16x16.png')
- MainWindow.setWindowIcon(MainIcon)
- self.setDockNestingEnabled(True)
+ MainWindow.setWindowIcon(build_icon(u':/icon/openlp-logo-16x16.png'))
+ MainWindow.setDockNestingEnabled(True)
# Set up the main container, which contains all the other form widgets.
self.MainContent = QtGui.QWidget(MainWindow)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
- QtGui.QSizePolicy.Expanding)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(
- self.MainContent.sizePolicy().hasHeightForWidth())
- self.MainContent.setSizePolicy(sizePolicy)
self.MainContent.setObjectName(u'MainContent')
self.MainContentLayout = QtGui.QHBoxLayout(self.MainContent)
self.MainContentLayout.setSpacing(0)
@@ -93,7 +78,6 @@
MainWindow.setCentralWidget(self.MainContent)
self.ControlSplitter = QtGui.QSplitter(self.MainContent)
self.ControlSplitter.setOrientation(QtCore.Qt.Horizontal)
- self.ControlSplitter.setOpaqueResize(False)
self.ControlSplitter.setObjectName(u'ControlSplitter')
self.MainContentLayout.addWidget(self.ControlSplitter)
# Create slide controllers
@@ -109,7 +93,6 @@
self.liveController.Panel.setVisible(liveVisible)
# Create menu
self.MenuBar = QtGui.QMenuBar(MainWindow)
- self.MenuBar.setGeometry(QtCore.QRect(0, 0, 1087, 27))
self.MenuBar.setObjectName(u'MenuBar')
self.FileMenu = QtGui.QMenu(self.MenuBar)
self.FileMenu.setObjectName(u'FileMenu')
@@ -147,38 +130,33 @@
self.MediaManagerDock.setStyleSheet(MEDIA_MANAGER_STYLE)
self.MediaManagerDock.setMinimumWidth(
self.settingsmanager.mainwindow_left)
- self.MediaManagerContents = QtGui.QWidget(MainWindow)
- self.MediaManagerContents.setObjectName(u'MediaManagerContents')
- self.MediaManagerLayout = QtGui.QHBoxLayout(self.MediaManagerContents)
- self.MediaManagerLayout.setContentsMargins(0, 2, 0, 0)
- self.MediaManagerLayout.setObjectName(u'MediaManagerLayout')
# Create the media toolbox
- self.MediaToolBox = QtGui.QToolBox(self.MediaManagerContents)
+ self.MediaToolBox = QtGui.QToolBox(self.MediaManagerDock)
self.MediaToolBox.setObjectName(u'MediaToolBox')
- self.MediaManagerLayout.addWidget(self.MediaToolBox)
- self.MediaManagerDock.setWidget(self.MediaManagerContents)
- MainWindow.addDockWidget(
- QtCore.Qt.DockWidgetArea(1), self.MediaManagerDock)
+ self.MediaManagerDock.setWidget(self.MediaToolBox)
+ MainWindow.addDockWidget(QtCore.Qt.LeftDockWidgetArea,
+ self.MediaManagerDock)
# Create the service manager
self.ServiceManagerDock = OpenLPDockWidget(
MainWindow, u'ServiceManagerDock',
build_icon(u':/system/system_servicemanager.png'))
self.ServiceManagerDock.setMinimumWidth(
self.settingsmanager.mainwindow_right)
- self.ServiceManagerContents = ServiceManager(self)
+ self.ServiceManagerContents = ServiceManager(MainWindow)
self.ServiceManagerDock.setWidget(self.ServiceManagerContents)
- MainWindow.addDockWidget(
- QtCore.Qt.DockWidgetArea(2), self.ServiceManagerDock)
+ MainWindow.addDockWidget(QtCore.Qt.RightDockWidgetArea,
+ self.ServiceManagerDock)
# Create the theme manager
self.ThemeManagerDock = OpenLPDockWidget(
MainWindow, u'ThemeManagerDock',
build_icon(u':/system/system_thememanager.png'))
self.ThemeManagerDock.setMinimumWidth(
self.settingsmanager.mainwindow_right)
- self.ThemeManagerContents = ThemeManager(self)
+ self.ThemeManagerContents = ThemeManager(MainWindow)
+ self.ThemeManagerContents.setObjectName(u'ThemeManagerContents')
self.ThemeManagerDock.setWidget(self.ThemeManagerContents)
- MainWindow.addDockWidget(
- QtCore.Qt.DockWidgetArea(2), self.ThemeManagerDock)
+ MainWindow.addDockWidget(QtCore.Qt.RightDockWidgetArea,
+ self.ThemeManagerDock)
# Create the menu items
self.FileNewItem = QtGui.QAction(MainWindow)
self.FileNewItem.setIcon(build_icon(u':/general/general_new.png'))
@@ -275,9 +253,12 @@
self.AutoLanguageItem.setCheckable(True)
MainWindow.actionList.add_action(self.AutoLanguageItem, u'Settings')
self.LanguageGroup = QtGui.QActionGroup(MainWindow)
+ self.LanguageGroup.setExclusive(True)
+ self.LanguageGroup.setObjectName(u'LanguageGroup')
+ self.AutoLanguageItem.setChecked(LanguageManager.auto_language)
+ self.LanguageGroup.setDisabled(LanguageManager.auto_language)
qmList = LanguageManager.get_qm_list()
savedLanguage = LanguageManager.get_language()
- self.AutoLanguageItem.setChecked(LanguageManager.auto_language)
for key in sorted(qmList.keys()):
languageItem = QtGui.QAction(MainWindow)
languageItem.setObjectName(key)
@@ -285,7 +266,6 @@
if qmList[key] == savedLanguage:
languageItem.setChecked(True)
add_actions(self.LanguageGroup, [languageItem])
- self.LanguageGroup.setDisabled(LanguageManager.auto_language)
self.SettingsShortcutsItem = QtGui.QAction(MainWindow)
self.SettingsShortcutsItem.setIcon(
build_icon(u':/system/system_configure_shortcuts.png'))
@@ -334,15 +314,13 @@
add_actions(self.SettingsMenu, (self.SettingsPluginListItem,
self.SettingsLanguageMenu.menuAction(), None,
self.SettingsShortcutsItem, self.SettingsConfigureItem))
- add_actions(self.ToolsMenu,
- (self.ToolsAddToolItem, None))
- add_actions(self.HelpMenu,
- (self.HelpDocumentationItem, self.HelpOnlineHelpItem, None,
- self.HelpWebSiteItem, self.HelpAboutItem))
- add_actions(self.MenuBar,
- (self.FileMenu.menuAction(), self.ViewMenu.menuAction(),
- self.ToolsMenu.menuAction(), self.SettingsMenu.menuAction(),
- self.HelpMenu.menuAction()))
+ add_actions(self.ToolsMenu, (self.ToolsAddToolItem, None))
+ add_actions(self.HelpMenu, (self.HelpDocumentationItem,
+ self.HelpOnlineHelpItem, None, self.HelpWebSiteItem,
+ self.HelpAboutItem))
+ add_actions(self.MenuBar, (self.FileMenu.menuAction(),
+ self.ViewMenu.menuAction(), self.ToolsMenu.menuAction(),
+ self.SettingsMenu.menuAction(), self.HelpMenu.menuAction()))
# Initialise the translation
self.retranslateUi(MainWindow)
self.MediaToolBox.setCurrentIndex(0)
@@ -856,10 +834,10 @@
else:
ret = QtGui.QMessageBox.question(self,
translate('OpenLP.MainWindow', 'Close OpenLP'),
- translate('OpenLP.MainWindow', 'Are you sure you want to close OpenLP?'),
+ translate('OpenLP.MainWindow',
+ 'Are you sure you want to close OpenLP?'),
QtGui.QMessageBox.StandardButtons(
- QtGui.QMessageBox.Yes |
- QtGui.QMessageBox.No),
+ QtGui.QMessageBox.Yes | QtGui.QMessageBox.No),
QtGui.QMessageBox.Yes)
if ret == QtGui.QMessageBox.Yes:
self.cleanUp()
=== modified file 'openlp/core/ui/plugindialog.py'
--- openlp/core/ui/plugindialog.py 2010-12-26 11:04:47 +0000
+++ openlp/core/ui/plugindialog.py 2011-01-02 22:57:56 +0000
@@ -31,69 +31,41 @@
def setupUi(self, pluginViewDialog):
pluginViewDialog.setObjectName(u'pluginViewDialog')
pluginViewDialog.setWindowModality(QtCore.Qt.ApplicationModal)
- pluginViewDialog.resize(554, 344)
self.pluginLayout = QtGui.QVBoxLayout(pluginViewDialog)
- self.pluginLayout.setSpacing(8)
- self.pluginLayout.setMargin(8)
self.pluginLayout.setObjectName(u'pluginLayout')
self.listLayout = QtGui.QHBoxLayout()
- self.listLayout.setSpacing(8)
self.listLayout.setObjectName(u'listLayout')
self.pluginListWidget = QtGui.QListWidget(pluginViewDialog)
- sizePolicy = QtGui.QSizePolicy(
- QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Expanding)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(
- self.pluginListWidget.sizePolicy().hasHeightForWidth())
- self.pluginListWidget.setSizePolicy(sizePolicy)
- self.pluginListWidget.setMaximumSize(QtCore.QSize(192, 16777215))
self.pluginListWidget.setObjectName(u'pluginListWidget')
self.listLayout.addWidget(self.pluginListWidget)
self.pluginInfoGroupBox = QtGui.QGroupBox(pluginViewDialog)
- self.pluginInfoGroupBox.setAlignment(
- QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
- self.pluginInfoGroupBox.setFlat(False)
self.pluginInfoGroupBox.setObjectName(u'pluginInfoGroupBox')
self.pluginInfoLayout = QtGui.QFormLayout(self.pluginInfoGroupBox)
- self.pluginInfoLayout.setMargin(8)
- self.pluginInfoLayout.setSpacing(8)
self.pluginInfoLayout.setObjectName(u'pluginInfoLayout')
+ self.statusLabel = QtGui.QLabel(self.pluginInfoGroupBox)
+ self.statusLabel.setObjectName(u'statusLabel')
+ self.statusComboBox = QtGui.QComboBox(self.pluginInfoGroupBox)
+ self.statusComboBox.addItems((u'', u''))
+ self.statusComboBox.setObjectName(u'statusComboBox')
+ self.pluginInfoLayout.addRow(self.statusLabel, self.statusComboBox)
self.versionLabel = QtGui.QLabel(self.pluginInfoGroupBox)
self.versionLabel.setObjectName(u'versionLabel')
- self.pluginInfoLayout.setWidget(
- 1, QtGui.QFormLayout.LabelRole, self.versionLabel)
self.versionNumberLabel = QtGui.QLabel(self.pluginInfoGroupBox)
self.versionNumberLabel.setObjectName(u'versionNumberLabel')
- self.pluginInfoLayout.setWidget(
- 1, QtGui.QFormLayout.FieldRole, self.versionNumberLabel)
+ self.pluginInfoLayout.addRow(self.versionLabel, self.versionNumberLabel)
self.aboutLabel = QtGui.QLabel(self.pluginInfoGroupBox)
self.aboutLabel.setObjectName(u'aboutLabel')
- self.pluginInfoLayout.setWidget(
- 2, QtGui.QFormLayout.LabelRole, self.aboutLabel)
- self.statusLabel = QtGui.QLabel(self.pluginInfoGroupBox)
- self.statusLabel.setObjectName(u'statusLabel')
- self.pluginInfoLayout.setWidget(
- 0, QtGui.QFormLayout.LabelRole, self.statusLabel)
- self.statusComboBox = QtGui.QComboBox(self.pluginInfoGroupBox)
- self.statusComboBox.setObjectName(u'statusComboBox')
- self.statusComboBox.addItem(QtCore.QString())
- self.statusComboBox.addItem(QtCore.QString())
- self.pluginInfoLayout.setWidget(
- 0, QtGui.QFormLayout.FieldRole, self.statusComboBox)
self.aboutTextBrowser = QtGui.QTextBrowser(self.pluginInfoGroupBox)
self.aboutTextBrowser.setTextInteractionFlags(
QtCore.Qt.LinksAccessibleByMouse)
self.aboutTextBrowser.setObjectName(u'aboutTextBrowser')
- self.pluginInfoLayout.setWidget(
- 2, QtGui.QFormLayout.FieldRole, self.aboutTextBrowser)
+ 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.versionNumberLabel.setText(u'')
self.retranslateUi(pluginViewDialog)
QtCore.QObject.connect(self.pluginListButtonBox,
QtCore.SIGNAL(u'accepted()'), pluginViewDialog.close)
=== modified file 'openlp/core/ui/pluginform.py'
--- openlp/core/ui/pluginform.py 2010-12-28 11:18:56 +0000
+++ openlp/core/ui/pluginform.py 2011-01-02 22:57:56 +0000
@@ -67,23 +67,24 @@
# sometimes when it's loaded from the config, it isn't cast to int.
plugin.status = int(plugin.status)
# Set the little status text in brackets next to the plugin name.
- status_text = unicode(
- translate('OpenLP.PluginForm', '%s (Inactive)'))
- if plugin.status == PluginStatus.Active:
+ if plugin.status == PluginStatus.Disabled:
+ status_text = unicode(
+ translate('OpenLP.PluginForm', '%s (Disabled)'))
+ elif plugin.status == PluginStatus.Active:
status_text = unicode(
translate('OpenLP.PluginForm', '%s (Active)'))
- elif plugin.status == PluginStatus.Inactive:
+ else:
+ # PluginStatus.Inactive
status_text = unicode(
translate('OpenLP.PluginForm', '%s (Inactive)'))
- elif plugin.status == PluginStatus.Disabled:
- status_text = unicode(
- translate('OpenLP.PluginForm', '%s (Disabled)'))
name_string = plugin.getString(StringContent.Name)
item.setText(status_text % name_string[u'singular'])
# If the plugin has an icon, set it!
if plugin.icon:
item.setIcon(plugin.icon)
self.pluginListWidget.addItem(item)
+ self.pluginListWidget.setFixedWidth(
+ self.pluginListWidget.sizeHint().width())
def _clearDetails(self):
self.statusComboBox.setCurrentIndex(-1)
=== modified file 'openlp/core/ui/serviceitemeditdialog.py'
--- openlp/core/ui/serviceitemeditdialog.py 2010-12-26 11:04:47 +0000
+++ openlp/core/ui/serviceitemeditdialog.py 2011-01-02 22:57:56 +0000
@@ -26,54 +26,37 @@
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import translate
+from openlp.core.lib import translate, build_icon
class Ui_ServiceItemEditDialog(object):
def setupUi(self, serviceItemEditDialog):
serviceItemEditDialog.setObjectName(u'serviceItemEditDialog')
- serviceItemEditDialog.resize(386, 272)
- self.layoutWidget = QtGui.QWidget(serviceItemEditDialog)
- self.layoutWidget.setGeometry(QtCore.QRect(20, 20, 351, 241))
- self.layoutWidget.setObjectName(u'layoutWidget')
- self.outerLayout = QtGui.QVBoxLayout(self.layoutWidget)
- self.outerLayout.setObjectName(u'outerLayout')
- self.topLayout = QtGui.QHBoxLayout()
- self.topLayout.setObjectName(u'topLayout')
- self.listWidget = QtGui.QListWidget(self.layoutWidget)
+ self.dialogLayout = QtGui.QGridLayout(serviceItemEditDialog)
+ self.dialogLayout.setObjectName(u'dialogLayout')
+ self.listWidget = QtGui.QListWidget(serviceItemEditDialog)
self.listWidget.setAlternatingRowColors(True)
self.listWidget.setObjectName(u'listWidget')
- self.topLayout.addWidget(self.listWidget)
+ self.dialogLayout.addWidget(self.listWidget, 0, 0)
self.buttonLayout = QtGui.QVBoxLayout()
self.buttonLayout.setObjectName(u'buttonLayout')
- self.deleteButton = QtGui.QPushButton(self.layoutWidget)
+ self.deleteButton = QtGui.QPushButton(serviceItemEditDialog)
self.deleteButton.setObjectName(u'deleteButton')
self.buttonLayout.addWidget(self.deleteButton)
- spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
- QtGui.QSizePolicy.Expanding)
- self.buttonLayout.addItem(spacerItem)
- self.upButton = QtGui.QPushButton(self.layoutWidget)
- self.upButton.setText(u'')
- icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap(u':/services/service_up.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.upButton.setIcon(icon)
+ self.buttonLayout.addStretch()
+ self.upButton = QtGui.QPushButton(serviceItemEditDialog)
+ self.upButton.setIcon(build_icon(u':/services/service_up.png'))
self.upButton.setObjectName(u'upButton')
self.buttonLayout.addWidget(self.upButton)
- self.downButton = QtGui.QPushButton(self.layoutWidget)
- self.downButton.setText(u'')
- icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap(u':/services/service_down.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.downButton.setIcon(icon)
+ self.downButton = QtGui.QPushButton(serviceItemEditDialog)
+ self.downButton.setIcon(build_icon(u':/services/service_down.png'))
self.downButton.setObjectName(u'downButton')
self.buttonLayout.addWidget(self.downButton)
- self.topLayout.addLayout(self.buttonLayout)
- self.outerLayout.addLayout(self.topLayout)
- self.buttonBox = QtGui.QDialogButtonBox(self.layoutWidget)
- self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel |
- QtGui.QDialogButtonBox.Save)
+ self.dialogLayout.addLayout(self.buttonLayout, 0, 1)
+ self.buttonBox = QtGui.QDialogButtonBox(serviceItemEditDialog)
+ self.buttonBox.setStandardButtons(
+ QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Save)
self.buttonBox.setObjectName(u'buttonBox')
- self.outerLayout.addWidget(self.buttonBox)
+ self.dialogLayout.addWidget(self.buttonBox, 1, 0, 1, 2)
self.retranslateUi(serviceItemEditDialog)
QtCore.QMetaObject.connectSlotsByName(serviceItemEditDialog)
@@ -82,4 +65,4 @@
serviceItemEditDialog.setWindowTitle(
translate('OpenLP.ServiceItemEditForm', 'Reorder Service Item'))
self.deleteButton.setText(translate('OpenLP.ServiceItemEditForm',
- 'Delete'))
\ No newline at end of file
+ 'Delete'))
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2011-01-02 13:57:55 +0000
+++ openlp/core/ui/servicemanager.py 2011-01-02 22:57:56 +0000
@@ -118,7 +118,6 @@
self.layout = QtGui.QVBoxLayout(self)
self.layout.setSpacing(0)
self.layout.setMargin(0)
- self.expandTabs = False
# Create the top toolbar
self.toolbar = OpenLPToolbar(self)
self.toolbar.addToolbarButton(
@@ -140,13 +139,16 @@
self.themeLabel = QtGui.QLabel(translate('OpenLP.ServiceManager',
'Theme:'), self)
self.themeLabel.setMargin(3)
+ self.themeLabel.setObjectName(u'themeLabel')
self.toolbar.addToolbarWidget(u'ThemeLabel', self.themeLabel)
self.themeComboBox = QtGui.QComboBox(self.toolbar)
self.themeComboBox.setToolTip(translate('OpenLP.ServiceManager',
'Select a theme for the service'))
- self.themeComboBox.setSizeAdjustPolicy(
- QtGui.QComboBox.AdjustToContents)
+ self.themeComboBox.setSizePolicy(QtGui.QSizePolicy.Expanding,
+ QtGui.QSizePolicy.Fixed)
+ self.themeComboBox.setObjectName(u'themeComboBox')
self.toolbar.addToolbarWidget(u'ThemeWidget', self.themeComboBox)
+ self.toolbar.setObjectName(u'toolbar')
self.layout.addWidget(self.toolbar)
# Create the service manager list
self.serviceManagerList = ServiceManagerList(self)
@@ -216,6 +218,7 @@
translate('OpenLP.ServiceManager',
'Collapse all the service items.'),
self.onCollapseAll)
+ self.orderToolbar.setObjectName(u'orderToolbar')
self.layout.addWidget(self.orderToolbar)
# Connect up our signals and slots
QtCore.QObject.connect(self.themeComboBox,
=== modified file 'openlp/core/ui/servicenotedialog.py'
--- openlp/core/ui/servicenotedialog.py 2010-12-26 11:04:47 +0000
+++ openlp/core/ui/servicenotedialog.py 2011-01-02 22:57:56 +0000
@@ -30,24 +30,19 @@
class Ui_ServiceNoteEdit(object):
def setupUi(self, serviceNoteEdit):
serviceNoteEdit.setObjectName(u'serviceNoteEdit')
- serviceNoteEdit.resize(400, 243)
- self.widget = QtGui.QWidget(serviceNoteEdit)
- self.widget.setGeometry(QtCore.QRect(20, 10, 361, 223))
- self.widget.setObjectName(u'widget')
- self.verticalLayout = QtGui.QVBoxLayout(self.widget)
- self.verticalLayout.setObjectName(u'verticalLayout')
- self.textEdit = QtGui.QTextEdit(self.widget)
+ self.dialogLayout = QtGui.QVBoxLayout(serviceNoteEdit)
+ self.dialogLayout.setObjectName(u'verticalLayout')
+ self.textEdit = QtGui.QTextEdit(serviceNoteEdit)
self.textEdit.setObjectName(u'textEdit')
- self.verticalLayout.addWidget(self.textEdit)
- self.buttonBox = QtGui.QDialogButtonBox(self.widget)
+ self.dialogLayout.addWidget(self.textEdit)
+ self.buttonBox = QtGui.QDialogButtonBox(serviceNoteEdit)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel |
QtGui.QDialogButtonBox.Save)
self.buttonBox.setObjectName(u'buttonBox')
- self.verticalLayout.addWidget(self.buttonBox)
-
+ self.dialogLayout.addWidget(self.buttonBox)
self.retranslateUi(serviceNoteEdit)
QtCore.QMetaObject.connectSlotsByName(serviceNoteEdit)
def retranslateUi(self, serviceNoteEdit):
serviceNoteEdit.setWindowTitle(
- translate('OpenLP.ServiceNoteForm', 'Service Item Notes'))
\ No newline at end of file
+ translate('OpenLP.ServiceNoteForm', 'Service Item Notes'))
=== modified file 'openlp/core/ui/settingsdialog.py'
--- openlp/core/ui/settingsdialog.py 2010-12-26 11:04:47 +0000
+++ openlp/core/ui/settingsdialog.py 2011-01-02 22:57:56 +0000
@@ -31,32 +31,28 @@
class Ui_SettingsDialog(object):
def setupUi(self, settingsDialog):
settingsDialog.setObjectName(u'settingsDialog')
- settingsDialog.resize(724, 502)
+ settingsDialog.resize(700, 300)
settingsDialog.setWindowIcon(
build_icon(u':/system/system_settings.png'))
self.settingsLayout = QtGui.QVBoxLayout(settingsDialog)
- self.settingsLayout.setSpacing(8)
- self.settingsLayout.setMargin(8)
+ margins = self.settingsLayout.contentsMargins()
+ self.settingsLayout.setContentsMargins(0, margins.top(), 0, 0)
self.settingsLayout.setObjectName(u'settingsLayout')
self.settingsTabWidget = QtGui.QTabWidget(settingsDialog)
+ self.settingsTabWidget.setDocumentMode(True)
self.settingsTabWidget.setObjectName(u'settingsTabWidget')
self.settingsLayout.addWidget(self.settingsTabWidget)
+ self.buttonBoxLayout = QtGui.QGridLayout()
+ self.buttonBoxLayout.setContentsMargins(margins.left(), 0,
+ margins.right(), margins.bottom())
+ self.buttonBoxLayout.setObjectName(u'buttonBoxLayout')
self.buttonBox = QtGui.QDialogButtonBox(settingsDialog)
- sizePolicy = QtGui.QSizePolicy(
- QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(
- self.buttonBox.sizePolicy().hasHeightForWidth())
- self.buttonBox.setSizePolicy(sizePolicy)
- self.buttonBox.setMaximumSize(QtCore.QSize(16777215, 16777215))
- self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(
QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName(u'buttonBox')
- self.settingsLayout.addWidget(self.buttonBox)
+ self.buttonBoxLayout.addWidget(self.buttonBox)
+ self.settingsLayout.addLayout(self.buttonBoxLayout)
self.retranslateUi(settingsDialog)
- self.settingsTabWidget.setCurrentIndex(0)
QtCore.QObject.connect(self.buttonBox,
QtCore.SIGNAL(u'accepted()'), settingsDialog.accept)
QtCore.QObject.connect(self.buttonBox,
@@ -65,4 +61,4 @@
def retranslateUi(self, settingsDialog):
settingsDialog.setWindowTitle(translate('OpenLP.SettingsForm',
- 'Configure OpenLP'))
\ No newline at end of file
+ 'Configure OpenLP'))
=== modified file 'openlp/core/ui/shortcutlistdialog.py'
--- openlp/core/ui/shortcutlistdialog.py 2010-12-26 11:04:47 +0000
+++ openlp/core/ui/shortcutlistdialog.py 2011-01-02 22:57:56 +0000
@@ -31,83 +31,58 @@
class Ui_ShortcutListDialog(object):
def setupUi(self, shortcutListDialog):
shortcutListDialog.setObjectName(u'shortcutListDialog')
- shortcutListDialog.resize(500, 438)
- self.shortcutListLayout = QtGui.QVBoxLayout(shortcutListDialog)
- self.shortcutListLayout.setSpacing(8)
- self.shortcutListLayout.setMargin(8)
- self.shortcutListLayout.setObjectName(u'shortcutListLayout')
- self.shortcutListTreeWidget = QtGui.QTreeWidget(shortcutListDialog)
- self.shortcutListTreeWidget.setAlternatingRowColors(True)
- self.shortcutListTreeWidget.setObjectName(u'shortcutListTreeWidget')
- self.shortcutListTreeWidget.setColumnCount(2)
- self.shortcutListTreeWidget.setSelectionBehavior(
- QtGui.QAbstractItemView.SelectRows)
- self.shortcutListLayout.addWidget(self.shortcutListTreeWidget)
- self.shortcutLayout = QtGui.QVBoxLayout()
- self.shortcutLayout.setSpacing(8)
- self.shortcutLayout.setContentsMargins(0, -1, -1, -1)
- self.shortcutLayout.setObjectName(u'shortcutLayout')
- self.defaultRadioButton = QtGui.QRadioButton(shortcutListDialog)
- self.defaultRadioButton.setChecked(True)
- self.defaultRadioButton.setObjectName(u'defaultRadioButton')
- self.shortcutLayout.addWidget(self.defaultRadioButton)
- self.customShortcutLayout = QtGui.QHBoxLayout()
- self.customShortcutLayout.setSpacing(8)
- self.customShortcutLayout.setObjectName(u'customShortcutLayout')
- self.customRadioButton = QtGui.QRadioButton(shortcutListDialog)
- self.customRadioButton.setObjectName(u'customRadioButton')
- self.customShortcutLayout.addWidget(self.customRadioButton)
- self.shortcutPushButton = QtGui.QPushButton(shortcutListDialog)
- self.shortcutPushButton.setMinimumSize(QtCore.QSize(84, 0))
- self.shortcutPushButton.setIcon(
+# shortcutListDialog.resize(500, 438)
+ self.dialogLayout = QtGui.QVBoxLayout(shortcutListDialog)
+ self.dialogLayout.setObjectName(u'dialogLayout')
+ self.treeWidget = QtGui.QTreeWidget(shortcutListDialog)
+ self.treeWidget.setAlternatingRowColors(True)
+ self.treeWidget.setObjectName(u'treeWidget')
+ self.treeWidget.setColumnCount(2)
+ self.dialogLayout.addWidget(self.treeWidget)
+ self.defaultButton = QtGui.QRadioButton(shortcutListDialog)
+ self.defaultButton.setChecked(True)
+ self.defaultButton.setObjectName(u'defaultButton')
+ self.dialogLayout.addWidget(self.defaultButton)
+ self.customLayout = QtGui.QHBoxLayout()
+ self.customLayout.setObjectName(u'customLayout')
+ self.customButton = QtGui.QRadioButton(shortcutListDialog)
+ self.customButton.setObjectName(u'customButton')
+ self.customLayout.addWidget(self.customButton)
+ self.shortcutButton = QtGui.QPushButton(shortcutListDialog)
+ self.shortcutButton.setIcon(
build_icon(u':/system/system_configure_shortcuts.png'))
- self.shortcutPushButton.setCheckable(True)
- self.shortcutPushButton.setChecked(False)
- self.shortcutPushButton.setObjectName(u'shortcutPushButton')
- self.customShortcutLayout.addWidget(self.shortcutPushButton)
- self.clearShortcutToolButton = QtGui.QToolButton(shortcutListDialog)
- self.clearShortcutToolButton.setMinimumSize(QtCore.QSize(0, 16))
- self.clearShortcutToolButton.setText(u'')
- self.clearShortcutToolButton.setIcon(
+ self.shortcutButton.setCheckable(True)
+ self.shortcutButton.setObjectName(u'shortcutButton')
+ self.customLayout.addWidget(self.shortcutButton)
+ self.clearShortcutButton = QtGui.QToolButton(shortcutListDialog)
+ self.clearShortcutButton.setIcon(
build_icon(u':/system/clear_shortcut.png'))
- self.clearShortcutToolButton.setObjectName(u'clearShortcutToolButton')
- self.customShortcutLayout.addWidget(self.clearShortcutToolButton)
- self.customShortcutSpacer = QtGui.QSpacerItem(40, 20,
- QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
- self.customShortcutLayout.addItem(self.customShortcutSpacer)
- self.shortcutLayout.addLayout(self.customShortcutLayout)
- self.shortcutListLayout.addLayout(self.shortcutLayout)
- self.shortcutListButtonBox = QtGui.QDialogButtonBox(shortcutListDialog)
- self.shortcutListButtonBox.setOrientation(QtCore.Qt.Horizontal)
- self.shortcutListButtonBox.setStandardButtons(
- QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok |
- QtGui.QDialogButtonBox.Reset)
- self.shortcutListButtonBox.setObjectName(u'shortcutListButtonBox')
- self.shortcutListLayout.addWidget(self.shortcutListButtonBox)
-
+ self.clearShortcutButton.setAutoRaise(True)
+ self.clearShortcutButton.setObjectName(u'clearShortcutButton')
+ self.customLayout.addWidget(self.clearShortcutButton)
+ self.customLayout.addStretch()
+ self.dialogLayout.addLayout(self.customLayout)
+ self.buttonBox = QtGui.QDialogButtonBox(shortcutListDialog)
+ self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel |
+ QtGui.QDialogButtonBox.Ok | QtGui.QDialogButtonBox.Reset)
+ self.buttonBox.setObjectName(u'buttonBox')
+ self.dialogLayout.addWidget(self.buttonBox)
self.retranslateUi(shortcutListDialog)
- QtCore.QObject.connect(
- self.shortcutListButtonBox,
- QtCore.SIGNAL(u'accepted()'),
- shortcutListDialog.accept
- )
- QtCore.QObject.connect(
- self.shortcutListButtonBox,
- QtCore.SIGNAL(u'rejected()'),
- shortcutListDialog.reject
- )
+ 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(
translate('OpenLP.ShortcutListDialog', 'Customize Shortcuts'))
- self.shortcutListTreeWidget.setHeaderLabels([
+ self.treeWidget.setHeaderLabels([
translate('OpenLP.ShortcutListDialog', 'Action'),
- translate('OpenLP.ShortcutListDialog', 'Shortcut')
- ])
- self.defaultRadioButton.setText(
+ translate('OpenLP.ShortcutListDialog', 'Shortcut')])
+ self.defaultButton.setText(
translate('OpenLP.ShortcutListDialog', 'Default: %s'))
- self.customRadioButton.setText(
+ self.customButton.setText(
translate('OpenLP.ShortcutListDialog', 'Custom:'))
- self.shortcutPushButton.setText(
+ self.shortcutButton.setText(
translate('OpenLP.ShortcutListDialog', 'None'))
=== modified file 'openlp/core/ui/shortcutlistform.py'
--- openlp/core/ui/shortcutlistform.py 2010-12-27 22:57:35 +0000
+++ openlp/core/ui/shortcutlistform.py 2011-01-02 22:57:56 +0000
@@ -49,11 +49,8 @@
self.setupUi(self)
self.actionList = None
self.captureShortcut = False
- QtCore.QObject.connect(
- self.shortcutPushButton,
- QtCore.SIGNAL(u'toggled(bool)'),
- self.onShortcutPushButtonClicked
- )
+ QtCore.QObject.connect(self.shortcutButton,
+ QtCore.SIGNAL(u'toggled(bool)'), self.onShortcutButtonClicked)
def keyReleaseEvent(self, event):
Qt = QtCore.Qt
@@ -83,8 +80,8 @@
QtGui.QMessageBox.Ok
)
else:
- self.shortcutPushButton.setText(key_sequence.toString())
- self.shortcutPushButton.setChecked(False)
+ self.shortcutButton.setText(key_sequence.toString())
+ self.shortcutButton.setChecked(False)
self.captureShortcut = False
def exec_(self, actionList):
@@ -93,7 +90,7 @@
return QtGui.QDialog.exec_(self)
def refreshActions(self):
- self.shortcutListTreeWidget.clear()
+ self.treeWidget.clear()
for category in self.actionList.categories:
item = QtGui.QTreeWidgetItem([category.name])
for action in category.actions:
@@ -103,7 +100,7 @@
actionItem.setIcon(0, action.icon())
item.addChild(actionItem)
item.setExpanded(True)
- self.shortcutListTreeWidget.addTopLevelItem(item)
+ self.treeWidget.addTopLevelItem(item)
- def onShortcutPushButtonClicked(self, toggled):
+ def onShortcutButtonClicked(self, toggled):
self.captureShortcut = toggled
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2011-01-01 15:28:10 +0000
+++ openlp/core/ui/slidecontroller.py 2011-01-02 22:57:56 +0000
@@ -128,7 +128,6 @@
# Splitter
self.Splitter = QtGui.QSplitter(self.Panel)
self.Splitter.setOrientation(QtCore.Qt.Vertical)
- self.Splitter.setOpaqueResize(False)
self.PanelLayout.addWidget(self.Splitter)
# Actual controller section
self.Controller = QtGui.QWidget(self.Splitter)
=== modified file 'openlp/core/ui/splashscreen.py'
--- openlp/core/ui/splashscreen.py 2010-12-26 11:04:47 +0000
+++ openlp/core/ui/splashscreen.py 2011-01-02 22:57:56 +0000
@@ -26,33 +26,17 @@
from PyQt4 import QtCore, QtGui
-class SplashScreen(object):
+class SplashScreen(QtGui.QSplashScreen):
def __init__(self):
- self.splash_screen = QtGui.QSplashScreen()
+ QtGui.QSplashScreen.__init__(self)
self.setupUi()
def setupUi(self):
- self.splash_screen.setObjectName(u'splash_screen')
- self.splash_screen.setWindowModality(QtCore.Qt.NonModal)
- self.splash_screen.setEnabled(True)
- self.splash_screen.resize(370, 370)
- sizePolicy = QtGui.QSizePolicy(
- QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(
- self.splash_screen.sizePolicy().hasHeightForWidth())
- self.splash_screen.setSizePolicy(sizePolicy)
- self.splash_screen.setContextMenuPolicy(QtCore.Qt.PreventContextMenu)
+ self.setObjectName(u'splash_screen')
+ self.setWindowFlags(self.windowFlags() | QtCore.Qt.WindowStaysOnTopHint)
+ self.setContextMenuPolicy(QtCore.Qt.PreventContextMenu)
splash_image = QtGui.QPixmap(u':/graphics/openlp-splash-screen.png')
- self.splash_screen.setPixmap(splash_image)
- self.splash_screen.setMask(splash_image.mask())
- self.splash_screen.setWindowFlags(
- QtCore.Qt.SplashScreen | QtCore.Qt.WindowStaysOnTopHint)
- QtCore.QMetaObject.connectSlotsByName(self.splash_screen)
-
- def show(self):
- self.splash_screen.show()
-
- def finish(self, widget):
- self.splash_screen.finish(widget)
\ No newline at end of file
+ self.setPixmap(splash_image)
+ self.setMask(splash_image.mask())
+ self.resize(370, 370)
+ QtCore.QMetaObject.connectSlotsByName(self)
=== modified file 'openlp/core/ui/themeform.py'
--- openlp/core/ui/themeform.py 2010-12-31 19:22:41 +0000
+++ openlp/core/ui/themeform.py 2011-01-02 22:57:56 +0000
@@ -38,8 +38,8 @@
class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
"""
- This is the Bible Import Wizard, which allows easy importing of Bibles
- into OpenLP from other formats like OSIS, CSV and OpenSong.
+ This is the Theme Import Wizard, which allows easy creation and editing of
+ OpenLP themes.
"""
log.info(u'ThemeWizardForm loaded')
=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py 2010-12-31 19:22:41 +0000
+++ openlp/core/ui/thememanager.py 2011-01-02 22:57:56 +0000
@@ -49,12 +49,14 @@
QtGui.QWidget.__init__(self, parent)
self.parent = parent
self.settingsSection = u'themes'
+ self.themeForm = ThemeForm(self)
+ self.fileRenameForm = FileRenameForm(self)
self.serviceComboBox = self.parent.ServiceManagerContents.themeComboBox
+ # start with the layout
self.layout = QtGui.QVBoxLayout(self)
self.layout.setSpacing(0)
self.layout.setMargin(0)
- self.themeForm = ThemeForm(self)
- self.fileRenameForm = FileRenameForm(self)
+ self.layout.setObjectName(u'layout')
self.toolbar = OpenLPToolbar(self)
self.toolbar.addToolbarButton(
translate('OpenLP.ThemeManager', 'New Theme'),
@@ -82,13 +84,17 @@
u':/general/general_export.png',
translate('OpenLP.ThemeManager', 'Export a theme.'),
self.onExportTheme)
+ self.toolbar.setObjectName(u'toolbar')
+ self.layout.addWidget(self.toolbar)
self.themeWidget = QtGui.QWidgetAction(self.toolbar)
- self.layout.addWidget(self.toolbar)
+ self.themeWidget.setObjectName(u'themeWidget')
+ # create theme manager list
self.themeListWidget = QtGui.QListWidget(self)
self.themeListWidget.setAlternatingRowColors(True)
self.themeListWidget.setIconSize(QtCore.QSize(88, 50))
+ self.themeListWidget.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
+ self.themeListWidget.setObjectName(u'themeListWidget')
self.layout.addWidget(self.themeListWidget)
- self.themeListWidget.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
QtCore.QObject.connect(self.themeListWidget,
QtCore.SIGNAL('customContextMenuRequested(QPoint)'),
self.contextMenu)
@@ -106,8 +112,7 @@
self.deleteAction = self.menu.addAction(
translate('OpenLP.ThemeManager', '&Delete Theme'))
self.deleteAction.setIcon(build_icon(u':/general/general_delete.png'))
- self.sep1 = self.menu.addAction(u'')
- self.sep1.setSeparator(True)
+ self.separator = self.menu.addSeparator()
self.globalAction = self.menu.addAction(
translate('OpenLP.ThemeManager', 'Set As &Global Default'))
self.globalAction.setIcon(build_icon(u':/general/general_export.png'))
=== modified file 'openlp/core/ui/themestab.py'
--- openlp/core/ui/themestab.py 2010-12-26 11:04:47 +0000
+++ openlp/core/ui/themestab.py 2011-01-02 22:57:56 +0000
@@ -40,14 +40,10 @@
self.setObjectName(u'ThemesTab')
self.tabTitleVisible = translate('OpenLP.ThemesTab', 'Themes')
self.ThemesTabLayout = QtGui.QHBoxLayout(self)
- self.ThemesTabLayout.setSpacing(8)
- self.ThemesTabLayout.setMargin(8)
self.ThemesTabLayout.setObjectName(u'ThemesTabLayout')
self.GlobalGroupBox = QtGui.QGroupBox(self)
self.GlobalGroupBox.setObjectName(u'GlobalGroupBox')
self.GlobalGroupBoxLayout = QtGui.QVBoxLayout(self.GlobalGroupBox)
- self.GlobalGroupBoxLayout.setSpacing(8)
- self.GlobalGroupBoxLayout.setMargin(8)
self.GlobalGroupBoxLayout.setObjectName(u'GlobalGroupBoxLayout')
self.DefaultComboBox = QtGui.QComboBox(self.GlobalGroupBox)
self.DefaultComboBox.setObjectName(u'DefaultComboBox')
@@ -60,39 +56,30 @@
self.LevelGroupBox.setObjectName(u'LevelGroupBox')
self.LevelLayout = QtGui.QFormLayout(self.LevelGroupBox)
self.LevelLayout.setLabelAlignment(
- QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
+ QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
self.LevelLayout.setFormAlignment(
- QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
- self.LevelLayout.setMargin(8)
- self.LevelLayout.setSpacing(8)
+ QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
self.LevelLayout.setObjectName(u'LevelLayout')
self.SongLevelRadioButton = QtGui.QRadioButton(self.LevelGroupBox)
self.SongLevelRadioButton.setObjectName(u'SongLevelRadioButton')
- self.LevelLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
- self.SongLevelRadioButton)
self.SongLevelLabel = QtGui.QLabel(self.LevelGroupBox)
self.SongLevelLabel.setWordWrap(True)
self.SongLevelLabel.setObjectName(u'SongLevelLabel')
- self.LevelLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
- self.SongLevelLabel)
+ self.LevelLayout.addRow(self.SongLevelRadioButton, self.SongLevelLabel)
self.ServiceLevelRadioButton = QtGui.QRadioButton(self.LevelGroupBox)
self.ServiceLevelRadioButton.setObjectName(u'ServiceLevelRadioButton')
- self.LevelLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
- self.ServiceLevelRadioButton)
self.ServiceLevelLabel = QtGui.QLabel(self.LevelGroupBox)
self.ServiceLevelLabel.setWordWrap(True)
self.ServiceLevelLabel.setObjectName(u'ServiceLevelLabel')
- self.LevelLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
+ self.LevelLayout.addRow(self.ServiceLevelRadioButton,
self.ServiceLevelLabel)
self.GlobalLevelRadioButton = QtGui.QRadioButton(self.LevelGroupBox)
self.GlobalLevelRadioButton.setChecked(True)
self.GlobalLevelRadioButton.setObjectName(u'GlobalLevelRadioButton')
- self.LevelLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
- self.GlobalLevelRadioButton)
self.GlobalLevelLabel = QtGui.QLabel(self.LevelGroupBox)
self.GlobalLevelLabel.setWordWrap(True)
self.GlobalLevelLabel.setObjectName(u'GlobalLevelLabel')
- self.LevelLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
+ self.LevelLayout.addRow(self.GlobalLevelRadioButton,
self.GlobalLevelLabel)
self.ThemesTabLayout.addWidget(self.LevelGroupBox)
QtCore.QObject.connect(self.SongLevelRadioButton,
@@ -130,6 +117,20 @@
translate('OpenLP.ThemesTab', 'Use the global theme, overriding '
'any themes associated with either the service or the songs.'))
+ def resizeEvent(self, event=None):
+ """
+ Resize the sides in two equal halves if the layout allows this.
+ """
+ if event:
+ SettingsTab.resizeEvent(self, event)
+ width = self.width() - self.ThemesTabLayout.spacing() - \
+ self.ThemesTabLayout.contentsMargins().left() - \
+ self.ThemesTabLayout.contentsMargins().right()
+ left_width = min(width - self.LevelGroupBox.minimumSizeHint().width(),
+ width / 2)
+ left_width = max(left_width, self.GlobalGroupBox.minimumSizeHint().width())
+ self.GlobalGroupBox.setMinimumWidth(left_width)
+
def load(self):
settings = QtCore.QSettings()
settings.beginGroup(self.settingsSection)
@@ -212,4 +213,4 @@
if not preview.isNull():
preview = preview.scaled(300, 255, QtCore.Qt.KeepAspectRatio,
QtCore.Qt.SmoothTransformation)
- self.DefaultListView.setPixmap(preview)
\ No newline at end of file
+ self.DefaultListView.setPixmap(preview)
=== modified file 'openlp/plugins/alerts/lib/alertstab.py'
--- openlp/plugins/alerts/lib/alertstab.py 2010-12-26 11:04:47 +0000
+++ openlp/plugins/alerts/lib/alertstab.py 2011-01-02 22:57:56 +0000
@@ -40,138 +40,71 @@
def setupUi(self):
self.setObjectName(u'AlertsTab')
self.AlertsLayout = QtGui.QHBoxLayout(self)
- self.AlertsLayout.setSpacing(8)
- self.AlertsLayout.setMargin(8)
self.AlertsLayout.setObjectName(u'AlertsLayout')
- self.AlertLeftColumn = QtGui.QWidget(self)
- self.AlertLeftColumn.setObjectName(u'AlertLeftColumn')
- self.SlideLeftLayout = QtGui.QVBoxLayout(self.AlertLeftColumn)
- self.SlideLeftLayout.setSpacing(8)
- self.SlideLeftLayout.setMargin(0)
- self.SlideLeftLayout.setObjectName(u'SlideLeftLayout')
- self.FontGroupBox = QtGui.QGroupBox(self.AlertLeftColumn)
+ self.LeftColumn = QtGui.QWidget(self)
+ self.LeftColumn.setObjectName(u'LeftColumn')
+ self.LeftLayout = QtGui.QVBoxLayout(self.LeftColumn)
+ self.LeftLayout.setMargin(0)
+ self.LeftLayout.setObjectName(u'LeftLayout')
+ self.FontGroupBox = QtGui.QGroupBox(self.LeftColumn)
self.FontGroupBox.setObjectName(u'FontGroupBox')
- self.FontLayout = QtGui.QVBoxLayout(self.FontGroupBox)
- self.FontLayout.setSpacing(8)
- self.FontLayout.setMargin(8)
+ self.FontLayout = QtGui.QFormLayout(self.FontGroupBox)
self.FontLayout.setObjectName(u'FontLayout')
self.FontLabel = QtGui.QLabel(self.FontGroupBox)
self.FontLabel.setObjectName(u'FontLabel')
- self.FontLayout.addWidget(self.FontLabel)
self.FontComboBox = QtGui.QFontComboBox(self.FontGroupBox)
self.FontComboBox.setObjectName(u'FontComboBox')
- self.FontLayout.addWidget(self.FontComboBox)
- self.ColorWidget = QtGui.QWidget(self.FontGroupBox)
- self.ColorWidget.setObjectName(u'ColorWidget')
- self.ColorLayout = QtGui.QHBoxLayout(self.ColorWidget)
- self.ColorLayout.setSpacing(8)
- self.ColorLayout.setMargin(0)
+ self.FontLayout.addRow(self.FontLabel, self.FontComboBox)
+ self.FontColorLabel = QtGui.QLabel(self.FontGroupBox)
+ self.FontColorLabel.setObjectName(u'FontColorLabel')
+ self.ColorLayout = QtGui.QHBoxLayout()
self.ColorLayout.setObjectName(u'ColorLayout')
- self.FontColorLabel = QtGui.QLabel(self.ColorWidget)
- self.FontColorLabel.setObjectName(u'FontColorLabel')
- self.ColorLayout.addWidget(self.FontColorLabel)
- self.FontColorButton = QtGui.QPushButton(self.ColorWidget)
+ self.FontColorButton = QtGui.QPushButton(self.FontGroupBox)
self.FontColorButton.setObjectName(u'FontColorButton')
self.ColorLayout.addWidget(self.FontColorButton)
- self.ColorSpacerItem = QtGui.QSpacerItem(40, 20,
- QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
- self.ColorLayout.addItem(self.ColorSpacerItem)
- self.BackgroundColorLabel = QtGui.QLabel(self.ColorWidget)
+ self.ColorLayout.addSpacing(20)
+ self.BackgroundColorLabel = QtGui.QLabel(self.FontGroupBox)
self.BackgroundColorLabel.setObjectName(u'BackgroundColorLabel')
self.ColorLayout.addWidget(self.BackgroundColorLabel)
- self.BackgroundColorButton = QtGui.QPushButton(self.ColorWidget)
+ self.BackgroundColorButton = QtGui.QPushButton(self.FontGroupBox)
self.BackgroundColorButton.setObjectName(u'BackgroundColorButton')
self.ColorLayout.addWidget(self.BackgroundColorButton)
- self.FontLayout.addWidget(self.ColorWidget)
- self.FontSizeWidget = QtGui.QWidget(self.FontGroupBox)
- self.FontSizeWidget.setObjectName(u'FontSizeWidget')
- self.FontSizeLayout = QtGui.QHBoxLayout(self.FontSizeWidget)
- self.FontSizeLayout.setSpacing(8)
- self.FontSizeLayout.setMargin(0)
- self.FontSizeLayout.setObjectName(u'FontSizeLayout')
- self.FontSizeLabel = QtGui.QLabel(self.FontSizeWidget)
+ self.FontLayout.addRow(self.FontColorLabel, self.ColorLayout)
+ self.FontSizeLabel = QtGui.QLabel(self.FontGroupBox)
self.FontSizeLabel.setObjectName(u'FontSizeLabel')
- self.FontSizeLayout.addWidget(self.FontSizeLabel)
- self.FontSizeSpinBox = QtGui.QSpinBox(self.FontSizeWidget)
+ self.FontSizeSpinBox = QtGui.QSpinBox(self.FontGroupBox)
self.FontSizeSpinBox.setObjectName(u'FontSizeSpinBox')
- self.FontSizeLayout.addWidget(self.FontSizeSpinBox)
- self.FontSizeSpacer = QtGui.QSpacerItem(147, 20,
- QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
- self.FontSizeLayout.addItem(self.FontSizeSpacer)
- self.FontLayout.addWidget(self.FontSizeWidget)
- self.TimeoutWidget = QtGui.QWidget(self.FontGroupBox)
- self.TimeoutWidget.setObjectName(u'TimeoutWidget')
- self.TimeoutLayout = QtGui.QHBoxLayout(self.TimeoutWidget)
- self.TimeoutLayout.setSpacing(8)
- self.TimeoutLayout.setMargin(0)
- self.TimeoutLayout.setObjectName(u'TimeoutLayout')
- self.TimeoutLabel = QtGui.QLabel(self.TimeoutWidget)
+ self.FontLayout.addRow(self.FontSizeLabel, self.FontSizeSpinBox)
+ self.TimeoutLabel = QtGui.QLabel(self.FontGroupBox)
self.TimeoutLabel.setObjectName(u'TimeoutLabel')
- self.TimeoutLayout.addWidget(self.TimeoutLabel)
- self.TimeoutSpinBox = QtGui.QSpinBox(self.TimeoutWidget)
+ self.TimeoutSpinBox = QtGui.QSpinBox(self.FontGroupBox)
self.TimeoutSpinBox.setMaximum(180)
self.TimeoutSpinBox.setObjectName(u'TimeoutSpinBox')
- self.TimeoutLayout.addWidget(self.TimeoutSpinBox)
- self.TimeoutSpacer = QtGui.QSpacerItem(147, 20,
- QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
- self.TimeoutLayout.addItem(self.TimeoutSpacer)
- self.FontLayout.addWidget(self.TimeoutWidget)
- self.LocationWidget = QtGui.QWidget(self.FontGroupBox)
- self.LocationWidget.setObjectName(u'LocationWidget')
- self.LocationLayout = QtGui.QHBoxLayout(self.LocationWidget)
- self.LocationLayout.setSpacing(8)
- self.LocationLayout.setMargin(0)
- self.LocationLayout.setObjectName(u'LocationLayout')
- self.LocationLabel = QtGui.QLabel(self.LocationWidget)
+ self.FontLayout.addRow(self.TimeoutLabel, self.TimeoutSpinBox)
+ self.LocationLabel = QtGui.QLabel(self.FontGroupBox)
self.LocationLabel.setObjectName(u'LocationLabel')
- self.LocationLayout.addWidget(self.LocationLabel)
- self.LocationComboBox = QtGui.QComboBox(self.LocationWidget)
- self.LocationComboBox.addItem(QtCore.QString())
- self.LocationComboBox.addItem(QtCore.QString())
- self.LocationComboBox.addItem(QtCore.QString())
+ self.LocationComboBox = QtGui.QComboBox(self.FontGroupBox)
+ self.LocationComboBox.addItems([u'', u'', u''])
self.LocationComboBox.setObjectName(u'LocationComboBox')
- self.LocationLayout.addWidget(self.LocationComboBox)
- self.LocationSpacer = QtGui.QSpacerItem(147, 20,
- QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
- self.LocationLayout.addItem(self.LocationSpacer)
- self.FontLayout.addWidget(self.LocationWidget)
- self.SlideLeftLayout.addWidget(self.FontGroupBox)
- self.SlideLeftSpacer = QtGui.QSpacerItem(20, 94,
- QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.SlideLeftLayout.addItem(self.SlideLeftSpacer)
- self.AlertsLayout.addWidget(self.AlertLeftColumn)
- self.AlertRightColumn = QtGui.QWidget(self)
- self.AlertRightColumn.setObjectName(u'AlertRightColumn')
- self.SlideRightLayout = QtGui.QVBoxLayout(self.AlertRightColumn)
- self.SlideRightLayout.setSpacing(8)
- self.SlideRightLayout.setMargin(0)
- self.SlideRightLayout.setObjectName(u'SlideRightLayout')
- self.PreviewGroupBox = QtGui.QGroupBox(self.AlertRightColumn)
- sizePolicy = QtGui.QSizePolicy(
- QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(
- self.PreviewGroupBox.sizePolicy().hasHeightForWidth())
- self.PreviewGroupBox.setSizePolicy(sizePolicy)
+ self.FontLayout.addRow(self.LocationLabel, self.LocationComboBox)
+ self.LeftLayout.addWidget(self.FontGroupBox)
+ self.LeftLayout.addStretch()
+ self.AlertsLayout.addWidget(self.LeftColumn)
+ self.RightColumn = QtGui.QWidget(self)
+ self.RightColumn.setObjectName(u'RightColumn')
+ self.RightLayout = QtGui.QVBoxLayout(self.RightColumn)
+ self.RightLayout.setMargin(0)
+ self.RightLayout.setObjectName(u'RightLayout')
+ self.PreviewGroupBox = QtGui.QGroupBox(self.RightColumn)
self.PreviewGroupBox.setObjectName(u'PreviewGroupBox')
self.PreviewLayout = QtGui.QVBoxLayout(self.PreviewGroupBox)
- self.PreviewLayout.setSpacing(8)
- self.PreviewLayout.setMargin(8)
self.PreviewLayout.setObjectName(u'PreviewLayout')
self.FontPreview = QtGui.QLineEdit(self.PreviewGroupBox)
- self.FontPreview.setFixedSize(QtCore.QSize(350, 100))
- self.FontPreview.setReadOnly(True)
- self.FontPreview.setFocusPolicy(QtCore.Qt.NoFocus)
- self.FontPreview.setAlignment(
- QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter)
self.FontPreview.setObjectName(u'FontPreview')
self.PreviewLayout.addWidget(self.FontPreview)
- self.SlideRightLayout.addWidget(self.PreviewGroupBox)
- self.SlideRightSpacer = QtGui.QSpacerItem(20, 40,
- QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.SlideRightLayout.addItem(self.SlideRightSpacer)
- self.AlertsLayout.addWidget(self.AlertRightColumn)
+ self.RightLayout.addWidget(self.PreviewGroupBox)
+ self.RightLayout.addStretch()
+ self.AlertsLayout.addWidget(self.RightColumn)
# Signals and slots
QtCore.QObject.connect(self.BackgroundColorButton,
QtCore.SIGNAL(u'pressed()'), self.onBackgroundColorButtonClicked)
@@ -216,6 +149,20 @@
self.LocationComboBox.setItemText(2,
translate('AlertsPlugin.AlertsTab', 'Bottom'))
+ def resizeEvent(self, event=None):
+ """
+ Resize the sides in two equal halves if the layout allows this.
+ """
+ if event:
+ SettingsTab.resizeEvent(self, event)
+ width = self.width() - self.AlertsLayout.spacing() - \
+ self.AlertsLayout.contentsMargins().left() - \
+ self.AlertsLayout.contentsMargins().right()
+ left_width = min(width - self.RightColumn.minimumSizeHint().width(),
+ width / 2)
+ left_width = max(left_width, self.LeftColumn.minimumSizeHint().width())
+ self.LeftColumn.setMinimumWidth(left_width)
+
def onBackgroundColorButtonClicked(self):
new_color = QtGui.QColorDialog.getColor(
QtGui.QColor(self.bg_color), self)
@@ -294,4 +241,4 @@
font.setPointSize(self.font_size)
self.FontPreview.setFont(font)
self.FontPreview.setStyleSheet(u'background-color: %s; color: %s' %
- (self.bg_color, self.font_color))
\ No newline at end of file
+ (self.bg_color, self.font_color))
=== modified file 'openlp/plugins/bibles/lib/biblestab.py'
--- openlp/plugins/bibles/lib/biblestab.py 2010-12-26 11:04:47 +0000
+++ openlp/plugins/bibles/lib/biblestab.py 2011-01-02 22:57:56 +0000
@@ -47,88 +47,57 @@
def setupUi(self):
self.setObjectName(u'BiblesTab')
self.BibleLayout = QtGui.QHBoxLayout(self)
- self.BibleLayout.setSpacing(8)
- self.BibleLayout.setMargin(8)
self.BibleLayout.setObjectName(u'BibleLayout')
- self.BibleLeftWidget = QtGui.QWidget(self)
- self.BibleLeftWidget.setObjectName(u'BibleLeftWidget')
- self.BibleLeftLayout = QtGui.QVBoxLayout(self.BibleLeftWidget)
- self.BibleLeftLayout.setObjectName(u'BibleLeftLayout')
- self.BibleLeftLayout.setSpacing(8)
- self.BibleLeftLayout.setMargin(0)
- self.VerseDisplayGroupBox = QtGui.QGroupBox(self)
+ self.LeftWidget = QtGui.QWidget(self)
+ self.LeftWidget.setObjectName(u'LeftWidget')
+ self.LeftLayout = QtGui.QVBoxLayout(self.LeftWidget)
+ self.LeftLayout.setMargin(0)
+ self.LeftLayout.setObjectName(u'LeftLayout')
+ self.VerseDisplayGroupBox = QtGui.QGroupBox(self.LeftWidget)
self.VerseDisplayGroupBox.setObjectName(u'VerseDisplayGroupBox')
- self.VerseDisplayLayout = QtGui.QGridLayout(self.VerseDisplayGroupBox)
- self.VerseDisplayLayout.setMargin(8)
+ self.VerseDisplayLayout = QtGui.QFormLayout(self.VerseDisplayGroupBox)
self.VerseDisplayLayout.setObjectName(u'VerseDisplayLayout')
self.NewChaptersCheckBox = QtGui.QCheckBox(self.VerseDisplayGroupBox)
self.NewChaptersCheckBox.setObjectName(u'NewChaptersCheckBox')
- self.VerseDisplayLayout.addWidget(self.NewChaptersCheckBox, 0, 0, 1, 1)
- self.DisplayStyleWidget = QtGui.QWidget(self.VerseDisplayGroupBox)
- self.DisplayStyleWidget.setObjectName(u'DisplayStyleWidget')
- self.DisplayStyleLayout = QtGui.QHBoxLayout(self.DisplayStyleWidget)
- self.DisplayStyleLayout.setSpacing(8)
- self.DisplayStyleLayout.setMargin(0)
- self.DisplayStyleLayout.setObjectName(u'DisplayStyleLayout')
- self.DisplayStyleLabel = QtGui.QLabel(self.DisplayStyleWidget)
+ self.VerseDisplayLayout.addRow(self.NewChaptersCheckBox)
+ self.DisplayStyleLabel = QtGui.QLabel(self.VerseDisplayGroupBox)
self.DisplayStyleLabel.setObjectName(u'DisplayStyleLabel')
- self.DisplayStyleLayout.addWidget(self.DisplayStyleLabel)
- self.DisplayStyleComboBox = QtGui.QComboBox(self.DisplayStyleWidget)
+ self.DisplayStyleComboBox = QtGui.QComboBox(self.VerseDisplayGroupBox)
+ self.DisplayStyleComboBox.addItems([u'', u'', u'', u''])
self.DisplayStyleComboBox.setObjectName(u'DisplayStyleComboBox')
- self.DisplayStyleComboBox.addItem(QtCore.QString())
- self.DisplayStyleComboBox.addItem(QtCore.QString())
- self.DisplayStyleComboBox.addItem(QtCore.QString())
- self.DisplayStyleComboBox.addItem(QtCore.QString())
- self.DisplayStyleLayout.addWidget(self.DisplayStyleComboBox)
- self.VerseDisplayLayout.addWidget(self.DisplayStyleWidget, 1, 0, 1, 1)
- self.LayoutStyleWidget = QtGui.QWidget(self.VerseDisplayGroupBox)
- self.LayoutStyleWidget.setObjectName(u'LayoutStyleWidget')
- self.LayoutStyleLayout = QtGui.QHBoxLayout(self.LayoutStyleWidget)
- self.LayoutStyleLayout.setSpacing(8)
- self.LayoutStyleLayout.setMargin(0)
- self.LayoutStyleLayout.setObjectName(u'LayoutStyleLayout')
- self.LayoutStyleLabel = QtGui.QLabel(self.LayoutStyleWidget)
+ self.VerseDisplayLayout.addRow(self.DisplayStyleLabel,
+ self.DisplayStyleComboBox)
+ self.LayoutStyleLabel = QtGui.QLabel(self.VerseDisplayGroupBox)
self.LayoutStyleLabel.setObjectName(u'LayoutStyleLabel')
- self.LayoutStyleLayout.addWidget(self.LayoutStyleLabel)
- self.LayoutStyleComboBox = QtGui.QComboBox(self.LayoutStyleWidget)
+ self.LayoutStyleComboBox = QtGui.QComboBox(self.VerseDisplayGroupBox)
self.LayoutStyleComboBox.setObjectName(u'LayoutStyleComboBox')
- self.LayoutStyleComboBox.addItem(QtCore.QString())
- self.LayoutStyleComboBox.addItem(QtCore.QString())
- self.LayoutStyleComboBox.addItem(QtCore.QString())
- self.LayoutStyleLayout.addWidget(self.LayoutStyleComboBox)
- self.VerseDisplayLayout.addWidget(self.LayoutStyleWidget, 2, 0, 1, 1)
- self.BibleThemeWidget = QtGui.QWidget(self.VerseDisplayGroupBox)
- self.BibleThemeWidget.setObjectName(u'BibleThemeWidget')
- self.BibleThemeLayout = QtGui.QHBoxLayout(self.BibleThemeWidget)
- self.BibleThemeLayout.setSpacing(8)
- self.BibleThemeLayout.setMargin(0)
- self.BibleThemeLayout.setObjectName(u'BibleThemeLayout')
- self.BibleThemeLabel = QtGui.QLabel(self.BibleThemeWidget)
+ self.LayoutStyleComboBox.addItems([u'', u'', u''])
+ self.VerseDisplayLayout.addRow(self.LayoutStyleLabel,
+ self.LayoutStyleComboBox)
+ self.BibleSecondCheckBox = QtGui.QCheckBox(self.VerseDisplayGroupBox)
+ self.BibleSecondCheckBox.setObjectName(u'BibleSecondCheckBox')
+ self.VerseDisplayLayout.addRow(self.BibleSecondCheckBox)
+ self.BibleThemeLabel = QtGui.QLabel(self.VerseDisplayGroupBox)
self.BibleThemeLabel.setObjectName(u'BibleThemeLabel')
- self.BibleThemeLayout.addWidget(self.BibleThemeLabel)
- self.BibleThemeComboBox = QtGui.QComboBox(self.BibleThemeWidget)
+ self.BibleThemeComboBox = QtGui.QComboBox(self.VerseDisplayGroupBox)
+ self.BibleThemeComboBox.addItem(u'')
self.BibleThemeComboBox.setObjectName(u'BibleThemeComboBox')
- self.BibleThemeComboBox.addItem(QtCore.QString())
- self.BibleThemeLayout.addWidget(self.BibleThemeComboBox)
- self.BibleSecondCheckBox = QtGui.QCheckBox(self.VerseDisplayGroupBox)
- self.BibleSecondCheckBox.setObjectName(u'BibleSecondCheckBox')
- self.VerseDisplayLayout.addWidget(self.BibleSecondCheckBox, 3, 0, 1, 1)
- self.VerseDisplayLayout.addWidget(self.BibleThemeWidget, 4, 0, 1, 1)
+ self.VerseDisplayLayout.addRow(self.BibleThemeLabel,
+ self.BibleThemeComboBox)
self.ChangeNoteLabel = QtGui.QLabel(self.VerseDisplayGroupBox)
+ self.ChangeNoteLabel.setWordWrap(True)
self.ChangeNoteLabel.setObjectName(u'ChangeNoteLabel')
- self.VerseDisplayLayout.addWidget(self.ChangeNoteLabel, 5, 0, 1, 1)
- self.BibleLeftLayout.addWidget(self.VerseDisplayGroupBox)
- self.BibleLeftSpacer = QtGui.QSpacerItem(40, 20,
- QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.BibleLeftLayout.addItem(self.BibleLeftSpacer)
- self.BibleLayout.addWidget(self.BibleLeftWidget)
- self.BibleRightWidget = QtGui.QWidget(self)
- self.BibleRightWidget.setObjectName(u'BibleRightWidget')
- self.BibleRightLayout = QtGui.QVBoxLayout(self.BibleRightWidget)
- self.BibleRightLayout.setObjectName(u'BibleRightLayout')
- self.BibleRightLayout.setSpacing(8)
- self.BibleRightLayout.setMargin(0)
- self.BibleLayout.addWidget(self.BibleRightWidget)
+ self.VerseDisplayLayout.addRow(self.ChangeNoteLabel)
+ self.LeftLayout.addWidget(self.VerseDisplayGroupBox)
+ self.LeftLayout.addStretch()
+ self.BibleLayout.addWidget(self.LeftWidget)
+ self.RightWidget = QtGui.QWidget(self)
+ self.RightWidget.setObjectName(u'RightWidget')
+ self.RightLayout = QtGui.QVBoxLayout(self.RightWidget)
+ self.RightLayout.setMargin(0)
+ self.RightLayout.setObjectName(u'RightLayout')
+ self.RightLayout.addStretch()
+ self.BibleLayout.addWidget(self.RightWidget)
# Signals and slots
QtCore.QObject.connect(
self.NewChaptersCheckBox, QtCore.SIGNAL(u'stateChanged(int)'),
@@ -179,6 +148,20 @@
self.BibleSecondCheckBox.setText(
translate('BiblesPlugin.BiblesTab', 'Display second Bible verses'))
+ def resizeEvent(self, event=None):
+ """
+ Resize the sides in two equal halves if the layout allows this.
+ """
+ if event:
+ SettingsTab.resizeEvent(self, event)
+ width = self.width() - self.BibleLayout.spacing() - \
+ self.BibleLayout.contentsMargins().left() - \
+ self.BibleLayout.contentsMargins().right()
+ left_width = min(width - self.RightWidget.minimumSizeHint().width(),
+ width / 2)
+ left_width = max(left_width, self.LeftWidget.minimumSizeHint().width())
+ self.LeftWidget.setMinimumWidth(left_width)
+
def onBibleThemeComboBoxChanged(self):
self.bible_theme = self.BibleThemeComboBox.currentText()
@@ -251,4 +234,4 @@
# Not Found.
index = 0
self.bible_theme = u''
- self.BibleThemeComboBox.setCurrentIndex(index)
\ No newline at end of file
+ self.BibleThemeComboBox.setCurrentIndex(index)
=== modified file 'openlp/plugins/bibles/lib/http.py'
--- openlp/plugins/bibles/lib/http.py 2011-01-01 10:33:14 +0000
+++ openlp/plugins/bibles/lib/http.py 2011-01-02 22:57:56 +0000
@@ -488,7 +488,7 @@
Receiver.send_message(u'openlp_error_message', {
u'title': translate('BiblesPlugin', 'No Book Found'),
u'message': translate('BiblesPlugin', 'No matching '
- 'book could be found in this Bible. Check that you'
+ 'book could be found in this Bible. Check that you '
'have spelled the name of the book correctly.')
})
return []
=== modified file 'openlp/plugins/custom/lib/customtab.py'
--- openlp/plugins/custom/lib/customtab.py 2010-12-26 11:04:47 +0000
+++ openlp/plugins/custom/lib/customtab.py 2011-01-02 22:57:56 +0000
@@ -37,21 +37,30 @@
def setupUi(self):
self.setObjectName(u'CustomTab')
- self.customLayout = QtGui.QFormLayout(self)
- self.customLayout.setSpacing(8)
- self.customLayout.setMargin(8)
+ self.customLayout = QtGui.QHBoxLayout(self)
self.customLayout.setObjectName(u'customLayout')
- self.customModeGroupBox = QtGui.QGroupBox(self)
+ self.leftWidget = QtGui.QWidget(self)
+ self.leftWidget.setObjectName(u'leftWidget')
+ self.leftLayout = QtGui.QVBoxLayout(self.leftWidget)
+ self.leftLayout.setMargin(0)
+ self.leftLayout.setObjectName(u'leftLayout')
+ self.customModeGroupBox = QtGui.QGroupBox(self.leftWidget)
self.customModeGroupBox.setObjectName(u'customModeGroupBox')
- self.customModeLayout = QtGui.QVBoxLayout(self.customModeGroupBox)
- self.customModeLayout.setSpacing(8)
- self.customModeLayout.setMargin(8)
+ self.customModeLayout = QtGui.QFormLayout(self.customModeGroupBox)
self.customModeLayout.setObjectName(u'customModeLayout')
self.displayFooterCheckBox = QtGui.QCheckBox(self.customModeGroupBox)
self.displayFooterCheckBox.setObjectName(u'displayFooterCheckBox')
- self.customModeLayout.addWidget(self.displayFooterCheckBox)
- self.customLayout.setWidget(
- 0, QtGui.QFormLayout.LabelRole, self.customModeGroupBox)
+ self.customModeLayout.addRow(self.displayFooterCheckBox)
+ self.leftLayout.addWidget(self.customModeGroupBox)
+ self.leftLayout.addStretch()
+ self.customLayout.addWidget(self.leftWidget)
+ self.rightWidget = QtGui.QWidget(self)
+ self.rightWidget.setObjectName(u'rightWidget')
+ self.rightLayout = QtGui.QVBoxLayout(self.rightWidget)
+ self.rightLayout.setMargin(0)
+ self.rightLayout.setObjectName(u'rightLayout')
+ self.rightLayout.addStretch()
+ self.customLayout.addWidget(self.rightWidget)
QtCore.QObject.connect(self.displayFooterCheckBox,
QtCore.SIGNAL(u'stateChanged(int)'),
self.onDisplayFooterCheckBoxChanged)
@@ -62,6 +71,20 @@
self.displayFooterCheckBox.setText(
translate('CustomPlugin.CustomTab', 'Display footer'))
+ def resizeEvent(self, event=None):
+ """
+ Resize the sides in two equal halves if the layout allows this.
+ """
+ if event:
+ SettingsTab.resizeEvent(self, event)
+ width = self.width() - self.customLayout.spacing() - \
+ self.customLayout.contentsMargins().left() - \
+ self.customLayout.contentsMargins().right()
+ left_width = min(width - self.rightWidget.minimumSizeHint().width(),
+ width / 2)
+ left_width = max(left_width, self.leftWidget.minimumSizeHint().width())
+ self.leftWidget.setMinimumWidth(left_width)
+
def onDisplayFooterCheckBoxChanged(self, check_state):
self.displayFooter = False
# we have a set value convert to True/False
@@ -76,4 +99,4 @@
def save(self):
QtCore.QSettings().setValue(self.settingsSection + u'/display footer',
- QtCore.QVariant(self.displayFooter))
\ No newline at end of file
+ QtCore.QVariant(self.displayFooter))
=== modified file 'openlp/plugins/media/lib/mediatab.py'
--- openlp/plugins/media/lib/mediatab.py 2010-12-26 11:04:47 +0000
+++ openlp/plugins/media/lib/mediatab.py 2011-01-02 22:57:56 +0000
@@ -37,32 +37,55 @@
def setupUi(self):
self.setObjectName(u'MediaTab')
- self.tabTitleVisible = translate('MediaPlugin.MediaTab', 'Media')
- self.mediaLayout = QtGui.QFormLayout(self)
- self.mediaLayout.setSpacing(8)
- self.mediaLayout.setMargin(8)
+ self.mediaLayout = QtGui.QHBoxLayout(self)
self.mediaLayout.setObjectName(u'mediaLayout')
- self.mediaModeGroupBox = QtGui.QGroupBox(self)
+ self.leftWidget = QtGui.QWidget(self)
+ self.leftWidget.setObjectName(u'leftWidget')
+ self.leftLayout = QtGui.QVBoxLayout(self.leftWidget)
+ self.leftLayout.setMargin(0)
+ self.leftLayout.setObjectName(u'leftLayout')
+ self.mediaModeGroupBox = QtGui.QGroupBox(self.leftWidget)
self.mediaModeGroupBox.setObjectName(u'mediaModeGroupBox')
- self.mediaModeLayout = QtGui.QVBoxLayout(self.mediaModeGroupBox)
- self.mediaModeLayout.setSpacing(8)
- self.mediaModeLayout.setMargin(8)
+ self.mediaModeLayout = QtGui.QFormLayout(self.mediaModeGroupBox)
self.mediaModeLayout.setObjectName(u'mediaModeLayout')
self.usePhononCheckBox = QtGui.QCheckBox(self.mediaModeGroupBox)
self.usePhononCheckBox.setObjectName(u'usePhononCheckBox')
- self.mediaModeLayout.addWidget(self.usePhononCheckBox)
- self.mediaLayout.setWidget(
- 0, QtGui.QFormLayout.LabelRole, self.mediaModeGroupBox)
+ self.mediaModeLayout.addRow(self.usePhononCheckBox)
+ self.leftLayout.addWidget(self.mediaModeGroupBox)
+ self.leftLayout.addStretch()
+ self.mediaLayout.addWidget(self.leftWidget)
+ self.rightWidget = QtGui.QWidget(self)
+ self.rightWidget.setObjectName(u'rightWidget')
+ self.rightLayout = QtGui.QVBoxLayout(self.rightWidget)
+ self.rightLayout.setMargin(0)
+ self.rightLayout.setObjectName(u'rightLayout')
+ self.rightLayout.addStretch()
+ self.mediaLayout.addWidget(self.rightWidget)
QtCore.QObject.connect(self.usePhononCheckBox,
QtCore.SIGNAL(u'stateChanged(int)'),
self.onUsePhononCheckBoxChanged)
def retranslateUi(self):
+ self.tabTitleVisible = translate('MediaPlugin.MediaTab', 'Media')
self.mediaModeGroupBox.setTitle(translate('MediaPlugin.MediaTab',
'Media Display'))
self.usePhononCheckBox.setText(
translate('MediaPlugin.MediaTab', 'Use Phonon for video playback'))
+ def resizeEvent(self, event=None):
+ """
+ Resize the sides in two equal halves if the layout allows this.
+ """
+ if event:
+ SettingsTab.resizeEvent(self, event)
+ width = self.width() - self.mediaLayout.spacing() - \
+ self.mediaLayout.contentsMargins().left() - \
+ self.mediaLayout.contentsMargins().right()
+ left_width = min(width - self.rightWidget.minimumSizeHint().width(),
+ width / 2)
+ left_width = max(left_width, self.leftWidget.minimumSizeHint().width())
+ self.leftWidget.setMinimumWidth(left_width)
+
def onUsePhononCheckBoxChanged(self, check_state):
self.usePhonon = (check_state == QtCore.Qt.Checked)
self.usePhononChanged = True
@@ -79,4 +102,4 @@
if oldUsePhonon != self.usePhonon:
QtCore.QSettings().setValue(self.settingsSection + u'/use phonon',
QtCore.QVariant(self.usePhonon))
- Receiver.send_message(u'config_screen_changed')
\ No newline at end of file
+ Receiver.send_message(u'config_screen_changed')
=== modified file 'openlp/plugins/presentations/lib/presentationtab.py'
--- openlp/plugins/presentations/lib/presentationtab.py 2010-12-26 11:04:47 +0000
+++ openlp/plugins/presentations/lib/presentationtab.py 2011-01-02 22:57:56 +0000
@@ -45,69 +45,48 @@
"""
self.setObjectName(u'PresentationTab')
self.PresentationLayout = QtGui.QHBoxLayout(self)
- self.PresentationLayout.setSpacing(8)
- self.PresentationLayout.setMargin(8)
self.PresentationLayout.setObjectName(u'PresentationLayout')
- self.PresentationLeftWidget = QtGui.QWidget(self)
- self.PresentationLeftWidget.setObjectName(u'PresentationLeftWidget')
- self.PresentationLeftLayout = QtGui.QVBoxLayout(
- self.PresentationLeftWidget)
- self.PresentationLeftLayout.setObjectName(u'PresentationLeftLayout')
- self.PresentationLeftLayout.setSpacing(8)
- self.PresentationLeftLayout.setMargin(0)
- self.VerseDisplayGroupBox = QtGui.QGroupBox(self)
- self.VerseDisplayGroupBox.setObjectName(u'VerseDisplayGroupBox')
- self.VerseDisplayLayout = QtGui.QVBoxLayout(self.VerseDisplayGroupBox)
- self.VerseDisplayLayout.setMargin(8)
- self.VerseDisplayLayout.setObjectName(u'VerseDisplayLayout')
+ self.LeftWidget = QtGui.QWidget(self)
+ self.LeftWidget.setObjectName(u'LeftWidget')
+ self.LeftLayout = QtGui.QVBoxLayout(self.LeftWidget)
+ self.LeftLayout.setMargin(0)
+ self.LeftLayout.setObjectName(u'LeftLayout')
+ self.ControllersGroupBox = QtGui.QGroupBox(self.LeftWidget)
+ self.ControllersGroupBox.setObjectName(u'ControllersGroupBox')
+ self.ControllersLayout = QtGui.QVBoxLayout(self.ControllersGroupBox)
+ self.ControllersLayout.setObjectName(u'ControllersLayout')
self.PresenterCheckboxes = {}
for key in self.controllers:
controller = self.controllers[key]
- checkbox = QtGui.QCheckBox(self.VerseDisplayGroupBox)
- checkbox.setTristate(False)
+ checkbox = QtGui.QCheckBox(self.ControllersGroupBox)
checkbox.setEnabled(controller.available)
checkbox.setObjectName(controller.name + u'CheckBox')
self.PresenterCheckboxes[controller.name] = checkbox
- self.VerseDisplayLayout.addWidget(checkbox)
- self.PresentationThemeWidget = QtGui.QWidget(self.VerseDisplayGroupBox)
- self.PresentationThemeWidget.setObjectName(u'PresentationThemeWidget')
- self.PresentationThemeLayout = QtGui.QHBoxLayout(
- self.PresentationThemeWidget)
- self.PresentationThemeLayout.setSpacing(8)
- self.PresentationThemeLayout.setMargin(0)
- self.PresentationThemeLayout.setObjectName(u'PresentationThemeLayout')
- self.AdvancedGroupBox = QtGui.QGroupBox(self)
+ self.ControllersLayout.addWidget(checkbox)
+ self.LeftLayout.addWidget(self.ControllersGroupBox)
+ self.AdvancedGroupBox = QtGui.QGroupBox(self.LeftWidget)
self.AdvancedGroupBox.setObjectName(u'AdvancedGroupBox')
self.AdvancedLayout = QtGui.QVBoxLayout(self.AdvancedGroupBox)
- self.AdvancedLayout.setSpacing(8)
- self.AdvancedLayout.setMargin(8)
self.AdvancedLayout.setObjectName(u'AdvancedLayout')
self.OverrideAppCheckBox = QtGui.QCheckBox(self.AdvancedGroupBox)
self.OverrideAppCheckBox.setObjectName(u'OverrideAppCheckBox')
self.AdvancedLayout.addWidget(self.OverrideAppCheckBox)
- self.PresentationLeftLayout.addWidget(self.VerseDisplayGroupBox)
- self.PresentationLeftLayout.addWidget(self.AdvancedGroupBox)
- self.PresentationLeftSpacer = QtGui.QSpacerItem(40, 20,
- QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.PresentationLeftLayout.addItem(self.PresentationLeftSpacer)
- self.PresentationLayout.addWidget(self.PresentationLeftWidget)
- self.PresentationRightWidget = QtGui.QWidget(self)
- self.PresentationRightWidget.setObjectName(u'PresentationRightWidget')
- self.PresentationRightLayout = QtGui.QVBoxLayout(
- self.PresentationRightWidget)
- self.PresentationRightLayout.setObjectName(u'PresentationRightLayout')
- self.PresentationRightLayout.setSpacing(8)
- self.PresentationRightLayout.setMargin(0)
- self.PresentationRightSpacer = QtGui.QSpacerItem(50, 20,
- QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.PresentationRightLayout.addItem(self.PresentationRightSpacer)
- self.PresentationLayout.addWidget(self.PresentationRightWidget)
+ self.LeftLayout.addWidget(self.AdvancedGroupBox)
+ self.LeftLayout.addStretch()
+ self.PresentationLayout.addWidget(self.LeftWidget)
+ self.RightWidget = QtGui.QWidget(self)
+ self.RightWidget.setObjectName(u'RightWidget')
+ self.RightLayout = QtGui.QVBoxLayout(self.RightWidget)
+ self.RightLayout.setMargin(0)
+ self.RightLayout.setObjectName(u'RightLayout')
+ self.RightLayout.addStretch()
+ self.PresentationLayout.addWidget(self.RightWidget)
def retranslateUi(self):
"""
Make any translation changes
"""
- self.VerseDisplayGroupBox.setTitle(
+ self.ControllersGroupBox.setTitle(
translate('PresentationPlugin.PresentationTab',
'Available Controllers'))
for key in self.controllers:
@@ -121,6 +100,20 @@
translate('PresentationPlugin.PresentationTab',
'Allow presentation application to be overriden'))
+ def resizeEvent(self, event=None):
+ """
+ Resize the sides in two equal halves if the layout allows this.
+ """
+ if event:
+ SettingsTab.resizeEvent(self, event)
+ width = self.width() - self.PresentationLayout.spacing() - \
+ self.PresentationLayout.contentsMargins().left() - \
+ self.PresentationLayout.contentsMargins().right()
+ left_width = min(width - self.RightWidget.minimumSizeHint().width(),
+ width / 2)
+ left_width = max(left_width, self.LeftWidget.minimumSizeHint().width())
+ self.LeftWidget.setMinimumWidth(left_width)
+
def load(self):
"""
Load the settings.
@@ -160,4 +153,4 @@
QtCore.QVariant(self.OverrideAppCheckBox.checkState()))
changed = True
if changed:
- Receiver.send_message(u'mediaitem_presentation_rebuild')
\ No newline at end of file
+ Receiver.send_message(u'mediaitem_presentation_rebuild')
=== modified file 'openlp/plugins/remotes/lib/remotetab.py'
--- openlp/plugins/remotes/lib/remotetab.py 2010-12-26 11:04:47 +0000
+++ openlp/plugins/remotes/lib/remotetab.py 2011-01-02 22:57:56 +0000
@@ -37,34 +37,63 @@
def setupUi(self):
self.setObjectName(u'RemoteTab')
- self.remoteLayout = QtGui.QFormLayout(self)
- self.remoteLayout.setSpacing(8)
- self.remoteLayout.setMargin(8)
+ self.remoteLayout = QtGui.QHBoxLayout(self)
self.remoteLayout.setObjectName(u'remoteLayout')
- self.serverSettingsGroupBox = QtGui.QGroupBox(self)
+ self.leftWidget = QtGui.QWidget(self)
+ self.leftWidget.setSizePolicy(QtGui.QSizePolicy.Fixed,
+ QtGui.QSizePolicy.Preferred)
+ self.leftWidget.setObjectName(u'leftWidget')
+ self.leftLayout = QtGui.QVBoxLayout(self.leftWidget)
+ self.leftLayout.setMargin(0)
+ self.leftLayout.setObjectName(u'leftLayout')
+ self.serverSettingsGroupBox = QtGui.QGroupBox(self.leftWidget)
self.serverSettingsGroupBox.setObjectName(u'serverSettingsGroupBox')
self.serverSettingsLayout = QtGui.QFormLayout(
self.serverSettingsGroupBox)
- self.serverSettingsLayout.setSpacing(8)
- self.serverSettingsLayout.setMargin(8)
self.serverSettingsLayout.setObjectName(u'serverSettingsLayout')
+ self.addressLabel = QtGui.QLabel(self.serverSettingsGroupBox)
+ self.addressLabel.setObjectName(u'addressLabel')
self.addressEdit = QtGui.QLineEdit(self.serverSettingsGroupBox)
self.addressEdit.setObjectName(u'addressEdit')
- self.serverSettingsLayout.addRow(
- translate('RemotePlugin.RemoteTab', 'Serve on IP address:'),
- self.addressEdit)
+ self.serverSettingsLayout.addRow(self.addressLabel, self.addressEdit)
+ self.portLabel = QtGui.QLabel(self.serverSettingsGroupBox)
+ self.portLabel.setObjectName(u'portLabel')
self.portSpinBox = QtGui.QSpinBox(self.serverSettingsGroupBox)
+ self.portSpinBox.setMaximum(32767)
self.portSpinBox.setObjectName(u'portSpinBox')
- self.portSpinBox.setMaximum(32767)
- self.serverSettingsLayout.addRow(
- translate('RemotePlugin.RemoteTab', 'Port number:'),
- self.portSpinBox)
- self.remoteLayout.setWidget(
- 0, QtGui.QFormLayout.LabelRole, self.serverSettingsGroupBox)
+ self.serverSettingsLayout.addRow(self.portLabel, self.portSpinBox)
+ self.leftLayout.addWidget(self.serverSettingsGroupBox)
+ self.leftLayout.addStretch()
+ self.remoteLayout.addWidget(self.leftWidget)
+ self.rightWidget = QtGui.QWidget(self)
+ self.rightWidget.setObjectName(u'rightWidget')
+ self.rightLayout = QtGui.QVBoxLayout(self.rightWidget)
+ self.rightLayout.setMargin(0)
+ self.rightLayout.setObjectName(u'rightLayout')
+ self.rightLayout.addStretch()
+ self.remoteLayout.addWidget(self.rightWidget)
def retranslateUi(self):
self.serverSettingsGroupBox.setTitle(
translate('RemotePlugin.RemoteTab', 'Server Settings'))
+ self.addressLabel.setText(translate('RemotePlugin.RemoteTab',
+ 'Serve on IP address:'))
+ self.portLabel.setText(translate('RemotePlugin.RemoteTab',
+ 'Port number:'))
+
+ def resizeEvent(self, event=None):
+ """
+ Resize the sides in two equal halves if the layout allows this.
+ """
+ if event:
+ SettingsTab.resizeEvent(self, event)
+ width = self.width() - self.remoteLayout.spacing() - \
+ self.remoteLayout.contentsMargins().left() - \
+ self.remoteLayout.contentsMargins().right()
+ left_width = min(width - self.rightWidget.minimumSizeHint().width(),
+ width / 2)
+ left_width = max(left_width, self.leftWidget.minimumSizeHint().width())
+ self.leftWidget.setMinimumWidth(left_width)
def load(self):
self.portSpinBox.setValue(
@@ -78,4 +107,4 @@
QtCore.QSettings().setValue(self.settingsSection + u'/port',
QtCore.QVariant(self.portSpinBox.value()))
QtCore.QSettings().setValue(self.settingsSection + u'/ip address',
- QtCore.QVariant(self.addressEdit.text()))
\ No newline at end of file
+ QtCore.QVariant(self.addressEdit.text()))
=== modified file 'openlp/plugins/songs/lib/songstab.py'
--- openlp/plugins/songs/lib/songstab.py 2010-12-27 08:28:33 +0000
+++ openlp/plugins/songs/lib/songstab.py 2011-01-02 22:57:56 +0000
@@ -37,15 +37,16 @@
def setupUi(self):
self.setObjectName(u'SongsTab')
- self.SongsLayout = QtGui.QFormLayout(self)
- self.SongsLayout.setSpacing(8)
- self.SongsLayout.setMargin(8)
+ self.SongsLayout = QtGui.QHBoxLayout(self)
self.SongsLayout.setObjectName(u'SongsLayout')
- self.SongsModeGroupBox = QtGui.QGroupBox(self)
+ self.LeftWidget = QtGui.QWidget(self)
+ self.LeftWidget.setObjectName(u'LeftWidget')
+ self.LeftLayout = QtGui.QVBoxLayout(self.LeftWidget)
+ self.LeftLayout.setMargin(0)
+ self.LeftLayout.setObjectName(u'LeftLayout')
+ self.SongsModeGroupBox = QtGui.QGroupBox(self.LeftWidget)
self.SongsModeGroupBox.setObjectName(u'SongsModeGroupBox')
self.SongsModeLayout = QtGui.QVBoxLayout(self.SongsModeGroupBox)
- self.SongsModeLayout.setSpacing(8)
- self.SongsModeLayout.setMargin(8)
self.SongsModeLayout.setObjectName(u'SongsModeLayout')
self.SearchAsTypeCheckBox = QtGui.QCheckBox(self.SongsModeGroupBox)
self.SearchAsTypeCheckBox.setObjectName(u'SearchAsTypeCheckBox')
@@ -61,8 +62,16 @@
self.SongAddFromServiceCheckBox.setObjectName(
u'SongAddFromServiceCheckBox')
self.SongsModeLayout.addWidget(self.SongAddFromServiceCheckBox)
- self.SongsLayout.setWidget(
- 0, QtGui.QFormLayout.LabelRole, self.SongsModeGroupBox)
+ self.LeftLayout.addWidget(self.SongsModeGroupBox)
+ self.LeftLayout.addStretch()
+ self.SongsLayout.addWidget(self.LeftWidget)
+ self.RightWidget = QtGui.QWidget(self)
+ self.RightWidget.setObjectName(u'RightWidget')
+ self.RightLayout = QtGui.QVBoxLayout(self.RightWidget)
+ self.RightLayout.setMargin(0)
+ self.RightLayout.setObjectName(u'RightLayout')
+ self.RightLayout.addStretch()
+ self.SongsLayout.addWidget(self.RightWidget)
QtCore.QObject.connect(self.SearchAsTypeCheckBox,
QtCore.SIGNAL(u'stateChanged(int)'),
self.onSearchAsTypeCheckBoxChanged)
@@ -89,6 +98,20 @@
translate('SongsPlugin.SongsTab',
'Add missing songs when opening service'))
+ def resizeEvent(self, event=None):
+ """
+ Resize the sides in two equal halves if the layout allows this.
+ """
+ if event:
+ SettingsTab.resizeEvent(self, event)
+ width = self.width() - self.SongsLayout.spacing() - \
+ self.SongsLayout.contentsMargins().left() - \
+ self.SongsLayout.contentsMargins().right()
+ left_width = min(width - self.RightWidget.minimumSizeHint().width(),
+ width / 2)
+ left_width = max(left_width, self.LeftWidget.minimumSizeHint().width())
+ self.LeftWidget.setMinimumWidth(left_width)
+
def onSearchAsTypeCheckBoxChanged(self, check_state):
self.song_search = False
# we have a set value convert to True/False
@@ -139,4 +162,4 @@
QtCore.QVariant(self.update_edit))
settings.setValue(u'add song from service',
QtCore.QVariant(self.update_load))
- settings.endGroup()
\ No newline at end of file
+ settings.endGroup()
Follow ups