From fa792224c7c38519b0e7b58e997f82815cd53966 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Mon, 31 Aug 2015 19:51:00 -0600 Subject: [PATCH] ViewItem: Make paint_label optional --- pv/view/viewitem.cpp | 7 +++++++ pv/view/viewitem.hpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pv/view/viewitem.cpp b/pv/view/viewitem.cpp index 662c15de..0c61578c 100644 --- a/pv/view/viewitem.cpp +++ b/pv/view/viewitem.cpp @@ -93,6 +93,13 @@ QPen ViewItem::highlight_pen() Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); } +void ViewItem::paint_label(QPainter &p, const QRect &rect, bool hover) +{ + (void)p; + (void)rect; + (void)hover; +} + void ViewItem::paint_back(QPainter &p, const ViewItemPaintParams &pp) { (void)p; diff --git a/pv/view/viewitem.hpp b/pv/view/viewitem.hpp index dd3d2aa0..82851e5c 100644 --- a/pv/view/viewitem.hpp +++ b/pv/view/viewitem.hpp @@ -116,7 +116,7 @@ public: * @param rect the rectangle of the header area. * @param hover true if the label is being hovered over by the mouse. */ - virtual void paint_label(QPainter &p, const QRect &rect, bool hover) = 0; + virtual void paint_label(QPainter &p, const QRect &rect, bool hover); /** * Paints the background layer of the item with a QPainter -- 2.30.2