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