[vlmc-devel] commit: Revert "TracksView: Fixing effect clip undo/redo" ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Wed Sep 15 01:11:13 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Wed Sep 15 01:11:47 2010 +0200| [0f334786aa9b559421b3d4778125d98d30934295] | committer: Hugo Beauzée-Luyssen
Revert "TracksView: Fixing effect clip undo/redo"
This reverts commit 735f7e72493dc72fd5d85dcecc343dc0907b2656.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=0f334786aa9b559421b3d4778125d98d30934295
---
src/Gui/timeline/AbstractGraphicsMediaItem.cpp | 11 -----
src/Gui/timeline/AbstractGraphicsMediaItem.h | 5 --
src/Gui/timeline/TracksView.cpp | 51 ------------------------
src/Gui/timeline/TracksView.h | 14 +++----
4 files changed, 6 insertions(+), 75 deletions(-)
diff --git a/src/Gui/timeline/AbstractGraphicsMediaItem.cpp b/src/Gui/timeline/AbstractGraphicsMediaItem.cpp
index cf789db..d83cc0a 100644
--- a/src/Gui/timeline/AbstractGraphicsMediaItem.cpp
+++ b/src/Gui/timeline/AbstractGraphicsMediaItem.cpp
@@ -21,7 +21,6 @@
*****************************************************************************/
#include "AbstractGraphicsMediaItem.h"
-#include "ClipWorkflow.h"
#include "TracksView.h"
#include "TracksScene.h"
#include "TrackWorkflow.h"
@@ -49,8 +48,6 @@ AbstractGraphicsMediaItem::AbstractGraphicsMediaItem( Clip* clip ) :
connect( m_clipHelper, SIGNAL( lengthUpdated() ), this, SLOT( adjustLength() ) );
connect( clip, SIGNAL( unloaded( Clip* ) ),
this, SLOT( clipDestroyed( Clip* ) ), Qt::DirectConnection );
- connect( m_clipHelper->clipWorkflow(), SIGNAL( effectAdded( EffectHelper*, qint64 ) ),
- this, SLOT( effectAdded( EffectHelper*, qint64 ) ) );
}
AbstractGraphicsMediaItem::AbstractGraphicsMediaItem( ClipHelper* ch ) :
@@ -63,8 +60,6 @@ AbstractGraphicsMediaItem::AbstractGraphicsMediaItem( ClipHelper* ch ) :
connect( ch, SIGNAL( lengthUpdated() ), this, SLOT( adjustLength() ) );
connect( ch->clip(), SIGNAL( unloaded( Clip* ) ),
this, SLOT( clipDestroyed( Clip* ) ), Qt::DirectConnection );
- connect( m_clipHelper->clipWorkflow(), SIGNAL( effectAdded( EffectHelper*, qint64 ) ),
- this, SLOT( effectAdded( EffectHelper*, qint64 ) ) );
}
AbstractGraphicsMediaItem::~AbstractGraphicsMediaItem()
@@ -321,9 +316,3 @@ AbstractGraphicsMediaItem::zNotSelected() const
{
return 50;
}
-
-void
-AbstractGraphicsMediaItem::effectAdded( EffectHelper *helper, qint64 pos )
-{
- emit effectAdded( this, helper, pos );
-}
diff --git a/src/Gui/timeline/AbstractGraphicsMediaItem.h b/src/Gui/timeline/AbstractGraphicsMediaItem.h
index 45aa373..beebe82 100644
--- a/src/Gui/timeline/AbstractGraphicsMediaItem.h
+++ b/src/Gui/timeline/AbstractGraphicsMediaItem.h
@@ -33,7 +33,6 @@ class ClipHelper;
class Clip;
class TracksView;
class TrackWorkflow;
-class EffectHelper;
/**
* \brief Base class for Audio/Video items.
@@ -85,8 +84,6 @@ private slots:
void clipDestroyed( Clip* clip );
- void effectAdded( EffectHelper *helper, qint64 pos );
-
private:
bool m_muted;
@@ -97,8 +94,6 @@ signals:
* \param frame Frame's number where the cut takes place.
*/
void split( AbstractGraphicsMediaItem* self, qint64 frame );
-
- void effectAdded( AbstractGraphicsMediaItem*, EffectHelper*, qint64 );
};
#endif // ABSTRACTGRAPHICSMEDIAITEM_H
diff --git a/src/Gui/timeline/TracksView.cpp b/src/Gui/timeline/TracksView.cpp
index 3aac6f5..c442d47 100644
--- a/src/Gui/timeline/TracksView.cpp
+++ b/src/Gui/timeline/TracksView.cpp
@@ -207,27 +207,6 @@ TracksView::clear()
}
void
-TracksView::effectRemoved( const QUuid& uuid )
-{
- // Get the list of all items in the timeline
- QList<AbstractGraphicsItem*> items = timelineItems();
-
- // Iterate over each item to check if their parent's uuid
- // is the one we would like to remove.
- foreach( AbstractGraphicsItem *item, items )
- {
- GraphicsEffectItem *effectItem = qgraphicsitem_cast<GraphicsEffectItem*>( item );
- if ( effectItem == NULL )
- continue ;
- if ( effectItem->uuid() == uuid )
- {
- // Remove the item from the timeline
- removeItem( effectItem );
- }
- }
-}
-
-void
TracksView::removeClip( const QUuid& uuid )
{
// Get the list of all items in the timeline
@@ -292,20 +271,12 @@ TracksView::addItem( TrackWorkflow *tw, Workflow::Helper *helper, qint64 start )
mediaItem = new GraphicsMovieItem( clipHelper );
connect( mediaItem, SIGNAL( split(AbstractGraphicsMediaItem*,qint64) ),
this, SLOT( split(AbstractGraphicsMediaItem*,qint64) ) );
- connect( mediaItem, SIGNAL( effectAdded( AbstractGraphicsMediaItem*, EffectHelper*, qint64) ),
- this, SLOT( effectAddedToClip( AbstractGraphicsMediaItem*, EffectHelper*,qint64) ) );
- connect( mediaItem->clipHelper()->clipWorkflow(), SIGNAL( effectRemoved( QUuid ) ),
- this, SLOT( effectRemoved( QUuid ) ) );
}
else if ( trackType == Workflow::AudioTrack )
{
mediaItem = new GraphicsAudioItem( clipHelper );
connect( mediaItem, SIGNAL( split(AbstractGraphicsMediaItem*,qint64) ),
this, SLOT( split(AbstractGraphicsMediaItem*,qint64) ) );
- connect( mediaItem, SIGNAL( effectAdded( AbstractGraphicsMediaItem*, EffectHelper*, qint64) ),
- this, SLOT( effectAddedToClip( AbstractGraphicsMediaItem*, EffectHelper*,qint64) ) );
- connect( mediaItem->clipHelper()->clipWorkflow(), SIGNAL( effectRemoved( QUuid ) ),
- this, SLOT( effectRemoved( QUuid ) ) );
}
item = mediaItem;
}
@@ -377,10 +348,6 @@ TracksView::clipDragEnterEvent( QDragEnterEvent *event )
m_dragAudioItem->setTrack( getTrack( m_dragAudioItem->trackType(), 0 ) );
connect( m_dragAudioItem, SIGNAL( split(AbstractGraphicsMediaItem*,qint64) ),
this, SLOT( split(AbstractGraphicsMediaItem*,qint64) ) );
- connect( m_dragAudioItem, SIGNAL( effectAdded( AbstractGraphicsMediaItem*, EffectHelper*, qint64) ),
- this, SLOT( effectAddedToClip( AbstractGraphicsMediaItem*, EffectHelper*,qint64) ) );
- connect( m_dragAudioItem->clipHelper()->clipWorkflow(), SIGNAL( effectRemoved( QUuid ) ),
- this, SLOT( effectRemoved( QUuid ) ) );
}
if ( clip->getMedia()->hasVideoTrack() == true )
{
@@ -391,10 +358,6 @@ TracksView::clipDragEnterEvent( QDragEnterEvent *event )
m_dragVideoItem->setTrack( getTrack( m_dragVideoItem->trackType(), 0 ) );
connect( m_dragVideoItem, SIGNAL( split(AbstractGraphicsMediaItem*,qint64) ),
this, SLOT( split(AbstractGraphicsMediaItem*,qint64) ) );
- connect( m_dragVideoItem, SIGNAL( effectAdded( AbstractGraphicsMediaItem*, EffectHelper*, qint64) ),
- this, SLOT( effectAddedToClip( AbstractGraphicsMediaItem*, EffectHelper*,qint64) ) );
- connect( m_dragVideoItem->clipHelper()->clipWorkflow(), SIGNAL( effectRemoved( QUuid ) ),
- this, SLOT( effectRemoved( QUuid ) ) );
}
// Group the items together
if ( clip->getMedia()->hasAudioTrack() == true &&
@@ -1352,17 +1315,3 @@ TracksView::item( const QUuid &uuid )
}
return NULL;
}
-
-void
-TracksView::effectAddedToClip( AbstractGraphicsMediaItem *mediaItem, EffectHelper *helper, qint64 pos )
-{
- if ( m_itemsLoaded.contains( helper->uuid() ) )
- return ;
- GraphicsEffectItem *item = new GraphicsEffectItem( helper );
- item->setHeight( item->itemHeight() );
- item->m_tracksView = this;
- item->setWidth( helper->length() );
- item->setStartPos( mediaItem->startPos() + pos );
- item->setTrack( mediaItem->track() );
- item->m_oldTrack = mediaItem->track()->trackWorkflow();
-}
diff --git a/src/Gui/timeline/TracksView.h b/src/Gui/timeline/TracksView.h
index b142f33..24a30b4 100644
--- a/src/Gui/timeline/TracksView.h
+++ b/src/Gui/timeline/TracksView.h
@@ -193,12 +193,17 @@ public:
*/
WorkflowRenderer *getRenderer() { return m_renderer; }
/**
+ * \brief Remove a Clip from the timeline (and from the backend).
+ * \param uuid The unique identifier of the Media.
+ */
+ void removeClip( const QUuid& uuid );
+
+ /**
* \returns The AbstractGraphicsMediaItem identified by the given uuid.
* or NULL if there's no such item.
* \param uuid The ClipHelper's uuid
*/
AbstractGraphicsMediaItem* item( const QUuid& uuid );
- void removeClip( const QUuid &uuid );
public slots:
/**
@@ -232,11 +237,6 @@ public slots:
* \sa removeMediaItem( const QList<AbstractGraphicsMediaItem*>& )
*/
void removeItem( AbstractGraphicsItem *item );
- /**
- * \brief Remove a Clip from the timeline (and from the backend).
- * \param uuid The unique identifier of the Media.
- */
- void effectRemoved( const QUuid& uuid );
protected:
virtual void resizeEvent( QResizeEvent *event );
@@ -283,8 +283,6 @@ private slots:
*/
void split( AbstractGraphicsMediaItem *item, qint64 frame );
- void effectAddedToClip( AbstractGraphicsMediaItem* mediaItem, EffectHelper* helper, qint64 pos );
-
private:
/**
* \brief Create the initial layout of the tracks
More information about the Vlmc-devel
mailing list