const int ViewItem::HighlightRadius = 3;
ViewItem::ViewItem() :
- context_parent_(NULL),
+ context_parent_(nullptr),
drag_point_(INT_MIN, INT_MIN),
selected_(false)
{
drag_point_ = QPoint(INT_MIN, INT_MIN);
}
-QRectF ViewItem::hit_box_rect(const QRectF &rect) const
+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()
{
}
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;
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