equal
deleted
inserted
replaced
42 #ifndef QGRAPHICSVIDEOITEM_H |
42 #ifndef QGRAPHICSVIDEOITEM_H |
43 #define QGRAPHICSVIDEOITEM_H |
43 #define QGRAPHICSVIDEOITEM_H |
44 |
44 |
45 #include <QtGui/qgraphicsitem.h> |
45 #include <QtGui/qgraphicsitem.h> |
46 |
46 |
47 #include <qvideowidget.h> |
47 #include "qvideowidget.h" |
48 |
48 |
49 QT_BEGIN_NAMESPACE |
49 QT_BEGIN_NAMESPACE |
50 class QVideoSurfaceFormat; |
50 class QVideoSurfaceFormat; |
51 QT_END_NAMESPACE |
51 QT_END_NAMESPACE |
52 |
52 |
60 Q_PROPERTY(Qt::AspectRatioMode aspectRatioMode READ aspectRatioMode WRITE setAspectRatioMode) |
60 Q_PROPERTY(Qt::AspectRatioMode aspectRatioMode READ aspectRatioMode WRITE setAspectRatioMode) |
61 Q_PROPERTY(QPointF offset READ offset WRITE setOffset) |
61 Q_PROPERTY(QPointF offset READ offset WRITE setOffset) |
62 Q_PROPERTY(QSizeF size READ size WRITE setSize) |
62 Q_PROPERTY(QSizeF size READ size WRITE setSize) |
63 Q_PROPERTY(QSizeF nativeSize READ nativeSize NOTIFY nativeSizeChanged) |
63 Q_PROPERTY(QSizeF nativeSize READ nativeSize NOTIFY nativeSizeChanged) |
64 public: |
64 public: |
65 enum FillMode |
|
66 { |
|
67 Stretch, |
|
68 PreserveAspectFit, |
|
69 PreserveAspectCrop |
|
70 }; |
|
71 |
|
72 QGraphicsVideoItem(QGraphicsItem *parent = 0); |
65 QGraphicsVideoItem(QGraphicsItem *parent = 0); |
73 ~QGraphicsVideoItem(); |
66 ~QGraphicsVideoItem(); |
74 |
67 |
75 QMediaObject *mediaObject() const; |
68 QMediaObject *mediaObject() const; |
76 void setMediaObject(QMediaObject *object); |
69 void setMediaObject(QMediaObject *object); |
89 QRectF boundingRect() const; |
82 QRectF boundingRect() const; |
90 |
83 |
91 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); |
84 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); |
92 |
85 |
93 Q_SIGNALS: |
86 Q_SIGNALS: |
94 void nativeSizeChanged(const QSizeF &size) const; |
87 void nativeSizeChanged(const QSizeF &size); |
95 |
88 |
96 protected: |
89 protected: |
|
90 void timerEvent(QTimerEvent *event); |
97 QVariant itemChange(GraphicsItemChange change, const QVariant &value); |
91 QVariant itemChange(GraphicsItemChange change, const QVariant &value); |
98 |
92 |
99 QGraphicsVideoItemPrivate *d_ptr; |
93 QGraphicsVideoItemPrivate *d_ptr; |
100 |
94 |
101 private: |
95 private: |