X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fruler.hpp;h=3a9fea910d26febacb20cba1d156fc2486210cbc;hb=ef85cfa4599d3741e7007921e39a44490e97cfaf;hp=8c1876cced37f5e2598f655a51e309eff0c4fbd7;hpb=4bc9230c442427a27a3934ce5ff6ff4fdd4e0855;p=pulseview.git diff --git a/pv/views/trace/ruler.hpp b/pv/views/trace/ruler.hpp index 8c1876cc..3a9fea91 100644 --- a/pv/views/trace/ruler.hpp +++ b/pv/views/trace/ruler.hpp @@ -115,9 +115,11 @@ public: pv::util::SIPrefix prefix = pv::util::SIPrefix::unspecified, pv::util::TimeUnit unit = pv::util::TimeUnit::Time, unsigned precision = 0, - bool sign = true); + bool sign = true, + bool show_unit = true); - pv::util::Timestamp get_time_from_x_pos(uint32_t x); + pv::util::Timestamp get_absolute_time_from_x_pos(uint32_t x) const; + pv::util::Timestamp get_ruler_time_from_x_pos(uint32_t x) const; protected: virtual void contextMenuEvent(QContextMenuEvent *event) override; @@ -171,11 +173,12 @@ private: function format_function); private Q_SLOTS: - void hover_point_changed(const QPoint &hp); + void on_hover_point_changed(const QWidget* widget, const QPoint &hp); void invalidate_tick_position_cache(); void on_createMarker(); + void on_setZeroPosition(); void on_toggleHoverMarker(); private: