X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fruler.h;h=ba03f312103fce4c42dfcb518c63ab82c35cade6;hb=a2ae0205f2737dfd8f7647f9eae2fdcb47a0ad25;hp=129b70cbe54520d0ccebb2b829a91f3b7211e496;hpb=ca4ec3eab886e62c0f9d0cc91636383a74ad5d7b;p=pulseview.git diff --git a/pv/view/ruler.h b/pv/view/ruler.h index 129b70c..ba03f31 100644 --- a/pv/view/ruler.h +++ b/pv/view/ruler.h @@ -21,7 +21,7 @@ #ifndef PULSEVIEW_PV_VIEW_RULER_H #define PULSEVIEW_PV_VIEW_RULER_H -#include +#include "marginwidget.h" namespace pv { namespace view { @@ -29,7 +29,7 @@ namespace view { class TimeMarker; class View; -class Ruler : public QWidget +class Ruler : public MarginWidget { Q_OBJECT @@ -45,6 +45,11 @@ private: public: Ruler(View &parent); + void clear_selection(); + + static QString format_time(double t, unsigned int prefix, + unsigned precision = 0); + private: void paintEvent(QPaintEvent *event); @@ -53,8 +58,6 @@ private: void mouseReleaseEvent(QMouseEvent *); private: - void draw_cursors(QPainter &p); - /** * Draw a hover arrow under the cursor position. */ @@ -64,8 +67,6 @@ private slots: void hover_point_changed(); private: - View &_view; - TimeMarker *_grabbed_marker; };