X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fviewitem.hpp;h=4c3df154072c8ca5f3c2b06d67d4f0ab7f5d5408;hp=6a78b1afb583eb1c20256f936e4d0a159fd093ef;hb=d4e39570ee6021766c375654801dddba45b9198a;hpb=5b5fa4da3b7112414b9f51e6626ae7f4bf606f02 diff --git a/pv/view/viewitem.hpp b/pv/view/viewitem.hpp index 6a78b1af..4c3df154 100644 --- a/pv/view/viewitem.hpp +++ b/pv/view/viewitem.hpp @@ -25,6 +25,8 @@ #include +#include "viewitempaintparams.hpp" + class QAction; class QMenu; class QWidget; @@ -95,6 +97,27 @@ public: */ 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.