X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatitem.h;h=b58dc032ed96662b20883dc8e8527eacb6745ef5;hp=2b7ac8a382fa6dffcaf80f7582dcc3665d7fc916;hb=0b9f74984780aacbe85ca04c44ec6304c86557c2;hpb=cc7f376eb105f7bf931fb7f96c9601a7b3f69511 diff --git a/src/qtui/chatitem.h b/src/qtui/chatitem.h index 2b7ac8a3..b58dc032 100644 --- a/src/qtui/chatitem.h +++ b/src/qtui/chatitem.h @@ -22,27 +22,26 @@ #define _CHATITEM_H_ #include -#include #include #include -#include "messagemodel.h" +#include "chatline.h" +#include "chatlinemodel.h" #include "uistyle.h" -class QGraphicsSceneMouseEvent; - class ChatItem : public QGraphicsItem { public: - ChatItem(const QPersistentModelIndex &index, QGraphicsItem *parent = 0); + ChatItem(const QPersistentModelIndex &index, QGraphicsItem *parent); virtual ~ChatItem(); + inline QPersistentModelIndex index() const { return _index; } + inline const MessageModel *model() const { return _index.isValid() ? qobject_cast(_index.model()) : 0; } + inline int row() const { return _index.isValid() ? _index.row() : 0; } + virtual QRectF boundingRect() const; virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); - inline QPersistentModelIndex persistentIndex() const { return _index; } - inline const MessageModel *model() const { return _index.isValid() ? qobject_cast(_index.model()) : 0; } - inline int row() const { return _index.isValid() ? _index.row() : 0; } virtual QVariant data(int role) const; //QString text() const; //void setText(const UiStyle::StyledText &text);