]> sigrok.org Git - pulseview.git/blobdiff - pv/views/trace/ruler.hpp
Make cursor pair drop precision when too small
[pulseview.git] / pv / views / trace / ruler.hpp
index 8c1876cced37f5e2598f655a51e309eff0c4fbd7..3a9fea910d26febacb20cba1d156fc2486210cbc 100644 (file)
@@ -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<QString(const pv::util::Timestamp&)> 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: