forked from openlp/openlp
First stab at showing ppt output in mini-live-display
This commit is contained in:
parent
b8810abd4b
commit
ee076e306e
@ -353,6 +353,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
if self.commandItem is not None and \
|
if self.commandItem is not None and \
|
||||||
self.commandItem.service_item_type == ServiceType.Command:
|
self.commandItem.service_item_type == ServiceType.Command:
|
||||||
Receiver().send_message(u'%s_first'% self.commandItem.name.lower())
|
Receiver().send_message(u'%s_first'% self.commandItem.name.lower())
|
||||||
|
QtCore.QTimer.singleShot(0.5, self.grabMainDisplay)
|
||||||
else:
|
else:
|
||||||
self.PreviewListWidget.selectRow(0)
|
self.PreviewListWidget.selectRow(0)
|
||||||
self.onSlideSelected()
|
self.onSlideSelected()
|
||||||
@ -379,6 +380,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
if row > -1 and row < self.PreviewListWidget.rowCount():
|
if row > -1 and row < self.PreviewListWidget.rowCount():
|
||||||
if self.commandItem.service_item_type == ServiceType.Command:
|
if self.commandItem.service_item_type == ServiceType.Command:
|
||||||
Receiver().send_message(u'%s_slide'% self.commandItem.name.lower(), [row])
|
Receiver().send_message(u'%s_slide'% self.commandItem.name.lower(), [row])
|
||||||
|
QtCore.QTimer.singleShot(0.5, self.grabMainDisplay)
|
||||||
else:
|
else:
|
||||||
#label = self.PreviewListWidget.cellWidget(row, 0)
|
#label = self.PreviewListWidget.cellWidget(row, 0)
|
||||||
frame = self.serviceitem.frames[row][u'image']
|
frame = self.serviceitem.frames[row][u'image']
|
||||||
@ -390,6 +392,13 @@ class SlideController(QtGui.QWidget):
|
|||||||
if self.isLive:
|
if self.isLive:
|
||||||
self.parent.mainDisplay.frameView(frame)
|
self.parent.mainDisplay.frameView(frame)
|
||||||
|
|
||||||
|
def grabMainDisplay(self):
|
||||||
|
winid = QtGui.QApplication.desktop().winId()
|
||||||
|
rm = self.parent.RenderManager
|
||||||
|
rect = rm.screen_list[rm.current_display][u'size']
|
||||||
|
winimg = QtGui.QPixmap.grabWindow(winid, rect.x(), rect.y(), rect.width(), rect.height())
|
||||||
|
self.SlidePreview.setPixmap(winimg)
|
||||||
|
|
||||||
def onSlideSelectedNext(self):
|
def onSlideSelectedNext(self):
|
||||||
"""
|
"""
|
||||||
Go to the next slide.
|
Go to the next slide.
|
||||||
@ -397,6 +406,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
if self.commandItem is not None and \
|
if self.commandItem is not None and \
|
||||||
self.commandItem.service_item_type == ServiceType.Command:
|
self.commandItem.service_item_type == ServiceType.Command:
|
||||||
Receiver().send_message(u'%s_next'% self.commandItem.name.lower())
|
Receiver().send_message(u'%s_next'% self.commandItem.name.lower())
|
||||||
|
QtCore.QTimer.singleShot(0.5, self.grabMainDisplay)
|
||||||
else:
|
else:
|
||||||
row = self.PreviewListWidget.currentRow() + 1
|
row = self.PreviewListWidget.currentRow() + 1
|
||||||
if row == self.PreviewListWidget.rowCount():
|
if row == self.PreviewListWidget.rowCount():
|
||||||
@ -412,6 +422,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.commandItem.service_item_type == ServiceType.Command:
|
self.commandItem.service_item_type == ServiceType.Command:
|
||||||
Receiver().send_message(
|
Receiver().send_message(
|
||||||
u'%s_previous'% self.commandItem.name.lower())
|
u'%s_previous'% self.commandItem.name.lower())
|
||||||
|
QtCore.QTimer.singleShot(0.5, self.grabMainDisplay)
|
||||||
else:
|
else:
|
||||||
row = self.PreviewListWidget.currentRow() - 1
|
row = self.PreviewListWidget.currentRow() - 1
|
||||||
if row == -1:
|
if row == -1:
|
||||||
@ -426,6 +437,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
if self.commandItem is not None and \
|
if self.commandItem is not None and \
|
||||||
self.commandItem.service_item_type == ServiceType.Command:
|
self.commandItem.service_item_type == ServiceType.Command:
|
||||||
Receiver().send_message(u'%s_last'% self.commandItem.name.lower())
|
Receiver().send_message(u'%s_last'% self.commandItem.name.lower())
|
||||||
|
QtCore.QTimer.singleShot(0.5, self.grabMainDisplay)
|
||||||
else:
|
else:
|
||||||
self.PreviewListWidget.selectRow(self.PreviewListWidget.rowCount() - 1)
|
self.PreviewListWidget.selectRow(self.PreviewListWidget.rowCount() - 1)
|
||||||
self.onSlideSelected()
|
self.onSlideSelected()
|
||||||
|
Loading…
Reference in New Issue
Block a user