forked from openlp/openlp
corrections and enable slide loop updates
This commit is contained in:
parent
541feef8ea
commit
b92b733828
@ -257,4 +257,3 @@ if __name__ == u'__main__':
|
||||
Instantiate and run the application.
|
||||
"""
|
||||
main()
|
||||
|
||||
|
@ -96,9 +96,9 @@ class GeneralTab(SettingsTab):
|
||||
self.autoPreviewCheckBox = QtGui.QCheckBox(self.settingsGroupBox)
|
||||
self.autoPreviewCheckBox.setObjectName(u'autoPreviewCheckBox')
|
||||
self.settingsLayout.addRow(self.autoPreviewCheckBox)
|
||||
self.enableLoopCheckbox = QtGui.QCheckBox(self.settingsGroupBox)
|
||||
self.enableLoopCheckbox.setObjectName(u'enableLoopCheckbox')
|
||||
self.settingsLayout.addRow(self.enableLoopCheckbox)
|
||||
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,8 +221,8 @@ class GeneralTab(SettingsTab):
|
||||
'Unblank display when adding new live item'))
|
||||
self.autoPreviewCheckBox.setText(translate('OpenLP.GeneralTab',
|
||||
'Automatically preview next item in service'))
|
||||
self.enableLoopCheckbox.setText(translate('OpenLP.GeneralTab',
|
||||
'enable slide loop'))
|
||||
self.enableLoopCheckBox.setText(translate('OpenLP.GeneralTab',
|
||||
'Enable slide loop'))
|
||||
self.timeoutLabel.setText(translate('OpenLP.GeneralTab',
|
||||
'Slide loop delay:'))
|
||||
self.timeoutSpinBox.setSuffix(translate('OpenLP.GeneralTab', ' sec'))
|
||||
@ -272,10 +272,10 @@ class GeneralTab(SettingsTab):
|
||||
self.showSplashCheckBox.setChecked(settings.value(u'show splash',
|
||||
QtCore.QVariant(True)).toBool())
|
||||
self.checkForUpdatesCheckBox.setChecked(settings.value(u'update check',
|
||||
QtCore.QVariant(False)).toBool())
|
||||
QtCore.QVariant(True)).toBool())
|
||||
self.autoPreviewCheckBox.setChecked(settings.value(u'auto preview',
|
||||
QtCore.QVariant(False)).toBool())
|
||||
self.enableLoopCheckbox.setChecked(settings.value(u'enable slide loop',
|
||||
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])
|
||||
@ -321,7 +321,7 @@ class GeneralTab(SettingsTab):
|
||||
settings.setValue(u'auto preview',
|
||||
QtCore.QVariant(self.autoPreviewCheckBox.isChecked()))
|
||||
settings.setValue(u'enable slide loop',
|
||||
QtCore.QVariant(self.enableLoopCheckbox.isChecked()))
|
||||
QtCore.QVariant(self.enableLoopCheckBox.isChecked()))
|
||||
settings.setValue(u'loop delay',
|
||||
QtCore.QVariant(self.timeoutSpinBox.value()))
|
||||
settings.setValue(u'ccli number',
|
||||
|
@ -924,11 +924,11 @@ class SlideController(QtGui.QWidget):
|
||||
winimg = QtGui.QPixmap.grabWindow(winid, rect.x(),
|
||||
rect.y(), rect.width(), rect.height())
|
||||
self.slidePreview.setPixmap(winimg)
|
||||
|
||||
def onSlideSelectedNext(self):
|
||||
"""
|
||||
Go to the next slide.
|
||||
"""
|
||||
loopcheck = QtCore.QSettings().value( self.parent.generalSettingsSection + u'generalSettingsSection/enable slide loop', QtCore.QVariant(True).toBool)
|
||||
if not self.serviceItem:
|
||||
return
|
||||
Receiver.send_message(u'%s_next' % self.serviceItem.name.lower(),
|
||||
@ -938,17 +938,18 @@ class SlideController(QtGui.QWidget):
|
||||
else:
|
||||
row = self.previewListWidget.currentRow() + 1
|
||||
if row == self.previewListWidget.rowCount():
|
||||
if loopcheck == True:
|
||||
if QtCore.QSettings().value(self.parent.generalSettingsSection
|
||||
+ u'generalSettingsSection/enable slide loop', QtCore.QVariant(True).toBool):
|
||||
row = 0
|
||||
else:
|
||||
return
|
||||
self.__checkUpdateSelectedSlide(row)
|
||||
self.slideSelected()
|
||||
|
||||
def onSlideSelectedPrevious(self):
|
||||
"""
|
||||
Go to the previous slide.
|
||||
"""
|
||||
loopcheck =QtCore.QSettings().value( self.parent.generalSettingsSection + u'enable slide loop', QtCore.QVariant(True).toBool)
|
||||
if not self.serviceItem:
|
||||
return
|
||||
Receiver.send_message(u'%s_previous' % self.serviceItem.name.lower(),
|
||||
@ -958,7 +959,8 @@ class SlideController(QtGui.QWidget):
|
||||
else:
|
||||
row = self.previewListWidget.currentRow() - 1
|
||||
if row == -1:
|
||||
if loopcheck == True:
|
||||
if QtCore.QSettings().value(self.parent.generalSettingsSection
|
||||
+ u'generalSettingsSection/enable slide loop', QtCore.QVariant(True).toBool):
|
||||
row = self.previewListWidget.rowCount() - 1
|
||||
else:
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user