forked from openlp/openlp
Renamed all variables by standard.
This commit is contained in:
parent
7780751807
commit
2f34b5ddf2
@ -123,10 +123,9 @@ class ServiceItem(object):
|
||||
self.background_audio = []
|
||||
self.theme_overwritten = False
|
||||
self.temporary_edit = False
|
||||
self.AutoPlaySlidesOnce = False
|
||||
self.AutoPlaySlidesLoop = False
|
||||
self.TimedSlideInterval = 0
|
||||
|
||||
self.auto_play_slides_once = False
|
||||
self.auto_play_slides_loop = False
|
||||
self.timed_slide_interval = 0
|
||||
self._new_item()
|
||||
|
||||
def _new_item(self):
|
||||
@ -280,9 +279,9 @@ class ServiceItem(object):
|
||||
u'search': self.search_string,
|
||||
u'data': self.data_string,
|
||||
u'xml_version': self.xml_version,
|
||||
u'AutoPlaySlidesOnce': self.AutoPlaySlidesOnce,
|
||||
u'AutoPlaySlidesLoop': self.AutoPlaySlidesLoop,
|
||||
u'TimedSlideInterval': self.TimedSlideInterval,
|
||||
u'auto_play_slides_once': self.auto_play_slides_once,
|
||||
u'auto_play_slides_loop': self.auto_play_slides_loop,
|
||||
u'timed_slide_interval': self.timed_slide_interval,
|
||||
u'start_time': self.start_time,
|
||||
u'end_time': self.end_time,
|
||||
u'media_length': self.media_length,
|
||||
@ -349,9 +348,9 @@ class ServiceItem(object):
|
||||
filename = os.path.join(path, text_image[u'title'])
|
||||
self.add_from_command(
|
||||
path, text_image[u'title'], text_image[u'image'])
|
||||
self.AutoPlaySlidesOnce = header.get(u'AutoPlaySlidesOnce', False)
|
||||
self.AutoPlaySlidesLoop = header.get(u'AutoPlaySlidesLoop', False)
|
||||
self.TimedSlideInterval = header.get(u'TimedSlideInterval', 0)
|
||||
self.auto_play_slides_once = header.get(u'auto_play_slides_once', False)
|
||||
self.auto_play_slides_loop = header.get(u'auto_play_slides_loop', False)
|
||||
self.timed_slide_interval = header.get(u'timed_slide_interval', 0)
|
||||
self._new_item()
|
||||
|
||||
def get_display_title(self):
|
||||
|
@ -314,16 +314,16 @@ class ServiceManager(QtGui.QWidget):
|
||||
self.AutoPlaySlidesGroup = QtGui.QMenu(
|
||||
translate('OpenLP.ServiceManager', '&Auto play slides'))
|
||||
self.menu.addMenu(self.AutoPlaySlidesGroup)
|
||||
self.AutoPlaySlidesLoop = create_widget_action(self.AutoPlaySlidesGroup,
|
||||
self.auto_play_slides_loop = create_widget_action(self.AutoPlaySlidesGroup,
|
||||
text=translate('OpenLP.ServiceManager', 'Auto play slides &Loop'),
|
||||
checked=False,
|
||||
triggers=self.toggle_auto_play_slides_loop)
|
||||
self.AutoPlaySlidesOnce = create_widget_action(self.AutoPlaySlidesGroup,
|
||||
self.auto_play_slides_once = create_widget_action(self.AutoPlaySlidesGroup,
|
||||
text=translate('OpenLP.ServiceManager', 'Auto play slides &Once'),
|
||||
checked=False,
|
||||
triggers=self.toggle_auto_play_slides_once)
|
||||
self.AutoPlaySlidesGroup.addSeparator()
|
||||
self.TimedSlideInterval = create_widget_action(self.AutoPlaySlidesGroup,
|
||||
self.timed_slide_interval = create_widget_action(self.AutoPlaySlidesGroup,
|
||||
text=translate('OpenLP.ServiceManager', '&Delay between slides'),
|
||||
checked=False,
|
||||
triggers=self.on_timed_slide_interval)
|
||||
@ -787,24 +787,24 @@ class ServiceManager(QtGui.QWidget):
|
||||
if serviceItem[u'service_item'].is_capable(ItemCapabilities.CanLoop) and \
|
||||
len(serviceItem[u'service_item'].get_frames()) > 1:
|
||||
self.AutoPlaySlidesGroup.menuAction().setVisible(True)
|
||||
self.AutoPlaySlidesOnce\
|
||||
.setChecked(serviceItem[u'service_item'].AutoPlaySlidesOnce)
|
||||
self.AutoPlaySlidesLoop\
|
||||
.setChecked(serviceItem[u'service_item'].AutoPlaySlidesLoop)
|
||||
self.TimedSlideInterval\
|
||||
.setChecked(serviceItem[u'service_item'].TimedSlideInterval > 0)
|
||||
if serviceItem[u'service_item'].TimedSlideInterval > 0:
|
||||
self.auto_play_slides_once\
|
||||
.setChecked(serviceItem[u'service_item'].auto_play_slides_once)
|
||||
self.auto_play_slides_loop\
|
||||
.setChecked(serviceItem[u'service_item'].auto_play_slides_loop)
|
||||
self.timed_slide_interval\
|
||||
.setChecked(serviceItem[u'service_item'].timed_slide_interval > 0)
|
||||
if serviceItem[u'service_item'].timed_slide_interval > 0:
|
||||
DelaySuffix = u' '
|
||||
DelaySuffix += unicode(serviceItem[u'service_item'].TimedSlideInterval)
|
||||
DelaySuffix += unicode(serviceItem[u'service_item'].timed_slide_interval)
|
||||
DelaySuffix += u' s'
|
||||
else:
|
||||
DelaySuffix = u' ...'
|
||||
self.TimedSlideInterval.setText(translate('OpenLP.ServiceManager',
|
||||
self.timed_slide_interval.setText(translate('OpenLP.ServiceManager',
|
||||
'&Delay between slides') + DelaySuffix)
|
||||
#self.AutoPlaySlidesGroup.setChecked(
|
||||
# serviceItem[u'service_item'].TimedSlideInterval > 0 and
|
||||
# (serviceItem[u'service_item'].AutoPlaySlidesOnce or
|
||||
# serviceItem[u'service_item'].AutoPlaySlidesLoop))
|
||||
# serviceItem[u'service_item'].timed_slide_interval > 0 and
|
||||
# (serviceItem[u'service_item'].auto_play_slides_once or
|
||||
# serviceItem[u'service_item'].auto_play_slides_loop))
|
||||
else:
|
||||
self.AutoPlaySlidesGroup.menuAction().setVisible(False)
|
||||
if serviceItem[u'service_item']\
|
||||
@ -851,12 +851,12 @@ class ServiceManager(QtGui.QWidget):
|
||||
"""
|
||||
item = self.findServiceItem()[0]
|
||||
service_item = self.serviceItems[item][u'service_item']
|
||||
service_item.AutoPlaySlidesOnce = not service_item.AutoPlaySlidesOnce
|
||||
if service_item.AutoPlaySlidesOnce:
|
||||
service_item.AutoPlaySlidesLoop = False
|
||||
self.AutoPlaySlidesLoop.setChecked(False)
|
||||
if service_item.AutoPlaySlidesOnce and service_item.TimedSlideInterval == 0:
|
||||
service_item.TimedSlideInterval = Settings().value(u'loop delay',
|
||||
service_item.auto_play_slides_once = not service_item.auto_play_slides_once
|
||||
if service_item.auto_play_slides_once:
|
||||
service_item.auto_play_slides_loop = False
|
||||
self.auto_play_slides_loop.setChecked(False)
|
||||
if service_item.auto_play_slides_once and service_item.timed_slide_interval == 0:
|
||||
service_item.timed_slide_interval = Settings().value(u'loop delay',
|
||||
QtCore.QVariant(5)).toInt()[0]
|
||||
self.setModified()
|
||||
|
||||
@ -866,12 +866,12 @@ class ServiceManager(QtGui.QWidget):
|
||||
"""
|
||||
item = self.findServiceItem()[0]
|
||||
service_item = self.serviceItems[item][u'service_item']
|
||||
service_item.AutoPlaySlidesLoop = not service_item.AutoPlaySlidesLoop
|
||||
if service_item.AutoPlaySlidesLoop:
|
||||
service_item.AutoPlaySlidesOnce = False
|
||||
self.AutoPlaySlidesOnce.setChecked(False)
|
||||
if service_item.AutoPlaySlidesLoop and service_item.TimedSlideInterval == 0:
|
||||
service_item.TimedSlideInterval = Settings().value(u'loop delay',
|
||||
service_item.auto_play_slides_loop = not service_item.auto_play_slides_loop
|
||||
if service_item.auto_play_slides_loop:
|
||||
service_item.auto_play_slides_once = False
|
||||
self.auto_play_slides_once.setChecked(False)
|
||||
if service_item.auto_play_slides_loop and service_item.timed_slide_interval == 0:
|
||||
service_item.timed_slide_interval = Settings().value(u'loop delay',
|
||||
QtCore.QVariant(5)).toInt()[0]
|
||||
self.setModified()
|
||||
|
||||
@ -882,24 +882,24 @@ class ServiceManager(QtGui.QWidget):
|
||||
"""
|
||||
item = self.findServiceItem()[0]
|
||||
service_item = self.serviceItems[item][u'service_item']
|
||||
if service_item.TimedSlideInterval == 0:
|
||||
TimedSlideInterval = Settings().value(u'loop delay',
|
||||
if service_item.timed_slide_interval == 0:
|
||||
timed_slide_interval = Settings().value(u'loop delay',
|
||||
QtCore.QVariant(5)).toInt()[0]
|
||||
else:
|
||||
TimedSlideInterval = service_item.TimedSlideInterval
|
||||
TimedSlideInterval, ok = QtGui.QInputDialog.getInteger(self,
|
||||
timed_slide_interval = service_item.timed_slide_interval
|
||||
timed_slide_interval, ok = QtGui.QInputDialog.getInteger(self,
|
||||
translate('OpenLP.ServiceManager', 'Input delay'),
|
||||
translate('OpenLP.ServiceManager',
|
||||
'Delay between slides in seconds.'), TimedSlideInterval, 0, 180, 1)
|
||||
'Delay between slides in seconds.'), timed_slide_interval, 0, 180, 1)
|
||||
if ok:
|
||||
service_item.TimedSlideInterval = TimedSlideInterval
|
||||
if service_item.TimedSlideInterval <> 0\
|
||||
and not service_item.AutoPlaySlidesLoop\
|
||||
and not service_item.AutoPlaySlidesOnce:
|
||||
service_item.AutoPlaySlidesLoop = True
|
||||
elif service_item.TimedSlideInterval == 0:
|
||||
service_item.AutoPlaySlidesLoop = False
|
||||
service_item.AutoPlaySlidesOnce = False
|
||||
service_item.timed_slide_interval = timed_slide_interval
|
||||
if service_item.timed_slide_interval <> 0\
|
||||
and not service_item.auto_play_slides_loop\
|
||||
and not service_item.auto_play_slides_once:
|
||||
service_item.auto_play_slides_loop = True
|
||||
elif service_item.timed_slide_interval == 0:
|
||||
service_item.auto_play_slides_loop = False
|
||||
service_item.auto_play_slides_once = False
|
||||
self.setModified()
|
||||
|
||||
def onServiceItemEditForm(self):
|
||||
@ -1405,8 +1405,8 @@ class ServiceManager(QtGui.QWidget):
|
||||
ItemCapabilities.CanPreview):
|
||||
self.mainwindow.previewController.addServiceManagerItem(
|
||||
self.serviceItems[item][u'service_item'], 0)
|
||||
NextItem = self.serviceManagerList.topLevelItem(item)
|
||||
self.serviceManagerList.setCurrentItem(NextItem)
|
||||
next_item = self.serviceManagerList.topLevelItem(item)
|
||||
self.serviceManagerList.setCurrentItem(next_item)
|
||||
self.mainwindow.liveController.previewListWidget.setFocus()
|
||||
else:
|
||||
critical_error_message_box(
|
||||
|
@ -778,15 +778,15 @@ class SlideController(Controller):
|
||||
self.slideSelected()
|
||||
else:
|
||||
self._processItem(item, slidenum)
|
||||
if self.isLive and item.AutoPlaySlidesLoop\
|
||||
and item.TimedSlideInterval > 0:
|
||||
self.playSlidesLoop.setChecked(item.AutoPlaySlidesLoop)
|
||||
self.delaySpinBox.setValue(int(item.TimedSlideInterval))
|
||||
if self.isLive and item.auto_play_slides_loop\
|
||||
and item.timed_slide_interval > 0:
|
||||
self.playSlidesLoop.setChecked(item.auto_play_slides_loop)
|
||||
self.delaySpinBox.setValue(int(item.timed_slide_interval))
|
||||
self.onPlaySlidesLoop()
|
||||
elif self.isLive and item.AutoPlaySlidesOnce\
|
||||
and item.TimedSlideInterval > 0:
|
||||
self.playSlidesOnce.setChecked(item.AutoPlaySlidesOnce)
|
||||
self.delaySpinBox.setValue(int(item.TimedSlideInterval))
|
||||
elif self.isLive and item.auto_play_slides_once\
|
||||
and item.timed_slide_interval > 0:
|
||||
self.playSlidesOnce.setChecked(item.auto_play_slides_once)
|
||||
self.delaySpinBox.setValue(int(item.timed_slide_interval))
|
||||
self.onPlaySlidesOnce()
|
||||
|
||||
def _processItem(self, serviceItem, slideno):
|
||||
|
Loading…
Reference in New Issue
Block a user