|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QObject
com.trolltech.qt.gui.QWidget
com.trolltech.qt.phonon.VideoWidget
public class VideoWidget
The VideoWidget
class provides a widget that is used to display video. The VideoWidget
class renders the video of a media stream on a QWidget
. It is connected to the MediaObject
, of which video stream it should render. You connect the two objects using the Phonon::createPath() function.
The widget has some possibilities to manipulate the video stream. You can change the brightness()
, hue()
, saturation()
, and contrast()
.
The widget can resize the video to fit the widget, the AspectRatio
is kept during resizing. It is also possible to go to fullScreen() mode. If you need to know the size of the video, you can call sizeHint()
after the video has been loaded (i.e., after the MediaObject
leaves the LoadingState
).
A typical example of usage follows below:
MediaObject *media = new MediaObject(parent); VideoWidget *vwidget = new VideoWidget(parent); Phonon::createPath(media, vwidget);Author: Matthias Kretz <kretz@kde.org>
Nested Class Summary | |
---|---|
static class |
VideoWidget.AspectRatio
Defines the width.height to be used for the video. |
static class |
VideoWidget.ScaleMode
The ScaleMode enum describes how to treat aspect ratio during resizing of video. |
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QWidget |
---|
QWidget.RenderFlag, QWidget.RenderFlags |
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Field Summary |
---|
Fields inherited from class com.trolltech.qt.gui.QWidget |
---|
customContextMenuRequested |
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
currentSender |
Constructor Summary | |
---|---|
VideoWidget()
Constructs a new video widget with a parent. |
|
VideoWidget(QWidget parent)
Constructs a new video widget with a parent. |
Method Summary | |
---|---|
VideoWidget.AspectRatio |
aspectRatio()
Defaults to AspectRatioAuto . |
double |
brightness()
This property holds brightness of the video. |
double |
contrast()
This property holds the contrast of the video. |
void |
enterFullScreen()
Convenience slot, calling setFullScreen(true) |
void |
exitFullScreen()
Convenience slot, calling setFullScreen(false) |
double |
hue()
This property holds the hue of the video. |
java.util.List |
inputPaths()
Returns the paths that inputs multimedia to this media node. |
boolean |
isValid()
Returns true if the backend provides an implementation of this class; otherwise returns false. |
java.util.List |
outputPaths()
Returns the paths to which this media node output media. |
double |
saturation()
This property holds saturation of the video. |
VideoWidget.ScaleMode |
scaleMode()
If the size of the widget and the size of the video are not equal. |
void |
setAspectRatio(VideoWidget.AspectRatio arg__1)
Defaults to AspectRatioAuto . |
void |
setBrightness(double value)
This property holds brightness of the video. |
void |
setContrast(double value)
This property holds the contrast of the video. |
void |
setFullScreen(boolean fullscreen)
This property holds whether the video is shown using the complete screen. |
void |
setHue(double value)
This property holds the hue of the video. |
void |
setSaturation(double value)
This property holds saturation of the video. |
void |
setScaleMode(VideoWidget.ScaleMode arg__1)
If the size of the widget and the size of the video are not equal. |
Methods inherited from class com.trolltech.qt.core.QObject |
---|
childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, indexOfProperty, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, properties, property, removeEventFilter, setObjectName, setParent, setProperty, startTimer, timerEvent, toString, userProperty |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
__qt_signalInitialization |
Methods inherited from class java.lang.Object |
---|
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public VideoWidget()
public VideoWidget(QWidget parent)
Method Detail |
---|
public final VideoWidget.AspectRatio aspectRatio()
AspectRatioAuto
. AspectRatio
.
public final double brightness()
Default is 0. Acceptable values are in range of -1, 1.
public final double contrast()
Default is 0. Acceptable values are in range of -1, 1.
public final void enterFullScreen()
public final void exitFullScreen()
public final double hue()
Default is 0. Acceptable values are in range of -1, 1.
public final java.util.List inputPaths()
outputPaths()
.
public final boolean isValid()
This does not guarantee that instances of the class works as expected, but that the backend has implemented the functionality for this class. For instance, Qt's GStreamer backend will return true for instances of the AudioOutput
class, even if there is a problem with GStreamer and it could not play sound.
public final java.util.List outputPaths()
inputPaths()
.
public final double saturation()
Default is 0. Acceptable values are in range of -1, 1.
public final VideoWidget.ScaleMode scaleMode()
public final void setAspectRatio(VideoWidget.AspectRatio arg__1)
AspectRatioAuto
. AspectRatio
.
public final void setBrightness(double value)
Default is 0. Acceptable values are in range of -1, 1.
public final void setContrast(double value)
Default is 0. Acceptable values are in range of -1, 1.
public final void setFullScreen(boolean fullscreen)
The property differs from QWidget::fullScreen
in that it is writeable.
By default the widget is not shown in fullScreen
.
Warning: When switching the video to fullscreen using setFullScreen your application loses control over the widget that actually shows the video (which is then shown as a toplevel window while your application still uses this widget). If you only need to capture key events the event forwarding done internally should suffice for your needs. If you need to map mouse coordinates or add widgets (that are not overlays) you should probably handle fullscreen yourself.
public final void setHue(double value)
Default is 0. Acceptable values are in range of -1, 1.
public final void setSaturation(double value)
Default is 0. Acceptable values are in range of -1, 1.
public final void setScaleMode(VideoWidget.ScaleMode arg__1)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |