Commit 54214f93 authored by Craig Watson's avatar Craig Watson

Add videos at their native size (not 320x240)

parent 93dc2538
...@@ -121,6 +121,9 @@ UBGraphicsMediaItem::UBGraphicsMediaItem(const QUrl& pMediaFileUrl, QGraphicsIte ...@@ -121,6 +121,9 @@ UBGraphicsMediaItem::UBGraphicsMediaItem(const QUrl& pMediaFileUrl, QGraphicsIte
connect(Delegate(), SIGNAL(showOnDisplayChanged(bool)), this, SLOT(showOnDisplayChanged(bool))); connect(Delegate(), SIGNAL(showOnDisplayChanged(bool)), this, SLOT(showOnDisplayChanged(bool)));
connect(mMediaObject, SIGNAL(videoAvailableChanged(bool)), this, SLOT(hasMediaChanged(bool))); connect(mMediaObject, SIGNAL(videoAvailableChanged(bool)), this, SLOT(hasMediaChanged(bool)));
// Resize the widget as soon as the video's native size is known (it isn't at this stage)
connect(mVideoItem, SIGNAL(nativeSizeChanged(QSizeF)), this, SLOT(resize(QSizeF)));
} }
......
...@@ -112,8 +112,6 @@ public: ...@@ -112,8 +112,6 @@ public:
virtual void setPos(qreal x, qreal y); virtual void setPos(qreal x, qreal y);
virtual void setMatrix(const QMatrix &matrix, bool combine = false); virtual void setMatrix(const QMatrix &matrix, bool combine = false);
virtual void setTransform(const QTransform &matrix, bool combine = false); virtual void setTransform(const QTransform &matrix, bool combine = false);
virtual void resize(qreal w, qreal h);
virtual void resize(const QSizeF & pSize);
public slots: public slots:
...@@ -123,6 +121,8 @@ public slots: ...@@ -123,6 +121,8 @@ public slots:
void activeSceneChanged(); void activeSceneChanged();
void hasMediaChanged(bool hasMedia); void hasMediaChanged(bool hasMedia);
void showOnDisplayChanged(bool shown); void showOnDisplayChanged(bool shown);
virtual void resize(qreal w, qreal h);
virtual void resize(const QSizeF & pSize);
protected: protected:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment