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) |
bool | controlsVisible (self) |
long | currentTime (self) |
| hoverEnterEvent (self, QGraphicsSceneHoverEvent event) |
| hoverLeaveEvent (self, QGraphicsSceneHoverEvent event) |
| hoverMoveEvent (self, QGraphicsSceneHoverEvent event) |
| pause (self) |
| play (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) |
long | totalTime (self) |
QString | url (self) |
Plasma.VideoWidget.Controls | usedControls (self) |
Signal Documentation
Emitted an instant before the playback is finished
- Signal syntax:
QObject.connect(source, SIGNAL("aboutToFinish()"), target_slot)
The user pressed the "next" button
- Since:
- 4.3
- Signal syntax:
QObject.connect(source, SIGNAL("nextRequested()"), target_slot)
The user pressed the "previous" button
- Since:
- 4.3
- Signal syntax:
QObject.connect(source, SIGNAL("previousRequested()"), target_slot)
Emitted regularly when the playing is progressing
- Parameters:
-
- Signal syntax:
QObject.connect(source, SIGNAL("tick(qint64)"), target_slot)
Method Documentation
__init__ |
( |
self, |
|
|
|
QGraphicsWidget |
parent=0 |
|
) |
|
|
|
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
hoverEnterEvent |
( |
self, |
|
|
|
QGraphicsSceneHoverEvent |
event |
|
) |
|
|
|
hoverLeaveEvent |
( |
self, |
|
|
|
QGraphicsSceneHoverEvent |
event |
|
) |
|
|
|
hoverMoveEvent |
( |
self, |
|
|
|
QGraphicsSceneHoverEvent |
event |
|
) |
|
|
|
long remainingTime |
( |
|
self ) |
|
- Returns:
- the time remaining to the current media file
resizeEvent |
( |
self, |
|
|
|
QGraphicsSceneResizeEvent |
event |
|
) |
|
|
|
Jump at a given millisecond in the current file
- Parameters:
-
| time | where we want to jump
|
setControlsVisible |
( |
self, |
|
|
|
bool |
visible |
|
) |
|
|
|
Show/hide the main controls widget, if any of them is used
- Parameters:
-
| 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
- Parameters:
-
setUrl |
( |
self, |
|
|
|
QString |
url |
|
) |
|
|
|
Load a certain url that can be a local file or a remote one
- Parameters:
-
Set what control widgets to use
- Parameters:
-
| controls | bitwise OR combination of Controls flags
|
- See also:
- Controls
QString styleSheet |
( |
|
self ) |
|
- Returns:
- the stylesheet currently used with this widget
- Returns:
- the total playing time of the current media file
- Returns:
- the url (local or remote) we are playing
- 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 | |