timeline: implemented in/out points

This commit is contained in:
itsmattkc
2020-03-08 01:06:45 +11:00
parent 52fc4f064b
commit dc37389d02
23 changed files with 609 additions and 25 deletions
+31
View File
@@ -3,6 +3,7 @@
#include <QWidget>
#include "common/timelinecommon.h"
#include "node/output/viewer/viewer.h"
#include "widget/resizablescrollbar/resizablescrollbar.h"
#include "widget/timelinewidget/timelinescaledobject.h"
@@ -48,6 +49,16 @@ public slots:
void GoToNextCut();
void SetInAtPlayhead();
void SetOutAtPlayhead();
void ResetIn();
void ResetOut();
void ClearInOutPoints();
TimeRuler* ruler() const;
protected slots:
@@ -84,6 +95,26 @@ signals:
void TimebaseChanged(const rational&);
private:
/**
* @brief Set either in or out point to the current playhead
*
* @param m
*
* Set to kTrimIn or kTrimOut for setting the in point or out point respectively.
*/
void SetPoint(Timeline::MovementMode m, const rational &time);
/**
* @brief Reset either the in or out point
*
* Sets either the in point to 0 or the out point to `RATIONAL_MAX`.
*
* @param m
*
* Set to kTrimIn or kTrimOut for setting the in point or out point respectively.
*/
void ResetPoint(Timeline::MovementMode m);
ViewerOutput* viewer_node_;
TimeRuler* ruler_;