]> sigrok.org Git - pulseview.git/blobdiff - pv/views/trace/triggermarker.hpp
Make sure get_time_extents() uses a signal that data was acquired for
[pulseview.git] / pv / views / trace / triggermarker.hpp
index 09017c0b882a10e57c2219c4e756e38adaa06687..40c096c0292fa32778c078f0a26bb5fbb1059789 100644 (file)
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef PULSEVIEW_PV_VIEWS_TRACEVIEW_TRIGGER_MARKER_HPP
-#define PULSEVIEW_PV_VIEWS_TRACEVIEW_TRIGGER_MARKER_HPP
+#ifndef PULSEVIEW_PV_VIEWS_TRACE_TRIGGERMARKER_HPP
+#define PULSEVIEW_PV_VIEWS_TRACE_TRIGGERMARKER_HPP
 
 #include "timeitem.hpp"
 
+#include <QPoint>
+
 namespace pv {
 namespace views {
 namespace trace {
 
+/**
+ * The TriggerMarker class is used to show to the user at what point in time
+ * a trigger occured. It is not editable by the user.
+ */
 class TriggerMarker : public TimeItem
 {
        Q_OBJECT
 
 public:
-       static const QColor Colour;
+       static const QColor Color;
 
 public:
        /**
@@ -54,20 +60,22 @@ public:
        /**
          Returns true if the item may be dragged/moved.
         */
-       bool is_draggable() const override;
+       bool is_draggable(QPoint pos) const override;
 
        /**
         * Sets the time of the marker.
         */
        void set_time(const pv::util::Timestamp& time) override;
 
+       virtual const pv::util::Timestamp time() const override;
+
        float get_x() const override;
 
        /**
         * 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;
 
        /**
         * Paints the foreground layer of the item with a QPainter
@@ -84,4 +92,4 @@ private:
 } // namespace views
 } // namespace pv
 
-#endif // PULSEVIEW_PV_VIEWS_TRACEVIEW_TRIGGER_MARKER_HPP
+#endif // PULSEVIEW_PV_VIEWS_TRACE_TRIGGERMARKER_HPP