timebasedwidget: implemented go to in/out
This commit is contained in:
@@ -195,4 +195,14 @@ void TimeBasedPanel::ToggleShowAll()
|
||||
GetTimeBasedWidget()->ToggleShowAll();
|
||||
}
|
||||
|
||||
void TimeBasedPanel::GoToIn()
|
||||
{
|
||||
GetTimeBasedWidget()->GoToIn();
|
||||
}
|
||||
|
||||
void TimeBasedPanel::GoToOut()
|
||||
{
|
||||
GetTimeBasedWidget()->GoToOut();
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
@@ -80,6 +80,10 @@ public:
|
||||
|
||||
virtual void ToggleShowAll() override;
|
||||
|
||||
virtual void GoToIn() override;
|
||||
|
||||
virtual void GoToOut() override;
|
||||
|
||||
public slots:
|
||||
void SetTimebase(const rational& timebase);
|
||||
|
||||
|
||||
@@ -146,6 +146,10 @@ public:
|
||||
|
||||
virtual void ToggleShowAll(){}
|
||||
|
||||
virtual void GoToIn(){}
|
||||
|
||||
virtual void GoToOut(){}
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief paintEvent
|
||||
|
||||
@@ -462,4 +462,26 @@ void TimeBasedWidget::ToggleShowAll()
|
||||
}
|
||||
}
|
||||
|
||||
void TimeBasedWidget::GoToIn()
|
||||
{
|
||||
if (viewer_node_) {
|
||||
if (points_ && points_->workarea()->enabled()) {
|
||||
SetTimeAndSignal(Timecode::time_to_timestamp(points_->workarea()->in(), timebase()));
|
||||
} else {
|
||||
GoToStart();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TimeBasedWidget::GoToOut()
|
||||
{
|
||||
if (viewer_node_) {
|
||||
if (points_ && points_->workarea()->enabled()) {
|
||||
SetTimeAndSignal(Timecode::time_to_timestamp(points_->workarea()->out(), timebase()));
|
||||
} else {
|
||||
GoToEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
@@ -86,6 +86,10 @@ public slots:
|
||||
|
||||
void ToggleShowAll();
|
||||
|
||||
void GoToIn();
|
||||
|
||||
void GoToOut();
|
||||
|
||||
TimeRuler* ruler() const;
|
||||
|
||||
protected slots:
|
||||
|
||||
Reference in New Issue
Block a user