timeline: separate markers and workarea

This commit is contained in:
itsmattkc
2022-06-27 23:39:31 -07:00
parent 63f74691a5
commit 079d6beff2
34 changed files with 324 additions and 338 deletions
+12 -5
View File
@@ -25,7 +25,6 @@
#include <QScrollBar>
#include "common/rational.h"
#include "timeline/timelinepoints.h"
#include "widget/menu/menu.h"
#include "widget/timebased/timebasedviewselectionmanager.h"
@@ -42,8 +41,11 @@ public:
return horizontalScrollBar()->value();
}
TimelinePoints* GetTimelinePoints() const { return timeline_points_; }
void ConnectTimelinePoints(TimelinePoints* points);
TimelineMarkerList *GetMarkers() const { return markers_; }
TimelineWorkArea *GetWorkArea() const { return workarea_; }
void SetMarkers(TimelineMarkerList *markers);
void SetWorkArea(TimelineWorkArea *workarea);
bool IsDraggingPlayhead() const
{
@@ -84,7 +86,8 @@ protected:
virtual void focusOutEvent(QFocusEvent *event) override;
void DrawTimelinePoints(QPainter *p, int marker_bottom = 0);
void DrawMarkers(QPainter *p, int marker_bottom = 0);
void DrawWorkArea(QPainter *p);
void DrawPlayhead(QPainter* p, int x, int y);
@@ -96,6 +99,9 @@ protected:
return playhead_width_;
}
int GetLeftLimit() const;
int GetRightLimit() const;
protected slots:
virtual bool ShowContextMenu(const QPoint &p);
@@ -112,7 +118,8 @@ private:
void CommitResizeHandle();
TimelinePoints* timeline_points_;
TimelineMarkerList* markers_;
TimelineWorkArea* workarea_;
int text_height_;