diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2009-06-29 06:34:50 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2009-06-29 06:34:50 (GMT) |
commit | 37229d77646347db089553a82c44ef0d52eb36c7 (patch) | |
tree | 69cadd76390bcbcdbe7b6e0174fdea86dcaca127 /tests/auto/mediaobject/dummy/videowidget.h | |
parent | 6a8f5753a1b04e3678c387a52c8f4c2820ef1b2b (diff) | |
parent | 90a37877c1c7ddec13ea7a1ae40c1a6b9be1ea83 (diff) | |
download | Qt-37229d77646347db089553a82c44ef0d52eb36c7.zip Qt-37229d77646347db089553a82c44ef0d52eb36c7.tar.gz Qt-37229d77646347db089553a82c44ef0d52eb36c7.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'tests/auto/mediaobject/dummy/videowidget.h')
-rw-r--r-- | tests/auto/mediaobject/dummy/videowidget.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/tests/auto/mediaobject/dummy/videowidget.h b/tests/auto/mediaobject/dummy/videowidget.h new file mode 100644 index 0000000..2e5a2b8 --- /dev/null +++ b/tests/auto/mediaobject/dummy/videowidget.h @@ -0,0 +1,70 @@ +#ifndef PHONON_DUMMY_VIDEOWIDGET_H +#define PHONON_DUMMY_VIDEOWIDGET_H + +#include <phonon/videowidget.h> +#include <phonon/videowidgetinterface.h> + +#include "backend.h" + +QT_BEGIN_NAMESPACE + +class QString; + +namespace Phonon +{ +namespace Dummy +{ + +class VideoWidget : public QWidget, public Phonon::VideoWidgetInterface +{ + Q_OBJECT + Q_INTERFACES(Phonon::VideoWidgetInterface) +public: + VideoWidget(Backend *backend, QWidget *parent = 0); + ~VideoWidget(); + + void paintEvent(QPaintEvent *event); + void setVisible(bool); + + Phonon::VideoWidget::AspectRatio aspectRatio() const; + void setAspectRatio(Phonon::VideoWidget::AspectRatio aspectRatio); + Phonon::VideoWidget::ScaleMode scaleMode() const; + void setScaleMode(Phonon::VideoWidget::ScaleMode); + qreal brightness() const; + void setBrightness(qreal); + qreal contrast() const; + void setContrast(qreal); + qreal hue() const; + void setHue(qreal); + qreal saturation() const; + void setSaturation(qreal); + void setMovieSize(const QSize &size); + QSize sizeHint() const; + QRect scaleToAspect(QRect srcRect, int w, int h) const; + QRect calculateDrawFrameRect() const; + + QSize movieSize() const { + return m_movieSize; + } + + bool event(QEvent *); + + QWidget *widget() { + return this; + } + +protected: + QSize m_movieSize; + +private: + Phonon::VideoWidget::AspectRatio m_aspectRatio; + qreal m_brightness, m_hue, m_contrast, m_saturation; + Phonon::VideoWidget::ScaleMode m_scaleMode; +}; + +} +} //namespace Phonon::Dummy + +QT_END_NAMESPACE + +#endif // PHONON_DUMMY_VIDEOWIDGET_H |