TraceGroup: Implemented paint_label
[pulseview.git] / pv / view / tracegroup.h
index 297afa82eaec28c1002bc79cbbd33a4ee47466e4..5171b7fc880c23f5e2d390ba2bc1d06c553e3399 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.
@@ -77,7 +89,7 @@ public:
         *      area.
         * @return Returns the rectangle of the signal label.
         */
-       QRectF label_rect(int right);
+       QRectF label_rect(int right) const;
 
        /**
         * Determines if a point is in the header label rect.
@@ -99,6 +111,9 @@ public:
        int owner_v_offset() const;
 
        void update_viewport();
+
+private Q_SLOTS:
+       void on_ungroup();
 };
 
 } // view