Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QVideoWidget Class

The QVideoWidget class provides a widget which presents video produced by a media object. More...

 #include <QVideoWidget>

Inherits: QWidget and QMediaBindableInterface.

Inherited by: QCameraViewfinder.

Public Types

enum PaintDeviceMetric { PdmWidth, PdmHeight, PdmWidthMM, PdmHeightMM, ..., PdmPhysicalDpiY }

Properties

  • 58 properties inherited from QWidget
  • 1 property inherited from QObject

Public Functions

QVideoWidget(QWidget * parent = 0)
virtual ~QMediaBindableInterface()
virtual ~QPaintDevice()
~QVideoWidget()
Qt::AspectRatioMode aspectRatioMode() const
int brightness() const
int colorCount() const
int contrast() const
int depth() const
int height() const
int heightMM() const
int hue() const
bool isFullScreen() const
int logicalDpiX() const
int logicalDpiY() const
virtual QMediaObject * mediaObject() const = 0
virtual QPaintEngine * paintEngine() const = 0
bool paintingActive() const
int physicalDpiX() const
int physicalDpiY() const
int saturation() const
int width() const
int widthMM() const

Reimplemented Public Functions

virtual QMediaObject * mediaObject() const
virtual QSize sizeHint() const
  • 215 public functions inherited from QWidget
  • 31 public functions inherited from QObject

Public Slots

void setAspectRatioMode(Qt::AspectRatioMode mode)
void setBrightness(int brightness)
void setContrast(int contrast)
void setFullScreen(bool fullScreen)
void setHue(int hue)
void setSaturation(int saturation)
  • 19 public slots inherited from QWidget
  • 1 public slot inherited from QObject

Signals

void brightnessChanged(int brightness)
void contrastChanged(int contrast)
void fullScreenChanged(bool fullScreen)
void hueChanged(int hue)
void saturationChanged(int saturation)

Protected Functions

QPaintDevice()
virtual void init(QPainter * painter) const
virtual int metric(PaintDeviceMetric metric) const
virtual QPaintDevice * redirected(QPoint * offset) const
virtual bool setMediaObject(QMediaObject * object) = 0
virtual QPainter * sharedPainter() const

Reimplemented Protected Functions

virtual bool event(QEvent * event)
virtual void hideEvent(QHideEvent * event)
virtual void moveEvent(QMoveEvent * event)
virtual void paintEvent(QPaintEvent * event)
virtual void resizeEvent(QResizeEvent * event)
virtual void showEvent(QShowEvent * event)
  • 37 protected functions inherited from QWidget
  • 9 protected functions inherited from QObject

Additional Inherited Members

  • 4 static public members inherited from QWidget
  • 11 static public members inherited from QObject
  • 1 protected slot inherited from QWidget

Detailed Description

The QVideoWidget class provides a widget which presents video produced by a media object.

Attaching a QVideoWidget to a QMediaObject allows it to display the video or image output of that media object. A QVideoWidget is attached to media object by passing a pointer to the QMediaObject in its constructor, and detached by destroying the QVideoWidget.

 player = new QMediaPlayer;

 playlist = new QMediaPlaylist(player);
 playlist->addMedia(QUrl("http://example.com/myclip1.mp4"));
 playlist->addMedia(QUrl("http://example.com/myclip2.mp4"));

 videoWidget = new QVideoWidget;
 player->setVideoOutput(videoWidget);

 videoWidget->show();
 playlist->setCurrentIndex(1);
 player->play();

Note: Only a single display output can be attached to a media object at one time.

See also QMediaObject, QMediaPlayer, and QGraphicsVideoItem.

Property Documentation

aspectRatioMode : Qt::AspectRatioMode

This property holds how video is scaled with respect to its aspect ratio.

Access functions:

Qt::AspectRatioMode aspectRatioMode() const
void setAspectRatioMode(Qt::AspectRatioMode mode)

brightness : int

This property holds an adjustment to the brightness of displayed video.

Valid brightness values range between -100 and 100, the default is 0.

Access functions:

int brightness() const
void setBrightness(int brightness)

Notifier signal:

void brightnessChanged(int brightness)

contrast : int

This property holds an adjustment to the contrast of displayed video.

Valid contrast values range between -100 and 100, the default is 0.

Access functions:

int contrast() const
void setContrast(int contrast)

Notifier signal:

void contrastChanged(int contrast)

fullScreen : bool

This property holds whether video display is confined to a window or is fullScreen.

Access functions:

bool isFullScreen() const
void setFullScreen(bool fullScreen)

Notifier signal:

void fullScreenChanged(bool fullScreen)

hue : int

This property holds an adjustment to the hue of displayed video.

Valid hue values range between -100 and 100, the default is 0.

Access functions:

int hue() const
void setHue(int hue)

Notifier signal:

void hueChanged(int hue)

mediaObject : QMediaObject * const

This property holds the media object which provides the video displayed by a widget.

Access functions:

virtual QMediaObject * mediaObject() const

saturation : int

This property holds an adjustment to the saturation of displayed video.

Valid saturation values range between -100 and 100, the default is 0.

Access functions:

int saturation() const
void setSaturation(int saturation)

Notifier signal:

void saturationChanged(int saturation)

Member Function Documentation

QVideoWidget::QVideoWidget(QWidget * parent = 0)

Constructs a new video widget.

The parent is passed to QWidget.

QVideoWidget::~QVideoWidget()

Destroys a video widget.

bool QVideoWidget::event(QEvent * event) [virtual protected]

Reimplemented from QObject::event().

Current event event. Returns the value of the baseclass QWidget::event(QEvent *event) function.

void QVideoWidget::hideEvent(QHideEvent * event) [virtual protected]

Reimplemented from QWidget::hideEvent().

Handles the hide event.

void QVideoWidget::moveEvent(QMoveEvent * event) [virtual protected]

Reimplemented from QWidget::moveEvent().

Handles the move event.

void QVideoWidget::paintEvent(QPaintEvent * event) [virtual protected]

Reimplemented from QWidget::paintEvent().

Handles the paint event.

void QVideoWidget::resizeEvent(QResizeEvent * event) [virtual protected]

Reimplemented from QWidget::resizeEvent().

Handles the resize event.

void QVideoWidget::showEvent(QShowEvent * event) [virtual protected]

Reimplemented from QWidget::showEvent().

Handles the show event.

QSize QVideoWidget::sizeHint() const [virtual]

Reimplemented from QWidget::sizeHint().

Returns the size hint for the current back end, if there is one, or else the size hint from QWidget.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web