started new timeline paradigm

This commit is contained in:
itsmattkc
2019-03-30 19:43:22 +11:00
parent 7f92774dc9
commit 8e95210b22
19 changed files with 272 additions and 72 deletions
+6
View File
@@ -19,6 +19,12 @@ enum TrimType {
TRIM_OUT
};
enum Alignment {
kAlignmentTop,
kAlignmentBottom,
kAlignmentSingle
};
}
}
+6
View File
@@ -0,0 +1,6 @@
#include "timelineshared.h"
TimelineShared::TimelineShared()
{
}
+11
View File
@@ -0,0 +1,11 @@
#ifndef TIMELINESHARED_H
#define TIMELINESHARED_H
class TimelineShared
{
public:
TimelineShared();
};
#endif // TIMELINESHARED_H
+34 -1
View File
@@ -8,7 +8,10 @@ int olive::timeline::kTrackHeightIncrement = 10;
Track::Track(TrackList* parent, Type type) :
parent_(parent),
type_(type)
type_(type),
muted_(false),
soloed_(false),
locked_(false)
{
}
@@ -172,3 +175,33 @@ long Track::GetEndFrame()
return end_frame;
}
bool Track::IsMuted()
{
return muted_;
}
void Track::SetMuted(bool muted)
{
muted_ = muted;
}
bool Track::IsSoloed()
{
return soloed_;
}
void Track::SetSoloed(bool soloed)
{
soloed_ = soloed;
}
bool Track::IsLocked()
{
return locked_;
}
void Track::SetLocked(bool locked)
{
locked_ = locked;
}
+14
View File
@@ -65,6 +65,16 @@ public:
void ClearSelections();
long GetEndFrame();
bool IsMuted();
bool IsSoloed();
bool IsLocked();
public slots:
void SetMuted(bool muted);
void SetSoloed(bool soloed);
void SetLocked(bool locked);
private:
void ResizeClipArray(int new_size);
@@ -74,6 +84,10 @@ private:
QVector<ClipPtr> clips_;
QVector<EffectPtr> effects_;
QVector<Selection> selections_;
bool muted_;
bool soloed_;
bool locked_;
};
#endif // TRACK_H
+5
View File
@@ -39,6 +39,11 @@ Track *TrackList::First()
return tracks_.first().get();
}
int TrackList::TrackCount()
{
return tracks_.size();
}
QVector<TrackPtr> TrackList::tracks()
{
return tracks_;
+1 -1
View File
@@ -13,11 +13,11 @@ public:
void AddTrack();
void RemoveTrack(int i);
Track* First();
int TrackCount();
QVector<Track*> tracks();
Sequence* GetParent();
private:
void ResizeTrackArray(int i);