forked from openlp/openlp
Control via web
This commit is contained in:
parent
80e9f94a52
commit
75829333c0
@ -186,6 +186,10 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
QtCore.SIGNAL(u'theme_update_list'), self.updateThemeList)
|
QtCore.SIGNAL(u'theme_update_list'), self.updateThemeList)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'servicemanager_next_item'), self.nextItem)
|
QtCore.SIGNAL(u'servicemanager_next_item'), self.nextItem)
|
||||||
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
|
QtCore.SIGNAL(u'servicemanager_previous_item'), self.previousItem)
|
||||||
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
|
QtCore.SIGNAL(u'servicemanager_list_request'), self.listRequest)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'config_updated'), self.regenerateServiceItems)
|
QtCore.SIGNAL(u'config_updated'), self.regenerateServiceItems)
|
||||||
# Last little bits of setting up
|
# Last little bits of setting up
|
||||||
@ -287,6 +291,26 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
lookFor = 1
|
lookFor = 1
|
||||||
serviceIterator += 1
|
serviceIterator += 1
|
||||||
|
|
||||||
|
def previousItem(self):
|
||||||
|
"""
|
||||||
|
Called by the SlideController to select the
|
||||||
|
previous service item
|
||||||
|
"""
|
||||||
|
if len(self.ServiceManagerList.selectedItems()) == 0:
|
||||||
|
return
|
||||||
|
selected = self.ServiceManagerList.selectedItems()[0]
|
||||||
|
prevItem = None
|
||||||
|
serviceIterator = QtGui.QTreeWidgetItemIterator(self.ServiceManagerList)
|
||||||
|
while serviceIterator.value():
|
||||||
|
if serviceIterator.value() == selected:
|
||||||
|
if prevItem:
|
||||||
|
self.ServiceManagerList.setCurrentItem(prevItem)
|
||||||
|
self.makeLive()
|
||||||
|
return
|
||||||
|
if serviceIterator.value().parent() is None:
|
||||||
|
prevItem = serviceIterator.value()
|
||||||
|
serviceIterator += 1
|
||||||
|
|
||||||
def onMoveSelectionUp(self):
|
def onMoveSelectionUp(self):
|
||||||
"""
|
"""
|
||||||
Moves the selection up the window
|
Moves the selection up the window
|
||||||
@ -817,3 +841,10 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
return item.data(0, QtCore.Qt.UserRole).toInt()[0]
|
return item.data(0, QtCore.Qt.UserRole).toInt()[0]
|
||||||
else:
|
else:
|
||||||
return parentitem.data(0, QtCore.Qt.UserRole).toInt()[0]
|
return parentitem.data(0, QtCore.Qt.UserRole).toInt()[0]
|
||||||
|
|
||||||
|
def listRequest(self, message=None):
|
||||||
|
data = []
|
||||||
|
for item in self.serviceItems:
|
||||||
|
service_item = item[u'service_item']
|
||||||
|
data.append([service_item.title])
|
||||||
|
Receiver.send_message(u'servicemanager_list_response', data)
|
||||||
|
@ -46,7 +46,7 @@ class AlertsManager(QtCore.QObject):
|
|||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'maindisplay_active'), self.generateAlert)
|
QtCore.SIGNAL(u'maindisplay_active'), self.generateAlert)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'alerts_text'), self.displayAlert)
|
QtCore.SIGNAL(u'alerts_text'), self.onAlertText)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'config_screen_changed'), self.screenChanged)
|
QtCore.SIGNAL(u'config_screen_changed'), self.screenChanged)
|
||||||
|
|
||||||
@ -70,6 +70,13 @@ class AlertsManager(QtCore.QObject):
|
|||||||
self.parent.maindisplay.setAlertSize(self.alertScreenPosition,\
|
self.parent.maindisplay.setAlertSize(self.alertScreenPosition,\
|
||||||
self.alertHeight)
|
self.alertHeight)
|
||||||
|
|
||||||
|
def onAlertText(self, message):
|
||||||
|
"""
|
||||||
|
Called via a alerts_text event. Message is single element array
|
||||||
|
containing text
|
||||||
|
"""
|
||||||
|
self.displayAlert(message[0])
|
||||||
|
|
||||||
def displayAlert(self, text=u''):
|
def displayAlert(self, text=u''):
|
||||||
"""
|
"""
|
||||||
Called from the Alert Tab to display an alert
|
Called from the Alert Tab to display an alert
|
||||||
|
Loading…
Reference in New Issue
Block a user