]> 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 8c1876cced37f5e2598f655a51e309eff0c4fbd7..bfab766619d135c7d251a2863c7e9078c102ee81 100644 (file)
@@ -117,7 +117,11 @@ public:
                unsigned precision = 0,
                bool sign = 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;
+
+       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;
@@ -171,11 +175,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: