]> sigrok.org Git - pulseview.git/blobdiff - pv/view/decodetrace.hpp
RowItem: Bundled painting parameters into RowItemPaintParams
[pulseview.git] / pv / view / decodetrace.hpp
index e3d8d68c04feb45e50c8780f8f480dfa45b001b1..71876f5ca418062160aa636067d0f1edce1dcbd6 100644 (file)
@@ -99,26 +99,23 @@ public:
        /**
         * Paints the background layer of the trace with a QPainter
         * @param p the QPainter to paint into.
        /**
         * Paints the background layer of the trace with a QPainter
         * @param p the QPainter to paint into.
-        * @param left the x-coordinate of the left edge of the signal.
-        * @param right the x-coordinate of the right edge of the signal.
+        * @param pp the painting parameters object to paint with..
         **/
         **/
-       void paint_back(QPainter &p, int left, int right);
+       void paint_back(QPainter &p, const RowItemPaintParams &pp);
 
        /**
         * Paints the mid-layer of the trace with a QPainter
         * @param p the QPainter to paint into.
 
        /**
         * Paints the mid-layer of the trace with a QPainter
         * @param p the QPainter to paint into.
-        * @param left the x-coordinate of the left edge of the signal
-        * @param right the x-coordinate of the right edge of the signal
+        * @param pp the painting parameters object to paint with.
         **/
         **/
-       void paint_mid(QPainter &p, int left, int right);
+       void paint_mid(QPainter &p, const RowItemPaintParams &pp);
 
        /**
         * Paints the foreground layer of the trace with a QPainter
         * @param p the QPainter to paint into.
 
        /**
         * Paints the foreground layer of the trace with a QPainter
         * @param p the QPainter to paint into.
-        * @param left the x-coordinate of the left edge of the signal
-        * @param right the x-coordinate of the right edge of the signal
+        * @param pp the painting parameters object to paint with.
         **/
         **/
-       void paint_fore(QPainter &p, int left, int right);
+       void paint_fore(QPainter &p, const RowItemPaintParams &pp);
 
        void populate_popup_form(QWidget *parent, QFormLayout *form);
 
 
        void populate_popup_form(QWidget *parent, QFormLayout *form);
 
@@ -128,7 +125,7 @@ public:
 
 private:
        void draw_annotation(const pv::data::decode::Annotation &a, QPainter &p,
 
 private:
        void draw_annotation(const pv::data::decode::Annotation &a, QPainter &p,
-               QColor text_colour, int text_height, int left, int right, int y,
+               QColor text_colour, int text_height, const RowItemPaintParams &pp, int y,
                size_t base_colour) const;
 
        void draw_instant(const pv::data::decode::Annotation &a, QPainter &p,
                size_t base_colour) const;
 
        void draw_instant(const pv::data::decode::Annotation &a, QPainter &p,
@@ -140,7 +137,7 @@ private:
                double end, int y) const;
 
        void draw_error(QPainter &p, const QString &message,
                double end, int y) const;
 
        void draw_error(QPainter &p, const QString &message,
-               int left, int right);
+               const RowItemPaintParams &pp);
 
        void draw_unresolved_period(QPainter &p, int h, int left,
                int right) const;
 
        void draw_unresolved_period(QPainter &p, int h, int left,
                int right) const;