X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=inline;f=pv%2Fviews%2Ftrace%2Fviewitem.hpp;h=77c8665e17522a3d08c3e07f631b866078f21ed6;hb=052898db2c0844ac4b809ff3abf25f78362f0ddb;hp=89a57e5edeb248b2dab9b59618cab71b9d268667;hpb=be843692f664e44d26458063042cc5d41a13df57;p=pulseview.git
diff --git a/pv/views/trace/viewitem.hpp b/pv/views/trace/viewitem.hpp
index 89a57e5e..77c8665e 100644
--- a/pv/views/trace/viewitem.hpp
+++ b/pv/views/trace/viewitem.hpp
@@ -17,11 +17,12 @@
* along with this program; if not, see .
*/
-#ifndef PULSEVIEW_PV_VIEWITEM_HPP
-#define PULSEVIEW_PV_VIEWITEM_HPP
+#ifndef PULSEVIEW_PV_VIEWS_TRACE_VIEWITEM_HPP
+#define PULSEVIEW_PV_VIEWS_TRACE_VIEWITEM_HPP
#include
+#include
#include
#include
@@ -53,12 +54,16 @@ public:
public:
ViewItem();
-public:
/**
* Returns true if the item is visible and enabled.
*/
virtual bool enabled() const = 0;
+ /**
+ * Returns true if the item may be selected.
+ */
+ virtual bool is_selectable(QPoint pos) const;
+
/**
* Returns true if the item has been selected by the user.
*/
@@ -72,7 +77,7 @@ public:
/**
* Returns true if the item may be dragged/moved.
*/
- virtual bool is_draggable() const;
+ virtual bool is_draggable(QPoint pos) const;
/**
* Returns true if the item is being dragged.
@@ -146,7 +151,6 @@ public:
*/
virtual void paint_fore(QPainter &p, ViewItemPaintParams &pp);
-public:
/**
* Gets the text color.
* @remarks This color is computed by comparing the lightness
@@ -164,6 +168,14 @@ public:
virtual void delete_pressed();
+ virtual void hover_point_changed(const QPoint &hp);
+
+ /**
+ * Handles left mouse button press events.
+ * @param event the mouse event that triggered this handler.
+ */
+ virtual void mouse_left_press_event(const QMouseEvent* event);
+
protected:
static QPen highlight_pen();
@@ -179,4 +191,4 @@ private:
} // namespace views
} // namespace pv
-#endif // PULSEVIEW_PV_VIEWITEM_HPP
+#endif // PULSEVIEW_PV_VIEWS_TRACE_VIEWITEM_HPP