X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatline.cpp;h=71ed2c8d53524e817f837d0b347c1c30f6f809a6;hp=e0f6d6a9f9d523f26d97550e9e1fa9143f3b6007;hb=1817c8c8e2437d8aadcc1f07195fa4555cb1c17c;hpb=dd90a17f0cbafb646e1916d9b8a1f048331f3111 diff --git a/src/qtui/chatline.cpp b/src/qtui/chatline.cpp index e0f6d6a9..71ed2c8d 100644 --- a/src/qtui/chatline.cpp +++ b/src/qtui/chatline.cpp @@ -27,8 +27,13 @@ #include "chatline.h" #include "qtui.h" -ChatLine::ChatLine(const QPersistentModelIndex &index_, QGraphicsItem *parent) : QGraphicsItem(parent), _index(index_) { +ChatLine::ChatLine(const QModelIndex &index, QGraphicsItem *parent) : QGraphicsItem(parent) { + _timestampItem = new ChatItem(QPersistentModelIndex(index.sibling(index.row(), ChatLineModel::TimestampColumn)), this); + _senderItem = new ChatItem(QPersistentModelIndex(index.sibling(index.row(), ChatLineModel::SenderColumn)), this); + _contentsItem = new ChatItem(QPersistentModelIndex(index.sibling(index.row(), ChatLineModel::ContentsColumn)), this); + _senderItem->setPos(80, 0); + _contentsItem->setPos(160, 0); } ChatLine::~ChatLine() {