23#include "videowidget.h"
24#include "videowidget_p.h"
25#include "videowidgetinterface.h"
27#include "phonondefs_p.h"
28#include "phononnamespace_p.h"
31#define IFACES4 VideoWidgetInterface44
32#define IFACES0 VideoWidgetInterface, IFACES4
33#define PHONON_INTERFACENAME IFACES0
35#ifndef QT_NO_PHONON_VIDEO
46 d->createBackendObject();
60void VideoWidgetPrivate::init()
71void VideoWidgetPrivate::createBackendObject()
76 m_backendObject = Factory::createVideoWidget(q);
77 if (m_backendObject) {
82#define PHONON_CLASSNAME VideoWidget
85PHONON_INTERFACE_SETTER(setAspectRatio, aspectRatio, Phonon::VideoWidget::AspectRatio)
87PHONON_INTERFACE_GETTER(Phonon::VideoWidget::ScaleMode, scaleMode, d->scaleMode)
88PHONON_INTERFACE_SETTER(setScaleMode, scaleMode, Phonon::VideoWidget::ScaleMode)
90PHONON_INTERFACE_GETTER(qreal, brightness, d->brightness)
91PHONON_INTERFACE_SETTER(setBrightness, brightness, qreal)
93PHONON_INTERFACE_GETTER(qreal, contrast, d->contrast)
94PHONON_INTERFACE_SETTER(setContrast, contrast, qreal)
96PHONON_INTERFACE_GETTER(qreal, hue, d->hue)
97PHONON_INTERFACE_SETTER(setHue, hue, qreal)
99PHONON_INTERFACE_GETTER(qreal, saturation, d->saturation)
100PHONON_INTERFACE_SETTER(setSaturation, saturation, qreal)
103QImage VideoWidget::snapshot()
const {
104 P_D(
const VideoWidget);
105 ConstIface<IFACES4> iface(d);
106 if(iface)
return iface->snapshot();
111void VideoWidget::setFullScreen(
bool newFullScreen)
113 pDebug() << Q_FUNC_INFO << newFullScreen;
138 flags |= d->changeFlags;
147 setFullScreen(
false);
155bool VideoWidgetPrivate::aboutToDeleteBackendObject()
157 aspectRatio = pINTERFACE_CALL(aspectRatio());
158 scaleMode = pINTERFACE_CALL(scaleMode());
159 return AbstractVideoOutputPrivate::aboutToDeleteBackendObject();
162void VideoWidgetPrivate::setupBackendObject()
165 Q_ASSERT(m_backendObject);
167 pDebug() <<
"calling setAspectRatio on the backend " << aspectRatio;
168 pINTERFACE_CALL(setAspectRatio(aspectRatio));
169 pINTERFACE_CALL(setScaleMode(scaleMode));
171 QWidget *w = pINTERFACE_CALL(widget());
179bool VideoWidget::event(
QEvent *e)
188#include "moc_videowidget.cpp"
190#undef PHONON_CLASSNAME
Common base class for all video outputs.