Media Players help text

This commit is contained in:
Tim Bentley 2012-10-15 18:35:14 +01:00
parent a5824120c3
commit 8fb1ede03f
5 changed files with 38 additions and 4 deletions

View File

@ -30,8 +30,8 @@ from openlp.core.ui.media import MediaState
class MediaPlayer(object):
"""
This is the base class media Player class to provide OpenLP with a pluggable media display
framework.
This is the base class media Player class to provide OpenLP with a
pluggable media display framework.
"""
def __init__(self, parent, name=u'media_player'):
@ -136,3 +136,9 @@ class MediaPlayer(object):
Add html code to htmlbuilder
"""
return u''
def get_info(self):
"""
Returns Information about the player
"""
return u''

View File

@ -33,7 +33,7 @@ from datetime import datetime
from PyQt4 import QtCore, QtGui
from PyQt4.phonon import Phonon
from openlp.core.lib import Receiver
from openlp.core.lib import Receiver, translate
from openlp.core.lib.settings import Settings
from openlp.core.ui.media import MediaState
@ -230,3 +230,12 @@ class PhononPlayer(MediaPlayer):
background = unicode(QtGui.QColor(Settings().value(
u'players/background color', QtCore.QVariant(u'#000000'))).name())
return VIDEO_CSS % (background,background,background)
def get_info(self):
return(translate('Media.player', 'Phonon is a media player which '
'interacts with the operating system to provide media capabilities'
'.') +
u'<br/> <strong>' + translate('Media.player', 'Audio') +
u'</strong><br/>' + unicode(self.audio_extensions_list) +
u'<br/><strong>' + translate('Media.player', 'Video') +
u'</strong><br/>' + unicode(self.video_extensions_list) + u'<br/>')

View File

@ -32,6 +32,7 @@ from openlp.core.lib import SettingsTab, translate, Receiver
from openlp.core.lib.ui import UiStrings, create_button
from openlp.core.lib.settings import Settings
from openlp.core.ui.media import get_media_players, set_media_players
class MediaQCheckBox(QtGui.QCheckBox):
"""
MediaQCheckBox adds an extra property, playerName to the QCheckBox class.
@ -229,6 +230,7 @@ class PlayerTab(SettingsTab):
checkbox = MediaQCheckBox(self.mediaPlayerGroupBox)
checkbox.setEnabled(player.available)
checkbox.setObjectName(player.name + u'CheckBox')
checkbox.setToolTip(player.get_info())
self.playerCheckBoxes[player.name] = checkbox
QtCore.QObject.connect(checkbox,QtCore.SIGNAL(u'stateChanged(int)'),
self.onPlayerCheckBoxChanged)

View File

@ -34,7 +34,7 @@ import sys
from PyQt4 import QtCore, QtGui
from openlp.core.lib import Receiver
from openlp.core.lib import Receiver, translate
from openlp.core.lib.settings import Settings
from openlp.core.ui.media import MediaState
from openlp.core.ui.media.mediaplayer import MediaPlayer
@ -231,3 +231,10 @@ class VlcPlayer(MediaPlayer):
controller.seekSlider.setSliderPosition( \
display.vlcMediaPlayer.get_time())
def get_info(self):
return(translate('Media.player', 'VLC is an external player which '
'supports a number of different formats.') +
u'<br/> <strong>' + translate('Media.player', 'Audio') +
u'</strong><br/>' + unicode(AUDIO_EXT) + u'<br/><strong>' +
translate('Media.player', 'Video') + u'</strong><br/>' +
unicode(VIDEO_EXT) + u'<br/>')

View File

@ -30,6 +30,7 @@ from PyQt4 import QtCore, QtGui
import logging
from openlp.core.lib import translate
from openlp.core.ui.media import MediaState
from openlp.core.ui.media.mediaplayer import MediaPlayer
from openlp.core.lib.settings import Settings
@ -438,3 +439,12 @@ class WebkitPlayer(MediaPlayer):
controller.seekSlider.setMaximum(length)
if not controller.seekSlider.isSliderDown():
controller.seekSlider.setSliderPosition(currentTime)
def get_info(self):
return(translate('Media.player', 'Webkit is a media player which runs '
'inside a web browser. This player allows text over video to be '
'rendered.') +
u'<br/> <strong>' + translate('Media.player', 'Audio') +
u'</strong><br/>' + unicode(AUDIO_EXT) + u'<br/><strong>' +
translate('Media.player', 'Video') + u'</strong><br/>' +
unicode(VIDEO_EXT) + u'<br/>')