blob: 2e5a2b8e173db96888bc46fc06b6492c841c0da7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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
|