]> sigrok.org Git - pulseview.git/blobdiff - pv/view/view.hpp
Ruler: Recombined with CursorHeader
[pulseview.git] / pv / view / view.hpp
index 9ba86b7260b1d72935e857b50c88ea28d499ed86..344e252e7e9f8caa7a2a2e00c8cb4f2f2df74626 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <stdint.h>
 
+#include <list>
 #include <memory>
 #include <set>
 #include <unordered_map>
@@ -35,6 +36,7 @@
 #include <pv/data/signaldata.hpp>
 
 #include "cursorpair.hpp"
+#include "flag.hpp"
 #include "rowitemowner.hpp"
 
 namespace pv {
@@ -161,6 +163,21 @@ public:
         */
        std::shared_ptr<CursorPair> cursors() const;
 
+       /**
+        * Adds a new flag at a specified time.
+        */
+       void add_flag(double time);
+
+       /**
+        * Removes a flag from the list.
+        */
+       void remove_flag(std::shared_ptr<Flag> flag);
+
+       /**
+        * Gets the list of flags.
+        */
+       std::vector< std::shared_ptr<Flag> > flags() const;
+
        const QPoint& hover_point() const;
 
        void update_viewport();
@@ -232,6 +249,7 @@ private:
 
 public:
        void row_item_appearance_changed(bool label, bool content);
+       void time_item_appearance_changed(bool label, bool content);
 
        void extents_changed(bool horz, bool vert);
 
@@ -243,8 +261,6 @@ private Q_SLOTS:
        void signals_changed();
        void data_updated();
 
-       void marker_time_changed();
-
        void on_signals_moved();
 
        void process_sticky_events();
@@ -256,7 +272,6 @@ private:
 
        Viewport *viewport_;
        Ruler *ruler_;
-       CursorHeader *cursorheader_;
        Header *header_;
 
        /// The view time scale in seconds per pixel.
@@ -274,6 +289,9 @@ private:
        bool show_cursors_;
        std::shared_ptr<CursorPair> cursors_;
 
+       std::list< std::shared_ptr<Flag> > flags_;
+       char next_flag_text_;
+
        QPoint hover_point_;
 
        unsigned int sticky_events_;