Commit 137ecaf4 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Added QUuid for Clip

parent a7f907ef
......@@ -28,18 +28,24 @@
Clip::Clip( Media* parent ) : m_parent( parent ), m_begin( 0 ), m_end( Clip::UntilEndOfMedia )
{
computeLength();
init();
}
Clip::Clip( Clip* creator, qint64 begin, qint64 end ) : m_parent( creator->getParent() ), m_begin( begin ), m_end( end )
{
computeLength();
init();
}
Clip::~Clip()
{
}
void Clip::init()
{
m_uuid = QUuid::createUuid();
computeLength();
}
qint64 Clip::getBegin() const
{
return m_begin;
......@@ -67,3 +73,8 @@ void Clip::computeLength()
else
m_length = m_end - m_begin;
}
const QUuid& Clip::getUuid() const
{
return m_uuid;
}
......@@ -29,6 +29,7 @@
# define CLIP_H__
#include <QObject>
#include <QUuid>
#include "Media.h"
......@@ -43,18 +44,21 @@ class Clip : public QObject
Clip( Clip* creator, qint64 begin, qint64 end );
virtual ~Clip();
qint64 getBegin() const;
qint64 getEnd() const;
qint64 getLength() const;
Media* getParent();
qint64 getBegin() const;
qint64 getEnd() const;
qint64 getLength() const;
Media* getParent();
const QUuid& getUuid() const;
private:
void computeLength();
void init();
Media* m_parent;
qint64 m_begin;
qint64 m_end;
qint64 m_length;
QUuid m_uuid;
};
#endif //CLIP_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