-QVariant Chatline::data(int column, int role) const {
- switch(role) {
- case ChatlineModel::DisplayRole:
- switch(column) {
- case ChatlineModel::TimestampColumn: return _msg.timestamp.text;
- case ChatlineModel::SenderColumn: return _msg.sender.text;
- case ChatlineModel::TextColumn: return _msg.text.text;
- }
- break;
- case ChatlineModel::FormatRole:
- switch(column) {
- case ChatlineModel::TimestampColumn: return QVariant::fromValue<UiStyle::FormatList>(_msg.timestamp.formats);
- case ChatlineModel::SenderColumn: return QVariant::fromValue<UiStyle::FormatList>(_msg.sender.formats);
- case ChatlineModel::TextColumn: return QVariant::fromValue<UiStyle::FormatList>(_msg.text.formats);
- }
- break;
- }
- return MessageItem::data(column, role);
+ _senderItem->setPos(firstHandlePos + firstsep, 0);
+ _contentsItem->setPos(secondHandlePos + secondsep, 0);
+
+ _width = width;
+ return _height;