timeruler: add context menu

Should have more stuff in it, this is a basic implementation
This commit is contained in:
itsmattkc
2020-10-12 00:19:01 +11:00
parent 3b6ebb6e30
commit 5b69137edf
7 changed files with 111 additions and 65 deletions
+5 -1
View File
@@ -42,6 +42,8 @@ SeekableWidget::SeekableWidget(QWidget* parent) :
// Set width of playhead marker
playhead_width_ = QFontMetricsWidth(fm, "H");
setContextMenuPolicy(Qt::CustomContextMenu);
}
void SeekableWidget::ConnectTimelinePoints(TimelinePoints *points)
@@ -78,7 +80,9 @@ const int &SeekableWidget::GetScroll() const
void SeekableWidget::mousePressEvent(QMouseEvent *event)
{
SeekToScreenPoint(event->pos().x());
if (event->button() == Qt::LeftButton) {
SeekToScreenPoint(event->pos().x());
}
}
void SeekableWidget::mouseMoveEvent(QMouseEvent *event)