VideoWidget Class Reference
from PyKDE4.plasma import *
Inherits: QGraphicsProxyWidget → QGraphicsWidget → QObject
Namespace: Plasma
Detailed Description
VideoWidget plasma/widgets/videowidget.h <Plasma/Widgets/VideoWidget>
a Video playing widget via Phonon, it encloses the
Phonon.MediaObject and Phonon.AudioOutput too
Provides a video player widget
- Since:
- KDE4.3
Enumerations |
Control | { NoControls, Play, Pause, Stop, PlayPause, Previous, Next, Progress, Volume, OpenFile, DefaultControls } |
Signals |
| aboutToFinish () |
| nextRequested () |
| previousRequested () |
| tick (long time) |
Methods |
| __init__ (self, QGraphicsWidget parent=0) |
| aboutToFinish (self) |
Phonon.AudioOutput | audioOutput (self) |
bool | controlsVisible (self) |
long | currentTime (self) |
| hoverEnterEvent (self, QGraphicsSceneHoverEvent event) |
| hoverLeaveEvent (self, QGraphicsSceneHoverEvent event) |
| hoverMoveEvent (self, QGraphicsSceneHoverEvent event) |
Phonon.MediaObject | mediaObject (self) |
Phonon.VideoWidget | nativeWidget (self) |
| nextRequested (self) |
| pause (self) |
| play (self) |
| previousRequested (self) |
long | remainingTime (self) |
| resizeEvent (self, QGraphicsSceneResizeEvent event) |
| seek (self, long time) |
| setControlsVisible (self, bool visible) |
| setStyleSheet (self, QString stylesheet) |
| setUrl (self, QString url) |
| setUsedControls (self, Plasma.VideoWidget.Controls controls) |
| stop (self) |
QString | styleSheet (self) |
| tick (self, long time) |
long | totalTime (self) |
QString | url (self) |
Plasma.VideoWidget.Controls | usedControls (self) |
Method Documentation
Emitted an instant before the playback is finished
- Signal syntax:
QObject.connect(source, SIGNAL("aboutToFinish()"), target_slot)
Phonon.AudioOutput audioOutput |
( |
|
self ) |
|
- Returns:
- the Phonon.AudioOutput being used
- See also:
- Phonon.AudioOutput
bool controlsVisible |
( |
|
self ) |
|
- Returns:
- true if the controls widget is being shown right now
long currentTime |
( |
|
self ) |
|
- Returns:
- the current time of the current media file
Phonon.MediaObject mediaObject |
( |
|
self ) |
|
- Returns:
- the Phonon.MediaObject being used
- See also:
- Phonon.MediaObject
Phonon.VideoWidget nativeWidget |
( |
|
self ) |
|
- Returns:
- the native widget wrapped by this VideoWidget
The user pressed the "next" button
- Since:
- 4.3
- Signal syntax:
QObject.connect(source, SIGNAL("nextRequested()"), target_slot)
previousRequested |
( |
|
self ) |
|
The user pressed the "previous" button
- Since:
- 4.3
- Signal syntax:
QObject.connect(source, SIGNAL("previousRequested()"), target_slot)
long remainingTime |
( |
|
self ) |
|
- Returns:
- the time remaining to the current media file
Jump at a given millisecond in the current file
@arg time where we want to jump
setControlsVisible |
( |
self, |
|
|
|
bool |
visible |
|
) |
|
|
|
Show/hide the main controls widget, if any of them is used
@arg visible if we want to show or hide the main controls
- See also:
- setUsedControls()
setStyleSheet |
( |
self, |
|
|
|
QString |
stylesheet |
|
) |
|
|
|
Sets the stylesheet used to control the visual display of this VideoWidget
@arg stylesheet a CSS string
Load a certain url that can be a local file or a remote one
@arg path resource to play
setUsedControls |
( |
self, |
|
|
|
Plasma.VideoWidget.Controls |
controls |
|
) |
|
|
|
Set what control widgets to use
@arg controls bitwise OR combination of Controls flags
- See also:
- Controls
- Returns:
- the stylesheet currently used with this widget
Emitted regularly when the playing is progressing
@arg time where we are
- Signal syntax:
QObject.connect(source, SIGNAL("tick(qint64)"), target_slot)
- Returns:
- the total playing time of the current media file
- Returns:
- the url (local or remote) we are playing
Plasma.VideoWidget.Controls usedControls |
( |
|
self ) |
|
- Returns:
- the video controls that are used and shown
- See also:
- Controls
Enumeration Documentation
- Enumerator:
-
NoControls = 0 | |
Play = 1 | |
Pause = 2 | |
Stop = 4 | |
PlayPause = 8 | |
Previous = 16 | |
Next = 32 | |
Progress = 64 | |
Volume = 128 | |
OpenFile = 128 | |
DefaultControls = PlayPause|Progress|Volume|OpenFile | |