X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Ftimemarker.hpp;h=99c56d34beedad769a7b4e988b456178210fa412;hb=93dbad3ed4954c3e0c140c26e867bda219cd683f;hp=7c49948b497179a29a32fd22cfcc3e633c2a78f1;hpb=1573bf16ba50d1c023ad3a9ce596f0ab6eaeacff;p=pulseview.git diff --git a/pv/views/trace/timemarker.hpp b/pv/views/trace/timemarker.hpp index 7c49948b..99c56d34 100644 --- a/pv/views/trace/timemarker.hpp +++ b/pv/views/trace/timemarker.hpp @@ -41,6 +41,10 @@ namespace trace { class View; +/** + * The TimeMarker class represents items on the @ref Ruler that highlight a + * single point in time to the user. Aside from this, it is generic in nature. + */ class TimeMarker : public TimeItem { Q_OBJECT @@ -52,16 +56,16 @@ protected: /** * Constructor. * @param view A reference to the view that owns this marker. - * @param colour A reference to the colour of this cursor. + * @param color A reference to the color of this cursor. * @param time The time to set the flag to. */ - TimeMarker(View &view, const QColor &colour, const pv::util::Timestamp& time); + TimeMarker(View &view, const QColor &color, const pv::util::Timestamp& time); public: /** * Gets the time of the marker. */ - const pv::util::Timestamp& time() const; + virtual const pv::util::Timestamp time() const override; /** * Sets the time of the marker. @@ -74,7 +78,7 @@ public: * Gets the arrow-tip point of the time marker. * @param rect the rectangle of the ruler area. */ - QPoint point(const QRect &rect) const override; + QPoint drag_point(const QRect &rect) const override; /** * Computes the outline rectangle of a label. @@ -116,7 +120,7 @@ private Q_SLOTS: void on_value_changed(const pv::util::Timestamp& value); protected: - const QColor &colour_; + const QColor &color_; pv::util::Timestamp time_; @@ -124,7 +128,6 @@ protected: QWidgetAction *value_action_; pv::widgets::TimestampSpinBox *value_widget_; - bool updating_value_widget_; }; } // namespace trace