X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fchatview.h;h=21367fe43293f2ac6d961fe15b4c151ce74ec988;hb=dbe74e993bcad57c15feb30d9bed30b6d43a3332;hp=100b311b21bf09ccb2ad382b8857eabb8ff77436;hpb=99bb37d9938f3d88ce7551ded454146359fadc03;p=quassel.git diff --git a/src/qtui/chatview.h b/src/qtui/chatview.h index 100b311b..21367fe4 100644 --- a/src/qtui/chatview.h +++ b/src/qtui/chatview.h @@ -29,38 +29,33 @@ class AbstractUiMsg; class Buffer; class ChatLine; class ChatScene; +class MessageFilter; class ChatView : public QGraphicsView, public AbstractChatView { Q_OBJECT - public: - ChatView(Buffer *, QWidget *parent = 0); - ~ChatView(); +public: + ChatView(MessageFilter *, QWidget *parent = 0); + ChatView(BufferId bufferId, QWidget *parent = 0); - ChatScene *scene() const; + virtual MsgId lastMsgId() const; + inline ChatScene *scene() const { return _scene; } - public slots: +public slots: + inline virtual void clear() {} - void clear(); +protected: + virtual void resizeEvent(QResizeEvent *event); - void prependMsg(AbstractUiMsg *); - void appendMsg(AbstractUiMsg *); +protected slots: + virtual void sceneHeightChanged(qreal height); + virtual void verticalScrollbarChanged(int); + +private: + void init(MessageFilter *filter); - void prependChatLine(ChatLine *); - void appendChatLine(ChatLine *); - void prependChatLines(QList); - void appendChatLines(QList); - - void setContents(const QList &); - - protected: - virtual void resizeEvent(QResizeEvent *event); - - protected slots: - virtual void sceneHeightChanged(int height); - - private: - ChatScene *_scene; + ChatScene *_scene; }; + #endif