forked from openlp/openlp
This is a run of the 'enable slide loop' code that gushie showed me plus my checkbox code for it
This commit is contained in:
parent
eedecf6434
commit
33dcf7c439
@ -96,9 +96,9 @@ class GeneralTab(SettingsTab):
|
||||
self.autoPreviewCheckBox = QtGui.QCheckBox(self.settingsGroupBox)
|
||||
self.autoPreviewCheckBox.setObjectName(u'autoPreviewCheckBox')
|
||||
self.settingsLayout.addRow(self.autoPreviewCheckBox)
|
||||
self.stopLoopCheckBox = QtGui.QCheckBox(self.settingsGroupBox)
|
||||
self.stopLoopCheckBox.setObjectName(u'stopLoopCheckBox')
|
||||
self.settingsLayout.addRow(self.stopLoopCheckBox)
|
||||
self.enableLoopCheckbox = QtGui.QCheckBox(self.settingsGroupBox)
|
||||
self.enableLoopCheckbox.setObjectName(u'enableLoopCheckbox')
|
||||
self.settingsLayout.addRow(self.enableLoopCheckbox)
|
||||
# Moved here from image tab
|
||||
self.timeoutLabel = QtGui.QLabel(self.settingsGroupBox)
|
||||
self.timeoutLabel.setObjectName(u'timeoutLabel')
|
||||
@ -221,7 +221,7 @@ class GeneralTab(SettingsTab):
|
||||
'Unblank display when adding new live item'))
|
||||
self.autoPreviewCheckBox.setText(translate('OpenLP.GeneralTab',
|
||||
'Automatically preview next item in service'))
|
||||
self.stopLoopCheckBox.setText(translate('OpenLP.GeneralTab',
|
||||
self.enableLoopCheckbox.setText(translate('OpenLP.GeneralTab',
|
||||
'Enable slide loop'))
|
||||
self.timeoutLabel.setText(translate('OpenLP.GeneralTab',
|
||||
'Slide loop delay:'))
|
||||
@ -275,8 +275,8 @@ class GeneralTab(SettingsTab):
|
||||
QtCore.QVariant(True)).toBool())
|
||||
self.autoPreviewCheckBox.setChecked(settings.value(u'auto preview',
|
||||
QtCore.QVariant(False)).toBool())
|
||||
self.stopLoopCheckBox.setChecked(settings.value(u'stop Loop',
|
||||
QtCore.QVariant(False)).toBool())
|
||||
self.enableLoopCheckbox.setChecked(settings.value(u'enable slide loop',
|
||||
QtCore.QVariant(True)).toBool())
|
||||
self.timeoutSpinBox.setValue(settings.value(u'loop delay',
|
||||
QtCore.QVariant(5)).toInt()[0])
|
||||
self.overrideCheckBox.setChecked(settings.value(u'override position',
|
||||
@ -320,8 +320,8 @@ class GeneralTab(SettingsTab):
|
||||
QtCore.QVariant(self.autoUnblankCheckBox.isChecked()))
|
||||
settings.setValue(u'auto preview',
|
||||
QtCore.QVariant(self.autoPreviewCheckBox.isChecked()))
|
||||
settings.setValue(u'stoploop',
|
||||
QtCore.QVariant(self.stopLoopCheckBox.isChecked()))
|
||||
settings.setValue(u'Enable slide loop',
|
||||
QtCore.QVariant(self.enableLoopCheckbox.isChecked()))
|
||||
settings.setValue(u'loop delay',
|
||||
QtCore.QVariant(self.timeoutSpinBox.value()))
|
||||
settings.setValue(u'ccli number',
|
||||
|
@ -935,7 +935,7 @@ class SlideController(QtGui.QWidget):
|
||||
def onSlideSelectedNextNoloop(self):
|
||||
self.onSlideSelectedNext(False)
|
||||
|
||||
def onSlideSelectedNext(self, loop=QtCore.QSettings().setValue('stop loop', 'stoploop')):
|
||||
def onSlideSelectedNext(self, loop=(not QtCore.QSettings().value(u'enable slide loop', QtCore.QVariant(True)).toBool())):
|
||||
"""
|
||||
Go to the next slide.
|
||||
"""
|
||||
@ -959,7 +959,7 @@ class SlideController(QtGui.QWidget):
|
||||
def onSlideSelectedPreviousNoloop(self):
|
||||
self.onSlideSelectedPrevious(False)
|
||||
|
||||
def onSlideSelectedPrevious(self, loop=QtCore.QSettings().setValue('stop loop', 'stoploop')):
|
||||
def onSlideSelectedPrevious(self, loop=(not QtCore.QSettings().value(u'enable slide loop', QtCore.QVariant(True)).toBool())):
|
||||
"""
|
||||
Go to the previous slide.
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user