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