+public:
+ const QAbstractItemModel *model() const;
+ ChatLine *chatLine() const;
+ ChatScene *chatScene() const;
+ ChatView *chatView() const;
+ int row() const;
+ virtual ChatLineModel::ColumnType column() const = 0;
+
+ // The boundingRect() is relative to the parent ChatLine
+ inline QRectF boundingRect() const;
+ inline qreal width() const;
+ inline qreal height() const;
+ inline QPointF pos() const;
+ inline qreal x() const;
+ inline qreal y() const;
+
+ QPointF mapToLine(const QPointF &) const;
+ QPointF mapFromLine(const QPointF &) const;
+ QPointF mapToScene(const QPointF &) const;
+ QPointF mapFromScene(const QPointF &) const;
+
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+ virtual inline int type() const { return ChatScene::ChatItemType; }
+
+ QVariant data(int role) const;
+
+ // selection stuff, to be called by the scene
+ QString selection() const;
+ void clearSelection();
+ void setFullSelection();
+ void continueSelecting(const QPointF &pos);
+ bool hasSelection() const;
+ bool isPosOverSelection(const QPointF &pos) const;
+
+ QList<QRectF> findWords(const QString &searchWord, Qt::CaseSensitivity caseSensitive);
+
+ virtual void addActionsToMenu(QMenu *menu, const QPointF &itemPos);
+ virtual void handleClick(const QPointF &pos, ChatScene::ClickMode);
+
+ void initLayoutHelper(QTextLayout *layout, QTextOption::WrapMode, Qt::Alignment = Qt::AlignLeft) const;
+
+ //! Remove internally cached data
+ /** This removes e.g. the cached QTextLayout to avoid wasting space for nonvisible ChatLines
+ */
+ virtual void clearCache();