]> sigrok.org Git - pulseview.git/blobdiff - pv/view/viewitem.cpp
ViewItem: Added rect parameter to point()
[pulseview.git] / pv / view / viewitem.cpp
index 0d83ee846f01547f609c91fac8a8c85f4b566208..6917190a46dbd8e60554cc241219a2fc62de4743 100644 (file)
@@ -29,7 +29,8 @@
 namespace pv {
 namespace view {
 
-const int ViewItem::HighlightRadius = 6;
+const QSizeF ViewItem::LabelPadding(4, 0);
+const int ViewItem::HighlightRadius = 3;
 
 ViewItem::ViewItem() :
        context_parent_(NULL),
@@ -60,7 +61,7 @@ QPoint ViewItem::drag_point() const
 
 void ViewItem::drag()
 {
-       drag_point_ = point();
+       drag_point_ = point(QRect());
 }
 
 void ViewItem::drag_release()
@@ -81,10 +82,28 @@ void ViewItem::delete_pressed()
 QPen ViewItem::highlight_pen()
 {
        return QPen(QApplication::palette().brush(
-               QPalette::Highlight), HighlightRadius,
+               QPalette::Highlight), HighlightRadius * 2,
                Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
 }
 
+void ViewItem::paint_back(QPainter &p, const ViewItemPaintParams &pp)
+{
+       (void)p;
+       (void)pp;
+}
+
+void ViewItem::paint_mid(QPainter &p, const ViewItemPaintParams &pp)
+{
+       (void)p;
+       (void)pp;
+}
+
+void ViewItem::paint_fore(QPainter &p, const ViewItemPaintParams &pp)
+{
+       (void)p;
+       (void)pp;
+}
+
 QColor ViewItem::select_text_colour(QColor background)
 {
        return (background.lightness() > 64) ? Qt::black : Qt::white;