Implement segment display mode handling and update notifications
[pulseview.git] / pv / views / trace / view.hpp
index 8fd7e968552f6af0528e3697e16f8eca2a5fb11e..da05691f42f5274b8c8fd86d54ffeccd80230927 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "cursorpair.hpp"
 #include "flag.hpp"
+#include "trace.hpp"
 #include "tracetreeitemowner.hpp"
 
 using std::list;
@@ -190,6 +191,14 @@ public:
         */
        unsigned int depth() const;
 
+       /**
+        * Returns whether the currently shown segment can be influenced
+        * (selected) or not.
+        */
+       bool segment_is_selectable() const;
+
+       void set_segment_display_mode(Trace::SegmentDisplayMode mode);
+
        void zoom(double steps);
        void zoom(double steps, int offset);
 
@@ -295,6 +304,12 @@ Q_SIGNALS:
        /// Emitted when the time_unit changed.
        void time_unit_changed();
 
+       /// Emitted when the currently selected segment changed
+       void segment_changed(int segment_id);
+
+       /// Emitted when the multi-segment display mode changed
+       void segment_display_mode_changed(bool segment_selectable);
+
 public Q_SLOTS:
        void trigger_event(util::Timestamp location);
 
@@ -424,6 +439,10 @@ private:
 
        /// The ID of the currently displayed segment
        int current_segment_;
+       Trace::SegmentDisplayMode segment_display_mode_;
+
+       /// Signals whether the user can change the currently shown segment.
+       bool segment_selectable_;
 
        /// The view time scale in seconds per pixel.
        double scale_;