Added very basic sharing functionality.
[grr] / src / entrieswindow.cpp
index 7106aab..02192bc 100644 (file)
@@ -123,7 +123,7 @@ void EntryListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opt
        QRect rect = option.rect;
        rect.adjust(20, 8, -20, -8);
        QPoint topleft = rect.topLeft();
-       topleft.ry() += 2;
+       QPoint bottomleft = rect.bottomLeft();
        rect.adjust(36, 0, 0, 0);
 
        painter->save();
@@ -154,6 +154,12 @@ void EntryListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opt
                painter->drawImage(topleft, img);
        }
 
+       if(e->flags & ENTRY_FLAG_SHARED) {
+               QImage img = QImage(QLatin1String(":/images/shared-1"));
+               bottomleft.ry() -= img.height();
+               painter->drawImage(bottomleft, img);
+       }
+
        painter->restore();
 }