X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.h;h=daabba7fc0d1b38559d812da77c01dd5c8c1327d;hp=4dc415b7153d3e237f8fe80e0d06103fc96618d2;hb=39e2a78383295f86c5aa2dadbeac6f02b53eb7a4;hpb=8699dd758516d0ded076811e8ea656adc95e69d0 diff --git a/src/qtui/chatscene.h b/src/qtui/chatscene.h index 4dc415b7..daabba7f 100644 --- a/src/qtui/chatscene.h +++ b/src/qtui/chatscene.h @@ -21,34 +21,47 @@ #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, 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 mousePressEvent ( QGraphicsSceneMouseEvent * mouseEvent ); + signals: + void heightChanged(qreal height); + + protected slots: + void rowsInserted(const QModelIndex &, int, int); + void mousePressEvent(QGraphicsSceneMouseEvent * mouseEvent); private: - Buffer *_buffer; - QList _lines; + qreal _width, _height; + QAbstractItemModel *_model; + QList _lines; + ColumnHandleItem *firstColHandle, *secondColHandle; + qreal firstColHandlePos, secondColHandlePos; }; #endif