forked from openlp/openlp
add preview to live
This commit is contained in:
parent
1a0a828ad3
commit
0d1bbe3417
@ -236,6 +236,9 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
|
|||||||
self.hide_menu.setPopupMode(QtWidgets.QToolButton.MenuButtonPopup)
|
self.hide_menu.setPopupMode(QtWidgets.QToolButton.MenuButtonPopup)
|
||||||
self.hide_menu.setMenu(QtWidgets.QMenu(translate('OpenLP.SlideController', 'Hide'), self.toolbar))
|
self.hide_menu.setMenu(QtWidgets.QMenu(translate('OpenLP.SlideController', 'Hide'), self.toolbar))
|
||||||
self.toolbar.add_toolbar_widget(self.hide_menu)
|
self.toolbar.add_toolbar_widget(self.hide_menu)
|
||||||
|
self.toolbar.add_toolbar_action('goPreview', icon=':/general/general_live.png',
|
||||||
|
tooltip=translate('OpenLP.SlideController', 'Move to preview.'),
|
||||||
|
triggers=self.on_go_preview)
|
||||||
# The order of the blank to modes in Shortcuts list comes from here.
|
# The order of the blank to modes in Shortcuts list comes from here.
|
||||||
self.desktop_screen_enable = create_action(self, 'desktopScreenEnable',
|
self.desktop_screen_enable = create_action(self, 'desktopScreenEnable',
|
||||||
text=translate('OpenLP.SlideController', 'Show Desktop'),
|
text=translate('OpenLP.SlideController', 'Show Desktop'),
|
||||||
@ -1420,6 +1423,18 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
|
|||||||
self.live_controller.add_service_manager_item(self.service_item, row)
|
self.live_controller.add_service_manager_item(self.service_item, row)
|
||||||
self.live_controller.preview_widget.setFocus()
|
self.live_controller.preview_widget.setFocus()
|
||||||
|
|
||||||
|
def on_go_preview(self, field=None):
|
||||||
|
"""
|
||||||
|
If live copy slide item to preview controller from live Controller
|
||||||
|
"""
|
||||||
|
row = self.preview_widget.current_slide_number()
|
||||||
|
if -1 < row < self.preview_widget.slide_count():
|
||||||
|
if self.service_item.from_service:
|
||||||
|
self.service_manager.preview_live(self.service_item.unique_identifier, row)
|
||||||
|
else:
|
||||||
|
self.preview_controller.add_service_manager_item(self.service_item, row)
|
||||||
|
self.preview_controller.preview_widget.setFocus()
|
||||||
|
|
||||||
def on_media_start(self, item):
|
def on_media_start(self, item):
|
||||||
"""
|
"""
|
||||||
Respond to the arrival of a media service item
|
Respond to the arrival of a media service item
|
||||||
|
Loading…
Reference in New Issue
Block a user