waveformview: show in/out points in waveformview

Moved drawing routines to the base class that is used by both TimeRuler
and WaveformView
This commit is contained in:
itsmattkc
2020-03-15 18:21:14 +11:00
parent a6fb0c7e2b
commit 50061e4e55
10 changed files with 146 additions and 97 deletions
+7 -2
View File
@@ -62,13 +62,13 @@ void TimeBasedWidget::ConnectViewerNode(ViewerOutput *node)
ConnectedNodeChanged(viewer_node_);
if (viewer_node_) {
ConnectNodeInternal(viewer_node_);
connect(viewer_node_, &ViewerOutput::LengthChanged, this, &TimeBasedWidget::UpdateMaximumScroll);
if ((points_ = ConnectTimelinePoints())) {
ruler()->ConnectTimelinePoints(points_);
}
ConnectNodeInternal(viewer_node_);
}
}
@@ -152,6 +152,11 @@ TimelinePoints *TimeBasedWidget::ConnectTimelinePoints()
return static_cast<Sequence*>(viewer_node_->parent());
}
TimelinePoints *TimeBasedWidget::GetConnectedTimelinePoints() const
{
return points_;
}
void TimeBasedWidget::SetTime(int64_t timestamp)
{
ruler_->SetTime(timestamp);