Commit 1aa19362 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

GraphicsTrack: Adding a getter for TrackWorkflow

This intend to ease clip creation & co
parent 80c10e2b
......@@ -26,11 +26,13 @@
#include "MainWorkflow.h"
GraphicsTrack::GraphicsTrack( Workflow::TrackType type, quint32 trackNumber,
QGraphicsItem *parent ) : QGraphicsWidget( parent )
QGraphicsItem *parent ) :
QGraphicsWidget( parent )
{
m_type = type;
m_trackNumber = trackNumber;
m_enabled = true;
m_trackWorkflow = MainWorkflow::getInstance()->track( type, trackNumber );
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
setContentsMargins( 0, 0, 0, 0 );
......@@ -98,3 +100,9 @@ GraphicsTrack::childs()
}
return list;
}
TrackWorkflow*
GraphicsTrack::trackWorkflow()
{
return m_trackWorkflow;
}
......@@ -27,7 +27,8 @@
#include <QList>
#include "Types.h"
class AbstractGraphicsMediaItem;
class AbstractGraphicsMediaItem;
class TrackWorkflow;
class GraphicsTrack : public QGraphicsWidget
{
......@@ -46,13 +47,15 @@ public:
quint32 trackNumber();
Workflow::TrackType mediaType();
virtual int type() const { return Type; }
TrackWorkflow *trackWorkflow();
QList<AbstractGraphicsMediaItem*> childs();
private:
Workflow::TrackType m_type;
quint32 m_trackNumber;
bool m_enabled;
quint32 m_trackNumber;
bool m_enabled;
TrackWorkflow *m_trackWorkflow;
};
#endif // GRAPHICSTRACK_H
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