Merge branch 'merge-timeline-and-viewer'
This commit is contained in:
@@ -181,7 +181,7 @@ void TimelineWidget::SetTime(int64_t timestamp)
|
||||
UpdateInternalTime(timestamp);
|
||||
}
|
||||
|
||||
void TimelineWidget::ConnectTimelineNode(TimelineOutput *node)
|
||||
void TimelineWidget::ConnectTimelineNode(ViewerOutput *node)
|
||||
{
|
||||
if (timeline_node_ != nullptr) {
|
||||
disconnect(timeline_node_, SIGNAL(LengthChanged(const rational&)), this, SLOT(UpdateTimelineLength(const rational&)));
|
||||
@@ -213,7 +213,7 @@ void TimelineWidget::ConnectTimelineNode(TimelineOutput *node)
|
||||
connect(timeline_node_, SIGNAL(TimebaseChanged(const rational&)), this, SLOT(SetTimebase(const rational&)));
|
||||
connect(timeline_node_, SIGNAL(TrackHeightChanged(TrackType, int, int)), this, SLOT(TrackHeightChanged(TrackType, int, int)));
|
||||
|
||||
SetTimebase(timeline_node_->timebase());
|
||||
SetTimebase(timeline_node_->video_params().time_base());
|
||||
|
||||
for (int i=0;i<views_.size();i++) {
|
||||
TrackType track_type = static_cast<TrackType>(i);
|
||||
@@ -223,7 +223,7 @@ void TimelineWidget::ConnectTimelineNode(TimelineOutput *node)
|
||||
|
||||
track_view->ConnectTrackList(track_list);
|
||||
view->ConnectTrackList(track_list);
|
||||
view->SetEndTime(timeline_node_->timeline_length());
|
||||
view->SetEndTime(timeline_node_->Length());
|
||||
|
||||
// Defer to the track to make all the block UI items necessary
|
||||
foreach (TrackOutput* track, timeline_node_->track_list(track_type)->Tracks()) {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "core.h"
|
||||
#include "timelineandtrackview.h"
|
||||
#include "node/output/viewer/viewer.h"
|
||||
#include "widget/slider/timeslider.h"
|
||||
#include "widget/timelinewidget/timelinescaledobject.h"
|
||||
#include "widget/timeruler/timeruler.h"
|
||||
@@ -28,7 +29,7 @@ public:
|
||||
|
||||
void SetTime(int64_t timestamp);
|
||||
|
||||
void ConnectTimelineNode(TimelineOutput* node);
|
||||
void ConnectTimelineNode(ViewerOutput *node);
|
||||
|
||||
void DisconnectTimelineNode();
|
||||
|
||||
@@ -368,7 +369,7 @@ private:
|
||||
|
||||
TimeRuler* ruler_;
|
||||
|
||||
TimelineOutput* timeline_node_;
|
||||
ViewerOutput* timeline_node_;
|
||||
|
||||
int64_t playhead_;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <QScrollArea>
|
||||
#include <QSplitter>
|
||||
|
||||
#include "node/output/timeline/tracklist.h"
|
||||
#include "node/output/track/tracklist.h"
|
||||
#include "trackviewitem.h"
|
||||
#include "trackviewsplitter.h"
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
#include "node/block/block.h"
|
||||
#include "node/block/gap/gap.h"
|
||||
#include "node/output/timeline/timeline.h"
|
||||
#include "node/output/track/track.h"
|
||||
#include "node/output/track/tracklist.h"
|
||||
|
||||
class BlockResizeCommand : public QUndoCommand {
|
||||
public:
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include <QDropEvent>
|
||||
|
||||
#include "node/block/clip/clip.h"
|
||||
#include "node/output/timeline/timeline.h"
|
||||
#include "timelineviewbase.h"
|
||||
#include "timelineviewblockitem.h"
|
||||
#include "timelineviewmouseevent.h"
|
||||
|
||||
@@ -339,6 +339,11 @@ void TimeRuler::DrawPlayhead(QPainter *p, int x, int y)
|
||||
p->drawPolygon(points, 6);
|
||||
}
|
||||
|
||||
int TimeRuler::CacheStatusHeight() const
|
||||
{
|
||||
return fontMetrics().height() / 4;
|
||||
}
|
||||
|
||||
double TimeRuler::ScreenToUnitFloat(int screen)
|
||||
{
|
||||
return (screen + scroll_) / scale_ / timebase_dbl_;
|
||||
|
||||
@@ -71,6 +71,8 @@ private:
|
||||
|
||||
void DrawPlayhead(QPainter* p, int x, int y);
|
||||
|
||||
int CacheStatusHeight() const;
|
||||
|
||||
double ScreenToUnitFloat(int screen);
|
||||
|
||||
int64_t ScreenToUnit(int screen);
|
||||
|
||||
Reference in New Issue
Block a user