Commit 5492f2ad authored by Ludovic Fauvet's avatar Ludovic Fauvet

Support of the Type field for QGraphicsItems

This enables the use of qgraphicsitem_cast()
parent 8bffbf86
......@@ -35,6 +35,9 @@ public:
AbstractGraphicsMediaItem();
virtual ~AbstractGraphicsMediaItem() { }
/// Return the Type of the MediaItem (see http://doc.trolltech.com/4.5/qgraphicsitem.html#type)
virtual int type() const = 0;
/// The item length can be expanded or shrinked by the user.
virtual bool expandable() const = 0;
......
......@@ -31,9 +31,11 @@ class GraphicsMovieItem : public AbstractGraphicsMediaItem
{
Q_OBJECT
public:
enum { Type = UserType + 1 };
GraphicsMovieItem( Media* media );
virtual ~GraphicsMovieItem();
virtual int type() const { return Type; }
virtual bool expandable() const { return false; }
virtual bool moveable() const { return true; }
virtual const QUuid& uuid() const { return m_media->getUuid(); }
......
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