forked from openlp/openlp
Fix up methods to do the changes
This commit is contained in:
parent
48971f90ef
commit
c1ca990a2b
@ -412,6 +412,9 @@ class SlideController(Controller):
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_live_spin_delay'),
|
||||
self.receiveSpinDelay)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_toggle_display'),
|
||||
self.toggleDisplay)
|
||||
self.toolbar.makeWidgetsInvisible(self.loopList)
|
||||
else:
|
||||
QtCore.QObject.connect(self.previewListWidget,
|
||||
@ -570,6 +573,19 @@ class SlideController(Controller):
|
||||
self.display.setVisible(False)
|
||||
self.mediaController.video_stop([self])
|
||||
|
||||
def toggleDisplay(self, action):
|
||||
"""
|
||||
Toggle the display settings triggered from remote messages.
|
||||
"""
|
||||
if action == u'blank':
|
||||
self.onBlankDisplay(not self.blankScreen.isChecked())
|
||||
elif action == u'theme':
|
||||
self.onThemeDisplay(not self.themeScreen.isChecked())
|
||||
if action == u'desktop':
|
||||
self.onHideDisplay(not self.desktopScreen.isChecked())
|
||||
|
||||
|
||||
|
||||
def servicePrevious(self):
|
||||
"""
|
||||
Live event to select the previous service item from the service manager.
|
||||
|
@ -252,6 +252,8 @@ class HttpConnection(object):
|
||||
(r'^/api/display/(hide|show)$', self.display),
|
||||
(r'^/api/alert$', self.alert),
|
||||
(r'^/api/plugin/(search)$', self.pluginInfo),
|
||||
(r'^/api/status$', self.status),
|
||||
(r'^/api/changeStatus/(blank|theme|desktop)$', self.changeStatus),
|
||||
(r'^/api/(.*)/search$', self.search),
|
||||
(r'^/api/(.*)/live$', self.go_live),
|
||||
(r'^/api/(.*)/add$', self.add_to_service)
|
||||
@ -416,6 +418,31 @@ class HttpConnection(object):
|
||||
return HttpResponse(json.dumps({u'results': {u'success': True}}),
|
||||
{u'Content-Type': u'application/json'})
|
||||
|
||||
def status(self):
|
||||
"""
|
||||
Obtain the status of system.
|
||||
|
||||
"""
|
||||
result = {
|
||||
u'blank': self.parent.plugin.liveController.blankScreen.\
|
||||
isChecked(),
|
||||
u'theme': self.parent.plugin.liveController.themeScreen.\
|
||||
isChecked(),
|
||||
u'display': self.parent.plugin.liveController.desktopScreen.\
|
||||
isChecked()
|
||||
}
|
||||
return HttpResponse(json.dumps({u'results': result}),
|
||||
{u'Content-Type': u'application/json'})
|
||||
|
||||
def changeStatus(self, action):
|
||||
"""
|
||||
Toggle the display of the system including the status button.
|
||||
|
||||
"""
|
||||
Receiver.send_message(u'slidecontroller_toggle_display', action)
|
||||
return HttpResponse(json.dumps({u'results': {u'success': True}}),
|
||||
{u'Content-Type': u'application/json'})
|
||||
|
||||
def alert(self):
|
||||
"""
|
||||
Send an alert.
|
||||
|
Loading…
Reference in New Issue
Block a user