X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Ftimeitem.hpp;h=06d850505ce8ebde350ecfbcbaeecbd5b3a79c3a;hb=93dbad3ed4954c3e0c140c26e867bda219cd683f;hp=c9b322c7703c1d44287e9f14232e98697f1ca24d;hpb=9f094349d415a37ec30fa2aa2bb6c979c03d6bc1;p=pulseview.git diff --git a/pv/views/trace/timeitem.hpp b/pv/views/trace/timeitem.hpp index c9b322c7..06d85050 100644 --- a/pv/views/trace/timeitem.hpp +++ b/pv/views/trace/timeitem.hpp @@ -43,12 +43,18 @@ protected: */ TimeItem(View &view); + bool snapping_disabled_ = false; + public: /** * Sets the time of the marker. */ virtual void set_time(const pv::util::Timestamp& time) = 0; + /** + * Returns the time this time item is set to. + * @return 0 in case there is no valid time (e.g. for a cursor pair) + */ virtual const pv::util::Timestamp time() const = 0; virtual float get_x() const = 0; @@ -61,6 +67,8 @@ public: */ void drag_by(const QPoint &delta); + bool is_snapping_disabled() const; + protected: View &view_; };