[vlmc-devel] commit: GraphicsTrack: Adding a getter for TrackWorkflow ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Thu Aug 26 23:03:08 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Thu Aug 26 01:12:52 2010 +0200| [1aa19362ecc3b507986db56aa95ffab26260aef3] | committer: Hugo Beauzée-Luyssen 

GraphicsTrack: Adding a getter for TrackWorkflow

This intend to ease clip creation & co

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=1aa19362ecc3b507986db56aa95ffab26260aef3
---

 src/Gui/timeline/GraphicsTrack.cpp |   10 +++++++++-
 src/Gui/timeline/GraphicsTrack.h   |    9 ++++++---
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/Gui/timeline/GraphicsTrack.cpp b/src/Gui/timeline/GraphicsTrack.cpp
index 429e62b..861e2d2 100644
--- a/src/Gui/timeline/GraphicsTrack.cpp
+++ b/src/Gui/timeline/GraphicsTrack.cpp
@@ -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;
+}
diff --git a/src/Gui/timeline/GraphicsTrack.h b/src/Gui/timeline/GraphicsTrack.h
index 8e5d1e7..a248b99 100644
--- a/src/Gui/timeline/GraphicsTrack.h
+++ b/src/Gui/timeline/GraphicsTrack.h
@@ -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



More information about the Vlmc-devel mailing list