]> sigrok.org Git - pulseview.git/blobdiff - pv/view/cursorheader.hpp
CursorPair: Set font before calling compute_text_size
[pulseview.git] / pv / view / cursorheader.hpp
index 90a000f17997779cd613cef40e2f042e0305d787..ff732856ee03f163f0d9e3310552a99d1c9c9c61 100644 (file)
@@ -28,7 +28,7 @@
 namespace pv {
 namespace view {
 
-class TimeMarker;
+class TimeItem;
 
 /**
  * Widget to hold the labels over the cursors.
@@ -58,12 +58,16 @@ private:
        void mouseMoveEvent(QMouseEvent *e);
        void mousePressEvent(QMouseEvent *e);
        void mouseReleaseEvent(QMouseEvent *);
+       void leaveEvent(QEvent*);
 
+       void mouseDoubleClickEvent(QMouseEvent *e);
+
+       void keyPressEvent(QKeyEvent *e);
+
+private:
        int calculateTextHeight();
 
-       std::weak_ptr<TimeMarker> grabbed_marker_;
-       QPoint mouse_down_point_;
-       bool dragging_;
+       std::shared_ptr<TimeItem> mouse_down_item_;
        const int textHeight_;
 };