began some rewrites to timeline drawing

This commit is contained in:
itsmattkc
2021-01-14 10:30:20 +11:00
parent fbdda3d6d4
commit f7883bd02c
60 changed files with 3134 additions and 951 deletions
+1 -21
View File
@@ -47,11 +47,8 @@ ViewerOutput::ViewerOutput() :
track_lists_.replace(i, list);
connect(list, &TrackList::TrackListChanged, this, &ViewerOutput::UpdateTrackCache);
connect(list, &TrackList::LengthChanged, this, &ViewerOutput::VerifyLength);
connect(list, &TrackList::BlockAdded, this, &ViewerOutput::TrackListAddedBlock);
connect(list, &TrackList::BlockRemoved, this, &ViewerOutput::BlockRemoved);
connect(list, &TrackList::TrackAdded, this, &ViewerOutput::TrackListAddedTrack);
connect(list, &TrackList::TrackAdded, this, &ViewerOutput::TrackAdded);
connect(list, &TrackList::TrackRemoved, this, &ViewerOutput::TrackRemoved);
connect(list, &TrackList::TrackHeightChanged, this, &ViewerOutput::TrackHeightChangedSlot);
}
// Create UUID for this node
@@ -291,21 +288,4 @@ void ViewerOutput::EndOperation()
Node::EndOperation();
}
void ViewerOutput::TrackListAddedBlock(Block *block, int index)
{
Track::Type type = static_cast<TrackList*>(sender())->type();
emit BlockAdded(block, TrackReference(type, index));
}
void ViewerOutput::TrackListAddedTrack(Track *track)
{
Track::Type type = static_cast<TrackList*>(sender())->type();
emit TrackAdded(track, type);
}
void ViewerOutput::TrackHeightChangedSlot(int index, int height)
{
emit TrackHeightChanged(static_cast<TrackList*>(sender())->type(), index, height);
}
}
+2 -14
View File
@@ -32,7 +32,6 @@
#include "render/framehashcache.h"
#include "render/videoparams.h"
#include "timeline/timelinecommon.h"
#include "timeline/trackreference.h"
namespace olive {
@@ -97,7 +96,7 @@ public:
return track_cache_;
}
Track* GetTrackFromReference(const TrackReference& track_ref) const
Track* GetTrackFromReference(const Track::Reference& track_ref) const
{
return track_lists_.at(track_ref.type())->GetTrackAt(track_ref.index());
}
@@ -147,14 +146,9 @@ signals:
void VideoParamsChanged();
void AudioParamsChanged();
void BlockAdded(Block* block, TrackReference track);
void BlockRemoved(Block* block);
void TrackAdded(Track* track, Track::Type type);
void TrackAdded(Track* track);
void TrackRemoved(Track* track);
void TrackHeightChanged(Track::Type type, int index, int height);
private:
QUuid uuid_;
@@ -185,12 +179,6 @@ private slots:
void VerifyLength();
void TrackListAddedBlock(Block* block, int index);
void TrackListAddedTrack(Track* track);
void TrackHeightChangedSlot(int index, int height);
};
}