X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.h;h=a0bcefc015fa171e72408116cd9c4a03f675f8af;hp=0963afacfdc1c7ac65c1584b734a98056edfdde9;hb=99bb37d9938f3d88ce7551ded454146359fadc03;hpb=70706ff642683d03ff091cab25d984ec7d9612de diff --git a/src/qtui/chatscene.h b/src/qtui/chatscene.h index 0963afac..a0bcefc0 100644 --- a/src/qtui/chatscene.h +++ b/src/qtui/chatscene.h @@ -1,11 +1,11 @@ /*************************************************************************** - * 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 * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * + * (at your option) version 3. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -23,8 +23,11 @@ #include +#include "messagemodel.h" + class AbstractUiMsg; class Buffer; +class ChatItem; class ChatLine; class QGraphicsSceneMouseEvent; @@ -32,22 +35,27 @@ 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); + signals: + void heightChanged(int height); + protected slots: + 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; };