Commit 080917d4 authored by Ludovic Fauvet's avatar Ludovic Fauvet
Browse files

Replace all occurences of getTimelineUuid to getUuid

IDs are now truly unique.
parent abe1c6f3
......@@ -62,7 +62,7 @@ namespace Commands
}
virtual void undo()
{
m_workflow->removeClip( m_clip->getTimelineUuid(), m_trackNumber );
m_workflow->removeClip( m_clip->getUuid(), m_trackNumber );
}
private:
::MainWorkflow* m_workflow;
......@@ -114,7 +114,7 @@ namespace Commands
virtual void redo()
{
for (int i = 0; i < m_clips.size(); ++i )
m_workflow->removeClip( m_clips.at( i ).clip->getTimelineUuid(), m_clips.at( i ).trackNumber );
m_workflow->removeClip( m_clips.at( i ).clip->getUuid(), m_clips.at( i ).trackNumber );
}
virtual void undo()
{
......
......@@ -39,7 +39,7 @@ public:
virtual int type() const { return Type; }
virtual bool expandable() const { return false; }
virtual bool moveable() const { return true; }
virtual const QUuid& uuid() const { return m_clip->getTimelineUuid(); }
virtual const QUuid& uuid() const { return m_clip->getUuid(); }
virtual QRectF boundingRect() const;
virtual void paint( QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0 );
......
......@@ -467,7 +467,7 @@ void TracksView::mouseReleaseEvent( QMouseEvent* event )
if ( m_layout->itemAt( 0 )->graphicsItem()->childItems().count() > 0 )
addVideoTrack();
Commands::trigger( new Commands::MainWorkflow::MoveClip( m_mainWorkflow,
movieItem->clip()->getTimelineUuid(),
movieItem->clip()->getUuid(),
movieItem->oldTrackNumber,
movieItem->oldPosition,
movieItem->trackNumber(),
......
......@@ -30,20 +30,20 @@
Clip::Clip( Media* parent ) : m_parent( parent ), m_begin( 0.0f ), m_end( 1.0f )
{
m_timelineUuid = QUuid::createUuid();
m_Uuid = QUuid::createUuid();
computeLength();
}
Clip::Clip( Clip* creator, float begin, float end ) : m_parent( creator->getParent() ), m_begin( begin ), m_end( end )
{
m_timelineUuid = QUuid::createUuid();
m_Uuid = QUuid::createUuid();
computeLength();
}
Clip::Clip( Media* parent, float begin, float end ) : m_parent( parent ), m_begin( begin ), m_end( end )
{
Q_ASSERT( parent->getInputType() == Media::File || ( begin == .0f && end == .0f ) );
m_timelineUuid = QUuid::createUuid();
m_Uuid = QUuid::createUuid();
computeLength();
}
......@@ -56,7 +56,7 @@ Clip::Clip( Clip* clip ) :
m_metaTags( clip->m_metaTags ),
m_notes( clip->m_notes )
{
m_timelineUuid = QUuid::createUuid();
m_Uuid = QUuid::createUuid();
}
Clip::~Clip()
......@@ -140,10 +140,10 @@ void Clip::setNotes( const QString& notes )
m_notes = notes;
}
const QUuid& Clip::getTimelineUuid() const
const QUuid& Clip::getUuid() const
{
Q_ASSERT( m_timelineUuid.isNull() == false );
return m_timelineUuid;
Q_ASSERT( m_Uuid.isNull() == false );
return m_Uuid;
}
void Clip::setBegin( float begin )
......
......@@ -90,8 +90,7 @@ class Clip : public QObject
\return The Clip's Uuid as a QUuid
*/
const QUuid& getTimelineUuid() const;
const QUuid& getUuid() const;
const QStringList& getMetaTags() const;
void setMetaTags( const QStringList& tags );
......@@ -113,11 +112,10 @@ class Clip : public QObject
* timeline, as a unique object, even if this clip is present more than
* once.
*/
QUuid m_timelineUuid;
QUuid m_Uuid;
QStringList m_metaTags;
QString m_notes;
};
#endif //CLIP_H__
......@@ -142,7 +142,7 @@ void ClipRenderer::previousFrame()
void ClipRenderer::mediaUnloaded( const QUuid& uuid )
{
if ( m_selectedClip != NULL && m_selectedClip->getTimelineUuid() == uuid )
if ( m_selectedClip != NULL && m_selectedClip->getUuid() == uuid )
{
m_mediaPlayer->stop();
m_clipLoaded = false;
......
......@@ -91,7 +91,7 @@ qint64 TrackWorkflow::getClipPosition( const QUuid& uuid ) const
while ( it != end )
{
if ( it.value()->getClip()->getTimelineUuid() == uuid )
if ( it.value()->getClip()->getUuid() == uuid )
return it.key();
++it;
}
......@@ -105,7 +105,7 @@ Clip* TrackWorkflow::getClip( const QUuid& uuid )
while ( it != end )
{
if ( it.value()->getClip()->getTimelineUuid() == uuid )
if ( it.value()->getClip()->getUuid() == uuid )
return it.value()->getClip();
++it;
}
......@@ -388,7 +388,7 @@ void TrackWorkflow::moveClip( const QUuid& id, qint64 startingFrame )
while ( it != end )
{
if ( it.value()->getClip()->getTimelineUuid() == id )
if ( it.value()->getClip()->getUuid() == id )
{
ClipWorkflow* cw = it.value();
m_clips.erase( it );
......@@ -413,7 +413,7 @@ Clip* TrackWorkflow::removeClip( const QUuid& id )
while ( it != end )
{
if ( it.value()->getClip()->getTimelineUuid() == id )
if ( it.value()->getClip()->getUuid() == id )
{
ClipWorkflow* cw = it.value();
Clip* clip = cw->getClip();
......
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