X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.h;h=8701f697bbc84ba8790118dcfe7f31bc03af5d36;hp=beeb699ecee4c65abe63ec2bbc5a29d7b47a8158;hb=9ce42695baef3bdd6f61aaff23c4b59061e46fe6;hpb=d6b056e936ec441258d291b7a8af7b83f9f53016 diff --git a/src/qtui/chatscene.h b/src/qtui/chatscene.h index beeb699e..8701f697 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 * @@ -21,34 +21,48 @@ #ifndef _CHATSCENE_H_ #define _CHATSCENE_H_ +#include #include class AbstractUiMsg; class Buffer; +class ChatItem; class ChatLine; +class ColumnHandleItem; + class QGraphicsSceneMouseEvent; class ChatScene : public QGraphicsScene { Q_OBJECT public: - ChatScene(Buffer *buffer, QObject *parent); + ChatScene(QAbstractItemModel *model, const QString &idString, QObject *parent); virtual ~ChatScene(); Buffer *buffer() const; + inline QAbstractItemModel *model() const { return _model; } public slots: + void setWidth(qreal); - protected slots: - void appendMsg(AbstractUiMsg *msg); - void prependMsg(AbstractUiMsg *msg); + private slots: + void rectChanged(const QRectF &); + void handlePositionChanged(qreal xpos); - void mousePressEvent ( QGraphicsSceneMouseEvent * mouseEvent ); + signals: + void heightChanged(qreal height); + + protected slots: + void rowsInserted(const QModelIndex &, int, int); private: - Buffer *_buffer; - QList _lines; + QString _idString; + qreal _width, _height; + QAbstractItemModel *_model; + QList _lines; + ColumnHandleItem *firstColHandle, *secondColHandle; + qreal firstColHandlePos, secondColHandlePos; }; #endif