]> sigrok.org Git - pulseview.git/blobdiff - pv/views/trace/viewitem.hpp
Implement annotation export from the DecodeTrace context menu
[pulseview.git] / pv / views / trace / viewitem.hpp
index e1cc20040bd8ab33f3cded664454ebce23835136..89a57e5edeb248b2dab9b59618cab71b9d268667 100644 (file)
@@ -23,6 +23,7 @@
 #include <list>
 
 #include <QPen>
+#include <QPoint>
 
 #include "viewitempaintparams.hpp"
 
@@ -98,7 +99,7 @@ public:
         * Get the drag point.
         * @param rect the rectangle of the widget area.
         */
-       virtual QPoint point(const QRect &rect) const = 0;
+       virtual QPoint drag_point(const QRect &rect) const = 0;
 
        /**
         * Computes the outline rectangle of a label.
@@ -147,15 +148,17 @@ public:
 
 public:
        /**
-        * Gets the text colour.
-        * @remarks This colour is computed by comparing the lightness
-        * of the trace colour against a threshold to determine whether
+        * Gets the text color.
+        * @remarks This color is computed by comparing the lightness
+        * of the trace color against a threshold to determine whether
         * white or black would be more visible.
         */
-       static QColor select_text_colour(QColor background);
+       static QColor select_text_color(QColor background);
 
 public:
-       virtual QMenu* create_context_menu(QWidget *parent);
+       virtual QMenu* create_header_context_menu(QWidget *parent);
+
+       virtual QMenu* create_view_context_menu(QWidget *parent, QPoint &click_pos);
 
        virtual pv::widgets::Popup* create_popup(QWidget *parent);