X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Fruler.h;h=dc4e7bb73139530cf870dacb5f06010e7c432050;hb=dd048a7ec035447c051c7937ce04aca5be065b4e;hp=ba03f312103fce4c42dfcb518c63ab82c35cade6;hpb=a2ae0205f2737dfd8f7647f9eae2fdcb47a0ad25;p=pulseview.git diff --git a/pv/view/ruler.h b/pv/view/ruler.h index ba03f312..dc4e7bb7 100644 --- a/pv/view/ruler.h +++ b/pv/view/ruler.h @@ -21,6 +21,8 @@ #ifndef PULSEVIEW_PV_VIEW_RULER_H #define PULSEVIEW_PV_VIEW_RULER_H +#include + #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 _grabbed_marker; + QPoint _mouse_down_point; + bool _dragging; }; } // namespace view