forked from openlp/openlp
Add audit event to slide times and trigger when added to live
This commit is contained in:
parent
942932a45e
commit
111c007526
@ -58,6 +58,7 @@ class ServiceItem(object):
|
||||
self.shortname = hostplugin.name
|
||||
self.name = self.plugin.name
|
||||
self.title = u''
|
||||
self.audit = u''
|
||||
self.items = []
|
||||
self.iconic_representation = None
|
||||
self.raw_slides = None
|
||||
@ -170,7 +171,8 @@ class ServiceItem(object):
|
||||
u'title':self.title,
|
||||
u'icon':self.icon,
|
||||
u'footer':self.raw_footer,
|
||||
u'type':self.service_item_type
|
||||
u'type':self.service_item_type,
|
||||
u'audit':self.audit
|
||||
}
|
||||
oos_data = []
|
||||
if self.service_item_type == ServiceType.Text:
|
||||
@ -203,6 +205,7 @@ class ServiceItem(object):
|
||||
self.theme = header[u'theme']
|
||||
self.addIcon(header[u'icon'])
|
||||
self.raw_footer = header[u'footer']
|
||||
self.audit = header[u'audit']
|
||||
if self.service_item_type == ServiceType.Text:
|
||||
for slide in serviceitem[u'serviceitem'][u'data']:
|
||||
self.service_frames.append(slide)
|
||||
|
@ -311,6 +311,7 @@ class SlideController(QtGui.QWidget):
|
||||
self.onSlideSelected()
|
||||
self.PreviewListWidget.setFocus()
|
||||
log.info(u'Display Rendering took %4s' % (time.time() - before))
|
||||
Receiver().send_message(u'audit_live', self.serviceitem.audit)
|
||||
log.debug(u'displayServiceManagerItems End')
|
||||
|
||||
#Screen event methods
|
||||
@ -376,22 +377,28 @@ class SlideController(QtGui.QWidget):
|
||||
|
||||
def onStartLoop(self):
|
||||
"""
|
||||
Go to the last slide.
|
||||
Start the timer loop running and store the timer id
|
||||
"""
|
||||
if self.PreviewListWidget.rowCount() > 1:
|
||||
self.timer_id = self.startTimer(int(self.DelaySpinBox.value()) * 1000)
|
||||
|
||||
def onStopLoop(self):
|
||||
"""
|
||||
Go to the last slide.
|
||||
Stop the timer loop running
|
||||
"""
|
||||
self.killTimer(self.timer_id)
|
||||
|
||||
def timerEvent(self, event):
|
||||
"""
|
||||
If the timer event is for this window select next slide
|
||||
"""
|
||||
if event.timerId() == self.timer_id:
|
||||
self.onSlideSelectedNext()
|
||||
|
||||
|
||||
def onGoLive(self):
|
||||
"""
|
||||
If preview copy slide item to live
|
||||
"""
|
||||
row = self.PreviewListWidget.currentRow()
|
||||
if row > -1 and row < self.PreviewListWidget.rowCount():
|
||||
self.parent.LiveController.addServiceManagerItem(self.commandItem, row)
|
||||
|
@ -251,12 +251,6 @@ class SongMediaItem(MediaManagerItem):
|
||||
self.parent.songmanager.delete_song(item_id)
|
||||
row = self.ListView.row(item)
|
||||
self.ListView.takeItem(row)
|
||||
#
|
||||
# def onSongPreviewClick(self):
|
||||
# service_item = ServiceItem(self.parent)
|
||||
# service_item.addIcon(u':/media/media_song.png')
|
||||
# self.generateSlideData(service_item)
|
||||
# self.parent.preview_controller.addServiceItem(service_item)
|
||||
|
||||
def generateSlideData(self, service_item):
|
||||
raw_slides =[]
|
||||
@ -293,16 +287,5 @@ class SongMediaItem(MediaManagerItem):
|
||||
raw_footer.append(song.copyright )
|
||||
raw_footer.append(unicode(translate(u'SongMediaItem', u'CCL Licence: ') + ccl ))
|
||||
service_item.raw_footer = raw_footer
|
||||
service_item.audit = u'%s,%s,%s' % (service_item.title, author_list, ccl)
|
||||
return True
|
||||
|
||||
# def onSongLiveClick(self):
|
||||
# service_item = ServiceItem(self.parent)
|
||||
# service_item.addIcon(u':/media/media_song.png')
|
||||
# self.generateSlideData(service_item)
|
||||
# self.parent.live_controller.addServiceItem(service_item)
|
||||
#
|
||||
# def onSongAddClick(self):
|
||||
# service_item = ServiceItem(self.parent)
|
||||
# service_item.addIcon( u':/media/media_song.png')
|
||||
# self.generateSlideData(service_item)
|
||||
# self.parent.service_manager.addServiceItem(service_item)
|
||||
|
Loading…
Reference in New Issue
Block a user