timeruler: add context menu
Should have more stuff in it, this is a basic implementation
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user