Continuing my personal crusade against Buffer.
[quassel.git] / src / qtui / chatline.h
index 724be7d..15805cc 100644 (file)
@@ -35,6 +35,8 @@ class ChatLine : public QGraphicsItem {
 
   inline int row() { return _row; }
   inline void setRow(int row) { _row = row; }
+  inline const QAbstractItemModel *model() const { return chatScene() ? chatScene()->model() : 0; }
+  inline ChatScene *chatScene() const { return qobject_cast<ChatScene *>(scene()); }
     inline qreal width() const { return _width; }
     inline qreal height() const { return _height; }
     ChatItem &item(ChatLineModel::ColumnType);