Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.phonon
Class VideoWidget

    java.lang.Object
      com.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

All Implemented Interfaces:
  QPaintDeviceInterface, QtJambiInterface

    public class VideoWidget

extends QWidget

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.gui.QWidget
`acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, changeEvent, childAt, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, closeEvent, contentsRect, contextMenuEvent, contextMenuPolicy, cursor, depth, destroy, destroy, destroy, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, ensurePolished, enterEvent, focusInEvent, focusNextChild, focusNextPrevChild, focusOutEvent, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grabKeyboard, grabMouse, grabMouse, grabShortcut, grabShortcut, hasFocus, hasMouseTracking, height, heightForWidth, heightMM, hide, hideEvent, inputContext, inputMethodEvent, inputMethodQuery, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isFullScreen, isHidden, isMaximized, isMinimized, isModal, isVisible, isVisibleTo, isWindow, isWindowModified, keyboardGrabber, keyPressEvent, keyReleaseEvent, languageChange, layout, layoutDirection, leaveEvent, locale, logicalDpiX, logicalDpiY, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumSizeHint, minimumWidth, mouseDoubleClickEvent, mouseGrabber, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, move, move, moveEvent, nativeParentWidget, nextInFocusChain, normalGeometry, numColors, overrideWindowFlags, overrideWindowFlags, paintEngine, paintEvent, paintingActive, palette, parentWidget, physicalDpiX, physicalDpiY, pos, raise, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, render, render, render, render, render, render, render, render, repaint, repaint, repaint, repaint, resetInputContext, resize, resize, resizeEvent, restoreGeometry, saveGeometry, scroll, scroll, setAcceptDrops, setAccessibleDescription, setAccessibleName, setAttribute, setAttribute, setAutoFillBackground, setBackgroundRole, setBaseSize, setBaseSize, setContentsMargins, setContentsMargins, setContextMenuPolicy, setCursor, setDisabled, setEnabled, setFixedHeight, setFixedSize, setFixedSize, setFixedWidth, setFocus, setFocus, setFocusPolicy, setFocusProxy, setFont, setForegroundRole, setGeometry, setGeometry, setHidden, setInputContext, setLayout, setLayoutDirection, setLocale, setMask, setMask, setMaximumHeight, setMaximumSize, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setParent, setParent, setShortcutAutoRepeat, setShortcutAutoRepeat, setShortcutEnabled, setShortcutEnabled, setSizeIncrement, setSizeIncrement, setSizePolicy, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabOrder, setToolTip, setUpdatesEnabled, setVisible, setWhatsThis, setWindowFilePath, setWindowFlags, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowState, setWindowTitle, show, showEvent, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeHint, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, underMouse, unsetCursor, unsetLayoutDirection, unsetLocale, update, update, update, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, wheelEvent, width, widthMM, window, windowFilePath, windowFlags, windowIcon, windowIconText, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowType, winId, x, y`

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

### VideoWidget

    public VideoWidget()

  Constructs a new video widget with a `parent`.

### VideoWidget

    public VideoWidget(QWidget parent)

  Constructs a new video widget with a `parent`.

Method Detail

### aspectRatio

    public final VideoWidget.AspectRatio aspectRatio()

  Defaults to `AspectRatioAuto` .

See also:
  `AspectRatio` .

### brightness

    public final double brightness()

  This property holds brightness of the video.

  Default is 0. Acceptable values are in range of -1, 1.

### contrast

    public final double contrast()

  This property holds the contrast of the video.

  Default is 0. Acceptable values are in range of -1, 1.

### enterFullScreen

    public final void enterFullScreen()

  Convenience slot, calling setFullScreen(true)

### exitFullScreen

    public final void exitFullScreen()

  Convenience slot, calling setFullScreen(false)

### hue

    public final double hue()

  This property holds the hue of the video.

  Default is 0. Acceptable values are in range of -1, 1.

### inputPaths

    public final java.util.List inputPaths()

  Returns the paths that inputs multimedia to this media node.

See also:
  `outputPaths()`.

### isValid

    public final boolean isValid()

  Returns true if the backend provides an implementation of this class; otherwise returns false.

  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.

### outputPaths

    public final java.util.List outputPaths()

  Returns the paths to which this media node output media.

See also:
  `inputPaths()`.

### saturation

    public final double saturation()

  This property holds saturation of the video.

  Default is 0. Acceptable values are in range of -1, 1.

### scaleMode

    public final VideoWidget.ScaleMode scaleMode()

  If the size of the widget and the size of the video are not equal. The video will be zoomed to fit the widget. The smaller zoom (AddBarsScaleMode) adds black bars at the left/right or top/bottom to make all of the image visible (default). The bigger zoom (ExpandMode) fills the widget completely, keeping all information in one direction and leaving parts of the image outside of the widget in the other direction.

### setAspectRatio

    public final void setAspectRatio(VideoWidget.AspectRatio arg__1)

  Defaults to `AspectRatioAuto` .

See also:
  `AspectRatio` .

### setBrightness

    public final void setBrightness(double value)

  This property holds brightness of the video.

  Default is 0. Acceptable values are in range of -1, 1.

### setContrast

    public final void setContrast(double value)

  This property holds the contrast of the video.

  Default is 0. Acceptable values are in range of -1, 1.

### setFullScreen

    public final void setFullScreen(boolean fullscreen)

  This property holds whether the video is shown using the complete screen.

  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.

### setHue

    public final void setHue(double value)

  This property holds the hue of the video.

  Default is 0. Acceptable values are in range of -1, 1.

### setSaturation

    public final void setSaturation(double value)

  This property holds saturation of the video.

  Default is 0. Acceptable values are in range of -1, 1.

### setScaleMode

    public final void setScaleMode(VideoWidget.ScaleMode arg__1)

  If the size of the widget and the size of the video are not equal. The video will be zoomed to fit the widget. The smaller zoom (AddBarsScaleMode) adds black bars at the left/right or top/bottom to make all of the image visible (default). The bigger zoom (ExpandMode) fills the widget completely, keeping all information in one direction and leaving parts of the image outside of the widget in the other direction.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD