]> sigrok.org Git - pulseview.git/blobdiff - pv/views/trace/ruler.hpp
TabularDecView: Allow return/enter press and don't change scale
[pulseview.git] / pv / views / trace / ruler.hpp
index bfab766619d135c7d251a2863c7e9078c102ee81..55c156f5942e34f8a97912322b25a3b2df4c669b 100644 (file)
@@ -17,8 +17,8 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef PULSEVIEW_PV_VIEWS_TRACEVIEW_RULER_HPP
-#define PULSEVIEW_PV_VIEWS_TRACEVIEW_RULER_HPP
+#ifndef PULSEVIEW_PV_VIEWS_TRACE_RULER_HPP
+#define PULSEVIEW_PV_VIEWS_TRACE_RULER_HPP
 
 #include <functional>
 #include <memory>
@@ -123,9 +123,12 @@ public:
        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;
 
+       shared_ptr<TimeItem> get_reference_item() const;
+
 protected:
        virtual void contextMenuEvent(QContextMenuEvent *event) override;
        void resizeEvent(QResizeEvent*) override;
+       virtual void item_hover(const shared_ptr<ViewItem> &item, QPoint pos) override;
 
 private:
        /**
@@ -181,6 +184,7 @@ private Q_SLOTS:
 
        void on_createMarker();
        void on_setZeroPosition();
+       void on_resetZeroPosition();
        void on_toggleHoverMarker();
 
 private:
@@ -190,6 +194,8 @@ private:
         */
        boost::optional<TickPositions> tick_position_cache_;
 
+       shared_ptr<TimeItem> hover_item_;
+
        uint32_t context_menu_x_pos_;
 };
 
@@ -197,4 +203,4 @@ private:
 } // namespace views
 } // namespace pv
 
-#endif // PULSEVIEW_PV_VIEWS_TRACEVIEW_RULER_HPP
+#endif // PULSEVIEW_PV_VIEWS_TRACE_RULER_HPP