X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fviewitem.cpp;h=a63d4d38ed7a3c6932f891883ab8918df70097cc;hp=02a9c6a2f39d8deb9dcb0e0c4d3f11e1b1f16a93;hb=cbf0f87e496c9d9157591c94dc445aaa960fe79d;hpb=23e75650eba0491b2636de3cef87f893e38ae6f3 diff --git a/pv/view/viewitem.cpp b/pv/view/viewitem.cpp index 02a9c6a2..a63d4d38 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) { @@ -64,12 +64,30 @@ void ViewItem::drag_release() drag_point_ = QPoint(INT_MIN, INT_MIN); } +QRectF ViewItem::label_rect(const QRectF &rect) const +{ + (void)rect; + return QRectF(); +} + +QRectF ViewItem::hit_box_rect(const ViewItemPaintParams &pp) const +{ + (void)pp; + return QRectF(); +} + QMenu* ViewItem::create_context_menu(QWidget *parent) { context_parent_ = parent; return new QMenu(parent); } +widgets::Popup* ViewItem::create_popup(QWidget *parent) +{ + (void)parent; + return nullptr; +} + void ViewItem::delete_pressed() { } @@ -81,6 +99,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; @@ -101,7 +126,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