]> sigrok.org Git - pulseview.git/blobdiff - pv/view/ruler.h
Rename 'probe' to 'channel' (libsigrokdecode change).
[pulseview.git] / pv / view / ruler.h
index ba03f312103fce4c42dfcb518c63ab82c35cade6..dc4e7bb73139530cf870dacb5f06010e7c432050 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef PULSEVIEW_PV_VIEW_RULER_H
 #define PULSEVIEW_PV_VIEW_RULER_H
 
+#include <boost/weak_ptr.hpp>
+
 #include "marginwidget.h"
 
 namespace pv {
@@ -34,6 +36,7 @@ class Ruler : public MarginWidget
        Q_OBJECT
 
 private:
+       static const int RulerHeight;
        static const int MinorTickSubdivision;
        static const int ScaleUnits[3];
 
@@ -50,6 +53,9 @@ public:
        static QString format_time(double t, unsigned int prefix,
                unsigned precision = 0);
 
+public:
+       QSize sizeHint() const;
+
 private:
        void paintEvent(QPaintEvent *event);
 
@@ -67,7 +73,9 @@ private slots:
        void hover_point_changed();
 
 private:
-       TimeMarker *_grabbed_marker;
+       boost::weak_ptr<TimeMarker> _grabbed_marker;
+       QPoint _mouse_down_point;
+       bool _dragging;
 };
 
 } // namespace view