X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.h;h=fd72010670ece4e05d44a015e4831df34c333355;hp=beeb699ecee4c65abe63ec2bbc5a29d7b47a8158;hb=da2b5b2e4e2b0ea1847a0a5f0cb4a3752fc655c9;hpb=d6b056e936ec441258d291b7a8af7b83f9f53016 diff --git a/src/qtui/chatscene.h b/src/qtui/chatscene.h index beeb699e..fd720106 100644 --- a/src/qtui/chatscene.h +++ b/src/qtui/chatscene.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-07 by the Quassel IRC Team * + * Copyright (C) 2005-08 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -23,8 +23,11 @@ #include +#include "messagemodel.h" + class AbstractUiMsg; class Buffer; +class ChatItem; class ChatLine; class QGraphicsSceneMouseEvent; @@ -32,22 +35,24 @@ class ChatScene : public QGraphicsScene { Q_OBJECT public: - ChatScene(Buffer *buffer, QObject *parent); + ChatScene(MessageModel *model, QObject *parent); virtual ~ChatScene(); Buffer *buffer() const; + inline MessageModel *model() const { return _model; } public slots: + void setWidth(int); protected slots: - void appendMsg(AbstractUiMsg *msg); - void prependMsg(AbstractUiMsg *msg); - + void rowsInserted(const QModelIndex &, int, int); void mousePressEvent ( QGraphicsSceneMouseEvent * mouseEvent ); private: - Buffer *_buffer; - QList _lines; + int _width, _height; + int _timestampWidth, _senderWidth; + MessageModel *_model; + QList _lines; };