Commit 93c32273 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Started a Clip implementation

parent 1192c432
......@@ -25,3 +25,29 @@
*/
#include "Clip.h"
Clip::Clip( Media* parent, qint64 begin, qint64 end ) : m_parent( parent ), m_begin( begin ), m_end( end )
{
}
qint64 Clip::getBegin() const
{
return m_begin;
}
qint64 Clip::getEnd() const
{
return m_end;
}
Media* Clip::getParent() const
{
return m_parent;
}
qint64 Clip::getLength() const
{
if ( m_begin == Clip::UntilEndOfMedia )
return m_parent->getLength() - m_begin;
return m_end - m_begin;
}
......@@ -37,9 +37,19 @@ class Clip : public QObject
Q_OBJECT
public:
Clip( Media* parent );
private:
static const qint64 UntilEndOfMedia = -1;
Clip( Clip* parent, qint64 begin = 0, qint64 end = UntilEndOfMedia );
qint64 getBegin() const;
qint64 getEnd() const;
qint64 getLength() const;
Media* getParent();
private:
Media* m_parent;
qint64 m_begin;
qint64 m_end;
};
#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