Commit ad61ee7c authored by Ludovic Fauvet's avatar Ludovic Fauvet

New virtual method used to identify the media type

parent 0996c51f
......@@ -50,6 +50,9 @@ public:
/// Should return the unique uid of the contained media.
virtual const QUuid& uuid() const = 0;
/// Return the type of the media
virtual MainWorkflow::TrackType mediaType() const = 0;
/// Group two items together
void group( AbstractGraphicsMediaItem* item );
......
......@@ -51,6 +51,11 @@ GraphicsAudioItem::~GraphicsAudioItem()
{
}
MainWorkflow::TrackType GraphicsAudioItem::mediaType() const
{
return MainWorkflow::AudioTrack;
}
QRectF GraphicsAudioItem::boundingRect() const
{
return QRectF( 0, 0, m_width, m_height );
......
......@@ -45,6 +45,7 @@ public:
virtual bool expandable() const { return false; }
virtual bool moveable() const { return true; }
virtual const QUuid& uuid() const { return m_clip->getUuid(); }
virtual MainWorkflow::TrackType mediaType() const;
virtual QRectF boundingRect() const;
virtual void paint( QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0 );
......
......@@ -50,6 +50,11 @@ GraphicsMovieItem::~GraphicsMovieItem()
{
}
MainWorkflow::TrackType GraphicsMovieItem::mediaType() const
{
return MainWorkflow::VideoTrack;
}
QRectF GraphicsMovieItem::boundingRect() const
{
return QRectF( 0, 0, m_width, m_height );
......
......@@ -45,6 +45,7 @@ public:
virtual bool expandable() const { return false; }
virtual bool moveable() const { return true; }
virtual const QUuid& uuid() const { return m_clip->getUuid(); }
virtual MainWorkflow::TrackType mediaType() const;
virtual QRectF boundingRect() const;
virtual void paint( QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 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