Commit 17312e88 authored by Craig Watson's avatar Craig Watson

Fixed type testing of media items (qgraphicsitem_cast couldn't tell the...

Fixed type testing of media items (qgraphicsitem_cast couldn't tell the difference between audio and video items)
parent 3a7c2945
......@@ -151,6 +151,8 @@ struct UBGraphicsItemType
SvgItemType,
DelegateButtonType,
MediaItemType,
VideoItemType,
AudioItemType,
PDFItemType,
TextItemType,
CurtainItemType,
......
......@@ -160,6 +160,11 @@ class UBGraphicsAudioItem: public UBGraphicsMediaItem
Q_OBJECT
public:
enum { Type = UBGraphicsItemType::AudioItemType};
virtual int type() const
{
return Type;
}
UBGraphicsAudioItem(const QUrl& pMediaFileUrl, QGraphicsItem *parent = 0);
mediaType getMediaType() const { return mediaType_Audio; }
......@@ -172,6 +177,11 @@ class UBGraphicsVideoItem: public UBGraphicsMediaItem
Q_OBJECT
public:
enum { Type = UBGraphicsItemType::VideoItemType};
virtual int type() const
{
return Type;
}
UBGraphicsVideoItem(const QUrl& pMediaFileUrl, QGraphicsItem *parent = 0);
......
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