]> sigrok.org Git - pulseview.git/blobdiff - pv/view/view.hpp
View: Store CursorPair in a shared_ptr
[pulseview.git] / pv / view / view.hpp
index 4561cec661f95c546dd979129460f2b089d74249..026c7683ffaef224c501ed94ad6cdbe586452742 100644 (file)
@@ -90,6 +90,11 @@ public:
 
        const Viewport* viewport() const;
 
 
        const Viewport* viewport() const;
 
+       /**
+        * Gets a list of time markers.
+        */
+       std::vector< std::shared_ptr<TimeItem> > time_items() const;
+
        /**
         * Returns the view time scale in seconds per pixel.
         */
        /**
         * Returns the view time scale in seconds per pixel.
         */
@@ -154,12 +159,7 @@ public:
        /**
         * Returns a reference to the pair of cursors.
         */
        /**
         * Returns a reference to the pair of cursors.
         */
-       CursorPair& cursors();
-
-       /**
-        * Returns a reference to the pair of cursors.
-        */
-       const CursorPair& cursors() const;
+       std::shared_ptr<CursorPair> cursors() const;
 
        const QPoint& hover_point() const;
 
 
        const QPoint& hover_point() const;
 
@@ -274,7 +274,7 @@ private:
        unsigned int tick_prefix_;
 
        bool show_cursors_;
        unsigned int tick_prefix_;
 
        bool show_cursors_;
-       CursorPair cursors_;
+       std::shared_ptr<CursorPair> cursors_;
 
        QPoint hover_point_;
 
 
        QPoint hover_point_;