forked from openlp/openlp
removed dead code + minor clean up
This commit is contained in:
parent
360e117918
commit
201ec584a8
@ -76,11 +76,6 @@ class EventReceiver(QtCore.QObject):
|
|||||||
``slidecontroller_{live|preview}_changed``
|
``slidecontroller_{live|preview}_changed``
|
||||||
Broadcasts that the slidecontroller has changed the current slide
|
Broadcasts that the slidecontroller has changed the current slide
|
||||||
|
|
||||||
``slidecontroller_{live|preview}_text_request``
|
|
||||||
Request the text for the current item in the controller
|
|
||||||
Returns a slidecontroller_{live|preview}_text_response with an
|
|
||||||
array of dictionaries with the tag and verse text
|
|
||||||
|
|
||||||
``slidecontroller_{live|preview}_blank``
|
``slidecontroller_{live|preview}_blank``
|
||||||
Request that the output screen is blanked
|
Request that the output screen is blanked
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.previewListWidget.horizontalHeader().setVisible(False)
|
self.previewListWidget.horizontalHeader().setVisible(False)
|
||||||
self.previewListWidget.setColumnWidth(0, self.controller.width())
|
self.previewListWidget.setColumnWidth(0, self.controller.width())
|
||||||
self.previewListWidget.isLive = self.isLive
|
self.previewListWidget.isLive = self.isLive
|
||||||
self.previewListWidget.setObjectName(u'PreviewListWidget')
|
self.previewListWidget.setObjectName(u'previewListWidget')
|
||||||
self.previewListWidget.setSelectionBehavior(
|
self.previewListWidget.setSelectionBehavior(
|
||||||
QtGui.QAbstractItemView.SelectRows)
|
QtGui.QAbstractItemView.SelectRows)
|
||||||
self.previewListWidget.setSelectionMode(
|
self.previewListWidget.setSelectionMode(
|
||||||
@ -288,14 +288,14 @@ class SlideController(QtGui.QWidget):
|
|||||||
QtGui.QSizePolicy.Label))
|
QtGui.QSizePolicy.Label))
|
||||||
self.previewFrame.setFrameShape(QtGui.QFrame.StyledPanel)
|
self.previewFrame.setFrameShape(QtGui.QFrame.StyledPanel)
|
||||||
self.previewFrame.setFrameShadow(QtGui.QFrame.Sunken)
|
self.previewFrame.setFrameShadow(QtGui.QFrame.Sunken)
|
||||||
self.previewFrame.setObjectName(u'PreviewFrame')
|
self.previewFrame.setObjectName(u'previewFrame')
|
||||||
self.grid = QtGui.QGridLayout(self.previewFrame)
|
self.grid = QtGui.QGridLayout(self.previewFrame)
|
||||||
self.grid.setMargin(8)
|
self.grid.setMargin(8)
|
||||||
self.grid.setObjectName(u'grid')
|
self.grid.setObjectName(u'grid')
|
||||||
self.slideLayout = QtGui.QVBoxLayout()
|
self.slideLayout = QtGui.QVBoxLayout()
|
||||||
self.slideLayout.setSpacing(0)
|
self.slideLayout.setSpacing(0)
|
||||||
self.slideLayout.setMargin(0)
|
self.slideLayout.setMargin(0)
|
||||||
self.slideLayout.setObjectName(u'SlideLayout')
|
self.slideLayout.setObjectName(u'slideLayout')
|
||||||
if not self.isLive:
|
if not self.isLive:
|
||||||
self.mediaObject = Phonon.MediaObject(self)
|
self.mediaObject = Phonon.MediaObject(self)
|
||||||
self.video = Phonon.VideoWidget()
|
self.video = Phonon.VideoWidget()
|
||||||
@ -319,7 +319,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.slidePreview.setFrameShadow(QtGui.QFrame.Plain)
|
self.slidePreview.setFrameShadow(QtGui.QFrame.Plain)
|
||||||
self.slidePreview.setLineWidth(1)
|
self.slidePreview.setLineWidth(1)
|
||||||
self.slidePreview.setScaledContents(True)
|
self.slidePreview.setScaledContents(True)
|
||||||
self.slidePreview.setObjectName(u'SlidePreview')
|
self.slidePreview.setObjectName(u'slidePreview')
|
||||||
self.slideLayout.insertWidget(0, self.slidePreview)
|
self.slideLayout.insertWidget(0, self.slidePreview)
|
||||||
self.grid.addLayout(self.slideLayout, 0, 0, 1, 1)
|
self.grid.addLayout(self.slideLayout, 0, 0, 1, 1)
|
||||||
# Signals
|
# Signals
|
||||||
@ -369,9 +369,6 @@ class SlideController(QtGui.QWidget):
|
|||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'slidecontroller_%s_unblank' % self.typePrefix),
|
QtCore.SIGNAL(u'slidecontroller_%s_unblank' % self.typePrefix),
|
||||||
self.onSlideUnblank)
|
self.onSlideUnblank)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
|
||||||
QtCore.SIGNAL(u'slidecontroller_%s_text_request' % self.typePrefix),
|
|
||||||
self.onTextRequest)
|
|
||||||
|
|
||||||
def setPreviewHotkeys(self, parent=None):
|
def setPreviewHotkeys(self, parent=None):
|
||||||
self.previousItem.setObjectName(u'previousItemPreview')
|
self.previousItem.setObjectName(u'previousItemPreview')
|
||||||
@ -717,26 +714,6 @@ class SlideController(QtGui.QWidget):
|
|||||||
else:
|
else:
|
||||||
self.__checkUpdateSelectedSlide(slideno)
|
self.__checkUpdateSelectedSlide(slideno)
|
||||||
|
|
||||||
def onTextRequest(self):
|
|
||||||
"""
|
|
||||||
Return the text for the current item in controller
|
|
||||||
"""
|
|
||||||
data = []
|
|
||||||
if self.serviceItem:
|
|
||||||
for framenumber, frame in enumerate(self.serviceItem.get_frames()):
|
|
||||||
dataItem = {}
|
|
||||||
if self.serviceItem.is_text():
|
|
||||||
dataItem[u'tag'] = unicode(frame[u'verseTag'])
|
|
||||||
dataItem[u'text'] = unicode(frame[u'html'])
|
|
||||||
else:
|
|
||||||
dataItem[u'tag'] = unicode(framenumber)
|
|
||||||
dataItem[u'text'] = u''
|
|
||||||
dataItem[u'selected'] = \
|
|
||||||
(self.previewListWidget.currentRow() == framenumber)
|
|
||||||
data.append(dataItem)
|
|
||||||
Receiver.send_message(u'slidecontroller_%s_text_response'
|
|
||||||
% self.typePrefix, data)
|
|
||||||
|
|
||||||
# Screen event methods
|
# Screen event methods
|
||||||
def onSlideSelectedIndex(self, message):
|
def onSlideSelectedIndex(self, message):
|
||||||
"""
|
"""
|
||||||
@ -928,7 +905,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.display.image(toDisplay)
|
self.display.image(toDisplay)
|
||||||
# reset the store used to display first image
|
# reset the store used to display first image
|
||||||
self.serviceItem.bg_image_bytes = None
|
self.serviceItem.bg_image_bytes = None
|
||||||
self.slidePreview.setPixmap(self.display.preview())
|
self.updatePreview()
|
||||||
self.selectedRow = row
|
self.selectedRow = row
|
||||||
self.__checkUpdateSelectedSlide(row)
|
self.__checkUpdateSelectedSlide(row)
|
||||||
Receiver.send_message(u'slidecontroller_%s_changed' % self.typePrefix,
|
Receiver.send_message(u'slidecontroller_%s_changed' % self.typePrefix,
|
||||||
|
Loading…
Reference in New Issue
Block a user