Chatline -> ChatLine
[quassel.git] / src / qtui / chatline.cpp
index e0f6d6a..71ed2c8 100644 (file)
 #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() {