]> sigrok.org Git - pulseview.git/blobdiff - pv/view/tracegroup.h
TraceGroup: Implemented stacking
[pulseview.git] / pv / view / tracegroup.h
index 0d246cee3c05471c88dbe4f99425eafcea395230..be4cbf1bef706b0dca132f50419acb136b17334e 100644 (file)
@@ -31,6 +31,12 @@ class TraceGroup : public RowItem, public RowItemOwner
 {
        Q_OBJECT
 
+private:
+       static const int Padding;
+       static const int Width;
+       static const int LineThickness;
+       static const QColor LineColour;
+
 public:
        /**
         * Virtual destructor
@@ -62,6 +68,12 @@ public:
         */
        virtual const pv::view::View* view() const;
 
+       /**
+        * Computes the vertical extents of the contents of this row item.
+        * @return A pair containing the minimum and maximum y-values.
+        */
+       std::pair<int, int> v_extents() const;
+
        /**
         * Paints the signal label.
         * @param p the QPainter to paint into.
@@ -96,9 +108,22 @@ public:
        /**
         * Returns the total vertical offset of this trace and all it's owners
         */
-       int owner_v_offset() const;
+       int owner_visual_v_offset() const;
+
+       void restack_items();
+
+       /**
+        * Returns the number of nested parents that this row item owner has.
+        */
+       unsigned int depth() const;
+
+public:
+       void appearance_changed(bool label, bool content);
+
+       void extents_changed(bool horz, bool vert);
 
-       void update_viewport();
+private Q_SLOTS:
+       void on_ungroup();
 };
 
 } // view