X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fviewitem.cpp;h=0c61578c0c2acfcb1517e40009a5a91675568caa;hp=1492d14d8d1d45851769dadb6f9af9278c50ae98;hb=fa792224c7c38519b0e7b58e997f82815cd53966;hpb=7708eb92ca87836f5d4987899e0fbb7a4e2335b4 diff --git a/pv/view/viewitem.cpp b/pv/view/viewitem.cpp index 1492d14..0c61578 100644 --- a/pv/view/viewitem.cpp +++ b/pv/view/viewitem.cpp @@ -33,7 +33,7 @@ const QSizeF ViewItem::LabelPadding(4, 0); const int ViewItem::HighlightRadius = 3; ViewItem::ViewItem() : - context_parent_(NULL), + context_parent_(nullptr), drag_point_(INT_MIN, INT_MIN), selected_(false) { @@ -76,6 +76,12 @@ QMenu* ViewItem::create_context_menu(QWidget *parent) return new QMenu(parent); } +widgets::Popup* ViewItem::create_popup(QWidget *parent) +{ + (void)parent; + return nullptr; +} + void ViewItem::delete_pressed() { } @@ -87,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; @@ -107,7 +120,7 @@ void ViewItem::paint_fore(QPainter &p, const ViewItemPaintParams &pp) QColor ViewItem::select_text_colour(QColor background) { - return (background.lightness() > 64) ? Qt::black : Qt::white; + return (background.lightness() > 110) ? Qt::black : Qt::white; } } // namespace view