]> sigrok.org Git - pulseview.git/blobdiff - pv/views/trace/ruler.hpp
Trace View: Move ruler time conversion from View to Ruler
[pulseview.git] / pv / views / trace / ruler.hpp
index 3a9fea910d26febacb20cba1d156fc2486210cbc..bfab766619d135c7d251a2863c7e9078c102ee81 100644 (file)
@@ -115,12 +115,14 @@ public:
                pv::util::SIPrefix prefix = pv::util::SIPrefix::unspecified,
                pv::util::TimeUnit unit = pv::util::TimeUnit::Time,
                unsigned precision = 0,
-               bool sign = true,
-               bool show_unit = true);
+               bool sign = true);
 
        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;
 
+       pv::util::Timestamp get_ruler_time_from_absolute_time(const pv::util::Timestamp& abs_time) const;
+       pv::util::Timestamp get_absolute_time_from_ruler_time(const pv::util::Timestamp& ruler_time) const;
+
 protected:
        virtual void contextMenuEvent(QContextMenuEvent *event) override;
        void resizeEvent(QResizeEvent*) override;