forked from openlp/openlp
More fixes
This commit is contained in:
parent
68685d1be5
commit
877af7ea2c
@ -68,25 +68,25 @@ class DisplayWidget(QtGui.QWidget):
|
||||
self.parent = parent
|
||||
self.hotkey_map = {
|
||||
QtCore.Qt.Key_Return: 'servicemanager_next_item',
|
||||
QtCore.Qt.Key_Space: 'slidecontroller_live_go_next_noloop',
|
||||
QtCore.Qt.Key_Enter: 'slidecontroller_live_go_next_noloop',
|
||||
QtCore.Qt.Key_Space: 'slidecontroller_live_next_noloop',
|
||||
QtCore.Qt.Key_Enter: 'slidecontroller_live_next_noloop',
|
||||
QtCore.Qt.Key_0: 'servicemanager_next_item',
|
||||
QtCore.Qt.Key_Backspace: 'slidecontroller_live_go_previous_noloop'}
|
||||
QtCore.Qt.Key_Backspace: 'slidecontroller_live_previous_noloop'}
|
||||
|
||||
def keyPressEvent(self, event):
|
||||
if type(event) == QtGui.QKeyEvent:
|
||||
#here accept the event and do something
|
||||
if event.key() == QtCore.Qt.Key_Up:
|
||||
Receiver.send_message(u'slidecontroller_go_live_previous')
|
||||
Receiver.send_message(u'slidecontroller_live_previous')
|
||||
event.accept()
|
||||
elif event.key() == QtCore.Qt.Key_Down:
|
||||
Receiver.send_message(u'slidecontroller_go_live_next')
|
||||
Receiver.send_message(u'slidecontroller_live_next')
|
||||
event.accept()
|
||||
elif event.key() == QtCore.Qt.Key_PageUp:
|
||||
Receiver.send_message(u'slidecontroller_go_live_first')
|
||||
Receiver.send_message(u'slidecontroller_live_first')
|
||||
event.accept()
|
||||
elif event.key() == QtCore.Qt.Key_PageDown:
|
||||
Receiver.send_message(u'slidecontroller_go_live_last')
|
||||
Receiver.send_message(u'slidecontroller_live_last')
|
||||
event.accept()
|
||||
elif event.key() in self.hotkey_map:
|
||||
Receiver.send_message(self.hotkey_map[event.key()])
|
||||
@ -325,13 +325,13 @@ class VideoDisplay(Phonon.VideoWidget):
|
||||
Phonon.createPath(self.mediaObject, self)
|
||||
Phonon.createPath(self.mediaObject, self.audioObject)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_media_start'), self.onMediaQueue)
|
||||
QtCore.SIGNAL(u'mediacontroller_start'), self.onMediaQueue)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_media_play'), self.onMediaPlay)
|
||||
QtCore.SIGNAL(u'mediacontroller_play'), self.onMediaPlay)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_media_pause'), self.onMediaPause)
|
||||
QtCore.SIGNAL(u'mediacontroller_pause'), self.onMediaPause)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_media_stop'), self.onMediaStop)
|
||||
QtCore.SIGNAL(u'mediacontroller_stop'), self.onMediaStop)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'config_updated'), self.setup)
|
||||
|
||||
|
@ -498,7 +498,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'config_screen_changed'), self.screenChanged)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'status_message'), self.showStatusMessage)
|
||||
QtCore.SIGNAL(u'maindisplay_status_text'), self.showStatusMessage)
|
||||
QtCore.QObject.connect(self.FileNewItem,
|
||||
QtCore.SIGNAL(u'triggered()'),
|
||||
self.ServiceManagerContents.onNewService)
|
||||
|
@ -714,9 +714,8 @@ class ServiceManager(QtGui.QWidget):
|
||||
item, count = self.findServiceItem()
|
||||
if self.serviceItems[item][u'service_item']\
|
||||
.is_capable(ItemCapabilities.AllowsEdit):
|
||||
self.remoteEditTriggered = True
|
||||
Receiver.send_message(u'%s_edit' %
|
||||
self.serviceItems[item][u'service_item'].name, u'L:%s' %
|
||||
self.serviceItems[item][u'service_item'].name.lower(), u'L:%s' %
|
||||
self.serviceItems[item][u'service_item'].editId )
|
||||
|
||||
def findServiceItem(self):
|
||||
|
@ -315,23 +315,23 @@ class SlideController(QtGui.QWidget):
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'maindisplay_stop_loop'), self.onStopLoop)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_%s_go_first' % self.type_prefix),
|
||||
QtCore.SIGNAL(u'slidecontroller_%s_first' % self.type_prefix),
|
||||
self.onSlideSelectedFirst)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_%s_go_next' % self.type_prefix),
|
||||
QtCore.SIGNAL(u'slidecontroller_%s_next' % self.type_prefix),
|
||||
self.onSlideSelectedNext)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_%s_go_previous' % self.type_prefix),
|
||||
QtCore.SIGNAL(u'slidecontroller_%s_previous' % self.type_prefix),
|
||||
self.onSlideSelectedPrevious)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_%s_go_next_noloop' % self.type_prefix),
|
||||
QtCore.SIGNAL(u'slidecontroller_%s_next_noloop' % self.type_prefix),
|
||||
self.onSlideSelectedNextNoloop)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_%s_go_previous_noloop' %
|
||||
QtCore.SIGNAL(u'slidecontroller_%s_previous_noloop' %
|
||||
self.type_prefix),
|
||||
self.onSlideSelectedPreviousNoloop)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_%s_go_last' % self.type_prefix),
|
||||
QtCore.SIGNAL(u'slidecontroller_%s_last' % self.type_prefix),
|
||||
self.onSlideSelectedLast)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_%s_change' % self.type_prefix),
|
||||
@ -608,10 +608,10 @@ class SlideController(QtGui.QWidget):
|
||||
"""
|
||||
if self.serviceItem is not None:
|
||||
if blanked:
|
||||
Receiver.send_message(u'slidecontroller_blank' %
|
||||
Receiver.send_message(u'slidecontroller_blank',
|
||||
[self.serviceItem, self.isLive])
|
||||
else:
|
||||
Receiver.send_message(u'slidecontroller_unblank' %
|
||||
Receiver.send_message(u'slidecontroller_unblank',
|
||||
[self.serviceItem, self.isLive])
|
||||
self.parent.mainDisplay.blankDisplay(blankType, blanked)
|
||||
else:
|
||||
@ -756,7 +756,7 @@ class SlideController(QtGui.QWidget):
|
||||
def onEditSong(self):
|
||||
self.songEdit = True
|
||||
Receiver.send_message(u'%s_edit' %
|
||||
self.serviceItem.name.lower(), u'L:%s' %
|
||||
self.serviceItem.name.lower(), u'P:%s' %
|
||||
self.serviceItem.editId)
|
||||
|
||||
def onGoLive(self):
|
||||
@ -773,7 +773,7 @@ class SlideController(QtGui.QWidget):
|
||||
blanked = self.blankButton.isChecked()
|
||||
else:
|
||||
blanked = False
|
||||
Receiver.send_message(u'slidecontroller_media_start',
|
||||
Receiver.send_message(u'mediacontroller_start',
|
||||
[item, self.isLive, blanked])
|
||||
if not self.isLive:
|
||||
self.mediaObject.stop()
|
||||
@ -785,13 +785,13 @@ class SlideController(QtGui.QWidget):
|
||||
self.onMediaPlay()
|
||||
|
||||
def onMediaPause(self):
|
||||
Receiver.send_message(u'slidecontroller_media_pause',
|
||||
Receiver.send_message(u'mediacontroller_pause',
|
||||
[item, self.isLive])
|
||||
if not self.isLive:
|
||||
self.mediaObject.pause()
|
||||
|
||||
def onMediaPlay(self):
|
||||
Receiver.send_message(u'slidecontroller_media_play',
|
||||
Receiver.send_message(u'mediacontroller_play',
|
||||
[item, self.isLive])
|
||||
if not self.isLive:
|
||||
self.SlidePreview.hide()
|
||||
@ -799,7 +799,7 @@ class SlideController(QtGui.QWidget):
|
||||
self.mediaObject.play()
|
||||
|
||||
def onMediaStop(self):
|
||||
Receiver.send_message(u'slidecontroller_media_stop',
|
||||
Receiver.send_message(u'mediacontroller_stop',
|
||||
[item, self.isLive])
|
||||
if not self.isLive:
|
||||
self.mediaObject.stop()
|
||||
|
@ -88,7 +88,6 @@ class alertsPlugin(Plugin):
|
||||
def onAlertsTrigger(self):
|
||||
self.alertForm.loadList()
|
||||
self.alertForm.exec_()
|
||||
Receiver.send_message(u'text_onTop')
|
||||
|
||||
def about(self):
|
||||
about_text = self.trUtf8('<b>Alerts Plugin</b><br>This plugin '
|
||||
|
@ -82,10 +82,10 @@ class AlertsManager(QtCore.QObject):
|
||||
self.screenChanged()
|
||||
self.alertList.append(text)
|
||||
if self.timer_id != 0:
|
||||
Receiver.send_message(u'status_message',
|
||||
Receiver.send_message(u'maindisplay_status_text',
|
||||
self.trUtf8(u'Alert message created and delayed'))
|
||||
return
|
||||
Receiver.send_message(u'status_message', u'')
|
||||
Receiver.send_message(u'maindisplay_status_text', u'')
|
||||
self.generateAlert()
|
||||
|
||||
def generateAlert(self):
|
||||
|
@ -75,7 +75,7 @@ class RemotesPlugin(Plugin):
|
||||
if event == u'alert':
|
||||
Receiver.send_message(u'alerts_text', unicode(datagram[pos + 1:]))
|
||||
elif event == u'next_slide':
|
||||
Receiver.send_message(u'slidecontroller_live_go_next')
|
||||
Receiver.send_message(u'slidecontroller_live_next')
|
||||
else:
|
||||
Receiver.send_message(event, unicode(datagram[pos + 1:]))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user