[vlmc-devel] commit: TrackWorkflow: Handle clip effects events from here. ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Wed Sep 15 18:35:06 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Wed Sep 15 12:04:45 2010 +0200| [b2c0071327e2bb2b3dedc2b7e469befc7ca913eb] | committer: Hugo Beauzée-Luyssen
TrackWorkflow: Handle clip effects events from here.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=b2c0071327e2bb2b3dedc2b7e469befc7ca913eb
---
src/Workflow/TrackWorkflow.cpp | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/Workflow/TrackWorkflow.cpp b/src/Workflow/TrackWorkflow.cpp
index c9554d5..4ced295 100644
--- a/src/Workflow/TrackWorkflow.cpp
+++ b/src/Workflow/TrackWorkflow.cpp
@@ -97,6 +97,12 @@ TrackWorkflow::addClip( ClipWorkflow* cw, qint64 start )
{
QWriteLocker lock( m_clipsLock );
m_clips.insert( start, cw );
+ connect( cw, SIGNAL( effectAdded( EffectHelper*, qint64 ) ),
+ this, SLOT( __effectAdded( EffectHelper*, qint64 ) ) );
+ connect( cw, SIGNAL( effectMoved( QUuid, qint64 ) ),
+ this, SLOT( __effectMoved( QUuid, qint64) ) );
+ connect( cw, SIGNAL( effectRemoved( QUuid ) ),
+ this, SLOT( __effectRemoved( QUuid ) ) );
emit clipAdded( this, cw->getClipHelper(), start );
computeLength();
}
@@ -630,6 +636,12 @@ TrackWorkflow::mixers()
void
TrackWorkflow::__effectAdded( EffectHelper* helper, qint64 pos )
{
+ if ( helper->target()->effectType() == ClipEffectUser )
+ {
+ ClipWorkflow *cw = qobject_cast<ClipWorkflow*>( helper->target() );
+ Q_ASSERT( cw != NULL );
+ pos += getClipPosition( cw->getClipHelper()->uuid() );
+ }
emit effectAdded( this, helper, pos );
}
More information about the Vlmc-devel
mailing list