]> sigrok.org Git - pulseview.git/blobdiff - pv/view/viewitem.hpp
ViewItem: Moved in paint_fore, paint_mid and paint_back
[pulseview.git] / pv / view / viewitem.hpp
index 6a78b1afb583eb1c20256f936e4d0a159fd093ef..4c3df154072c8ca5f3c2b06d67d4f0ab7f5d5408 100644 (file)
@@ -25,6 +25,8 @@
 
 #include <QPen>
 
 
 #include <QPen>
 
+#include "viewitempaintparams.hpp"
+
 class QAction;
 class QMenu;
 class QWidget;
 class QAction;
 class QMenu;
 class QWidget;
@@ -95,6 +97,27 @@ public:
         */
        virtual QRectF label_rect(const QRectF &rect) const = 0;
 
         */
        virtual QRectF label_rect(const QRectF &rect) const = 0;
 
+       /**
+        * Paints the background layer of the item with a QPainter
+        * @param p the QPainter to paint into.
+        * @param pp the painting parameters object to paint with.
+        **/
+       virtual void paint_back(QPainter &p, const ViewItemPaintParams &pp);
+
+       /**
+        * Paints the mid-layer of the item with a QPainter
+        * @param p the QPainter to paint into.
+        * @param pp the painting parameters object to paint with.
+        **/
+       virtual void paint_mid(QPainter &p, const ViewItemPaintParams &pp);
+
+       /**
+        * Paints the foreground layer of the item with a QPainter
+        * @param p the QPainter to paint into.
+        * @param pp the painting parameters object to paint with.
+        **/
+       virtual void paint_fore(QPainter &p, const ViewItemPaintParams &pp);
+
 public:
        /**
         * Gets the text colour.
 public:
        /**
         * Gets the text colour.