forked from openlp/openlp
head
This commit is contained in:
commit
2c190c6c12
@ -41,11 +41,11 @@ class AdvancedTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
Initialise the settings tab
|
Initialise the settings tab
|
||||||
"""
|
"""
|
||||||
generalTranslated = translate('AdvancedTab', 'Advanced')
|
advancedTranslated = translate('OpenLP.AdvancedTab', 'Advanced')
|
||||||
SettingsTab.__init__(self, parent ,u'Advanced', generalTranslated)
|
|
||||||
self.default_image = u':/graphics/openlp-splash-screen.png'
|
self.default_image = u':/graphics/openlp-splash-screen.png'
|
||||||
self.default_color = u'#ffffff'
|
self.default_color = u'#ffffff'
|
||||||
self.icon_path = u':/system/system_settings.png'
|
self.icon_path = u':/system/system_settings.png'
|
||||||
|
SettingsTab.__init__(self, parent, u'Advanced', advancedTranslated)
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
"""
|
"""
|
||||||
@ -82,14 +82,6 @@ class AdvancedTab(SettingsTab):
|
|||||||
u'enableAutoCloseCheckBox')
|
u'enableAutoCloseCheckBox')
|
||||||
self.uiLayout.addRow(self.enableAutoCloseCheckBox)
|
self.uiLayout.addRow(self.enableAutoCloseCheckBox)
|
||||||
self.leftLayout.addWidget(self.uiGroupBox)
|
self.leftLayout.addWidget(self.uiGroupBox)
|
||||||
self.hideMouseGroupBox = QtGui.QGroupBox(self.leftColumn)
|
|
||||||
self.hideMouseGroupBox.setObjectName(u'hideMouseGroupBox')
|
|
||||||
self.hideMouseLayout = QtGui.QVBoxLayout(self.hideMouseGroupBox)
|
|
||||||
self.hideMouseLayout.setObjectName(u'hideMouseLayout')
|
|
||||||
self.hideMouseCheckBox = QtGui.QCheckBox(self.hideMouseGroupBox)
|
|
||||||
self.hideMouseCheckBox.setObjectName(u'hideMouseCheckBox')
|
|
||||||
self.hideMouseLayout.addWidget(self.hideMouseCheckBox)
|
|
||||||
self.leftLayout.addWidget(self.hideMouseGroupBox)
|
|
||||||
self.leftLayout.addStretch()
|
self.leftLayout.addStretch()
|
||||||
self.defaultImageGroupBox = QtGui.QGroupBox(self.rightColumn)
|
self.defaultImageGroupBox = QtGui.QGroupBox(self.rightColumn)
|
||||||
self.defaultImageGroupBox.setObjectName(u'defaultImageGroupBox')
|
self.defaultImageGroupBox.setObjectName(u'defaultImageGroupBox')
|
||||||
@ -109,26 +101,42 @@ class AdvancedTab(SettingsTab):
|
|||||||
self.defaultBrowseButton.setObjectName(u'defaultBrowseButton')
|
self.defaultBrowseButton.setObjectName(u'defaultBrowseButton')
|
||||||
self.defaultBrowseButton.setIcon(
|
self.defaultBrowseButton.setIcon(
|
||||||
build_icon(u':/general/general_open.png'))
|
build_icon(u':/general/general_open.png'))
|
||||||
|
self.defaultRevertButton = QtGui.QToolButton(self.defaultImageGroupBox)
|
||||||
|
self.defaultRevertButton.setObjectName(u'defaultRevertButton')
|
||||||
|
self.defaultRevertButton.setIcon(
|
||||||
|
build_icon(u':/general/general_revert.png'))
|
||||||
self.defaultFileLayout = QtGui.QHBoxLayout()
|
self.defaultFileLayout = QtGui.QHBoxLayout()
|
||||||
self.defaultFileLayout.setObjectName(u'defaultFileLayout')
|
self.defaultFileLayout.setObjectName(u'defaultFileLayout')
|
||||||
self.defaultFileLayout.addWidget(self.defaultFileEdit)
|
self.defaultFileLayout.addWidget(self.defaultFileEdit)
|
||||||
self.defaultFileLayout.addWidget(self.defaultBrowseButton)
|
self.defaultFileLayout.addWidget(self.defaultBrowseButton)
|
||||||
|
self.defaultFileLayout.addWidget(self.defaultRevertButton)
|
||||||
self.defaultImageLayout.addRow(self.defaultFileLabel,
|
self.defaultImageLayout.addRow(self.defaultFileLabel,
|
||||||
self.defaultFileLayout)
|
self.defaultFileLayout)
|
||||||
self.rightLayout.addWidget(self.defaultImageGroupBox)
|
self.rightLayout.addWidget(self.defaultImageGroupBox)
|
||||||
|
self.hideMouseGroupBox = QtGui.QGroupBox(self.leftColumn)
|
||||||
|
self.hideMouseGroupBox.setObjectName(u'hideMouseGroupBox')
|
||||||
|
self.hideMouseLayout = QtGui.QVBoxLayout(self.hideMouseGroupBox)
|
||||||
|
self.hideMouseLayout.setObjectName(u'hideMouseLayout')
|
||||||
|
self.hideMouseCheckBox = QtGui.QCheckBox(self.hideMouseGroupBox)
|
||||||
|
self.hideMouseCheckBox.setObjectName(u'hideMouseCheckBox')
|
||||||
|
self.hideMouseLayout.addWidget(self.hideMouseCheckBox)
|
||||||
|
self.rightLayout.addWidget(self.hideMouseGroupBox)
|
||||||
self.rightLayout.addStretch()
|
self.rightLayout.addStretch()
|
||||||
|
|
||||||
QtCore.QObject.connect(self.defaultColorButton,
|
QtCore.QObject.connect(self.defaultColorButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onDefaultColorButtonPressed)
|
QtCore.SIGNAL(u'pressed()'), self.onDefaultColorButtonPressed)
|
||||||
QtCore.QObject.connect(self.defaultBrowseButton,
|
QtCore.QObject.connect(self.defaultBrowseButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onDefaultBrowseButtonPressed)
|
QtCore.SIGNAL(u'pressed()'), self.onDefaultBrowseButtonPressed)
|
||||||
|
QtCore.QObject.connect(self.defaultRevertButton,
|
||||||
|
QtCore.SIGNAL(u'pressed()'), self.onDefaultRevertButtonPressed)
|
||||||
|
|
||||||
def retranslateUi(self):
|
def retranslateUi(self):
|
||||||
"""
|
"""
|
||||||
Setup the interface translation strings.
|
Setup the interface translation strings.
|
||||||
"""
|
"""
|
||||||
self.tabTitleVisible = UiStrings().Advanced
|
self.tabTitleVisible = UiStrings().Advanced
|
||||||
self.uiGroupBox.setTitle(translate('OpenLP.AdvancedTab', 'UI Settings'))
|
self.uiGroupBox.setTitle(
|
||||||
|
translate('OpenLP.AdvancedTab', 'UI Settings'))
|
||||||
self.recentLabel.setText(
|
self.recentLabel.setText(
|
||||||
translate('OpenLP.AdvancedTab',
|
translate('OpenLP.AdvancedTab',
|
||||||
'Number of recent files to display:'))
|
'Number of recent files to display:'))
|
||||||
@ -150,8 +158,14 @@ class AdvancedTab(SettingsTab):
|
|||||||
'Default Image'))
|
'Default Image'))
|
||||||
self.defaultColorLabel.setText(translate('OpenLP.AdvancedTab',
|
self.defaultColorLabel.setText(translate('OpenLP.AdvancedTab',
|
||||||
'Background color:'))
|
'Background color:'))
|
||||||
|
self.defaultColorButton.setToolTip(translate('OpenLP.AdvancedTab',
|
||||||
|
'Click to select a color.'))
|
||||||
self.defaultFileLabel.setText(translate('OpenLP.AdvancedTab',
|
self.defaultFileLabel.setText(translate('OpenLP.AdvancedTab',
|
||||||
'Image file:'))
|
'Image file:'))
|
||||||
|
self.defaultBrowseButton.setToolTip(translate('OpenLP.AdvancedTab',
|
||||||
|
'Browse for an image file to display.'))
|
||||||
|
self.defaultRevertButton.setToolTip(translate('OpenLP.AdvancedTab',
|
||||||
|
'Revert to the default OpenLP logo.'))
|
||||||
|
|
||||||
def load(self):
|
def load(self):
|
||||||
"""
|
"""
|
||||||
@ -232,4 +246,8 @@ class AdvancedTab(SettingsTab):
|
|||||||
file_filters)
|
file_filters)
|
||||||
if filename:
|
if filename:
|
||||||
self.defaultFileEdit.setText(filename)
|
self.defaultFileEdit.setText(filename)
|
||||||
self.defaultFileEdit.setFocus()
|
self.defaultFileEdit.setFocus()
|
||||||
|
|
||||||
|
def onDefaultRevertButtonPressed(self):
|
||||||
|
self.defaultFileEdit.setText(u':/graphics/openlp-splash-screen.png')
|
||||||
|
self.defaultFileEdit.setFocus()
|
||||||
|
@ -142,7 +142,8 @@ class MainDisplay(DisplayWidget):
|
|||||||
image_file = QtCore.QSettings().value(u'advanced/default image',
|
image_file = QtCore.QSettings().value(u'advanced/default image',
|
||||||
QtCore.QVariant(u':/graphics/openlp-splash-screen.png'))\
|
QtCore.QVariant(u':/graphics/openlp-splash-screen.png'))\
|
||||||
.toString()
|
.toString()
|
||||||
background_color = QtGui.QColor(QtCore.QSettings().value(
|
background_color = QtGui.QColor()
|
||||||
|
background_color.setNamedColor(QtCore.QSettings().value(
|
||||||
u'advanced/default color',
|
u'advanced/default color',
|
||||||
QtCore.QVariant(u'#ffffff')).toString())
|
QtCore.QVariant(u'#ffffff')).toString())
|
||||||
if not background_color.isValid():
|
if not background_color.isValid():
|
||||||
|
BIN
resources/images/general_revert.png
Normal file
BIN
resources/images/general_revert.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 737 B |
@ -52,6 +52,7 @@
|
|||||||
<file>general_open.png</file>
|
<file>general_open.png</file>
|
||||||
<file>general_save.png</file>
|
<file>general_save.png</file>
|
||||||
<file>general_email.png</file>
|
<file>general_email.png</file>
|
||||||
|
<file>general_revert.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="slides">
|
<qresource prefix="slides">
|
||||||
<file>slide_close.png</file>
|
<file>slide_close.png</file>
|
||||||
|
Loading…
Reference in New Issue
Block a user