]> sigrok.org Git - pulseview.git/blobdiff - pv/views/trace/viewitem.cpp
Allow for a context menu in the view area
[pulseview.git] / pv / views / trace / viewitem.cpp
index 61bc99f5f98bba157a1d2eae1ade7078bb892539..7c1fae736699e2215aefb71e7aaec1f0a714fe00 100644 (file)
@@ -62,7 +62,7 @@ bool ViewItem::dragging() const
 void ViewItem::drag()
 {
        if (is_draggable())
-               drag_point_ = point(QRect());
+               drag_point_ = drag_point(QRect());
 }
 
 void ViewItem::drag_release()
@@ -88,6 +88,12 @@ QMenu* ViewItem::create_context_menu(QWidget *parent)
        return new QMenu(parent);
 }
 
+QMenu* ViewItem::create_view_context_menu(QWidget *parent)
+{
+       (void)parent;
+       return nullptr;
+}
+
 widgets::Popup* ViewItem::create_popup(QWidget *parent)
 {
        (void)parent;
@@ -130,7 +136,7 @@ void ViewItem::paint_fore(QPainter &p, ViewItemPaintParams &pp)
        (void)pp;
 }
 
-QColor ViewItem::select_text_colour(QColor background)
+QColor ViewItem::select_text_color(QColor background)
 {
        return (background.lightness() > 110) ? Qt::black : Qt::white;
 }