X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fchatview.h;h=21367fe43293f2ac6d961fe15b4c151ce74ec988;hb=dbe74e993bcad57c15feb30d9bed30b6d43a3332;hp=cc627c766bb0fb928aab673e1bcfdc3240b40555;hpb=2684aa5295d12e4f7c66b3011fc8b1819f3d1cbb;p=quassel.git diff --git a/src/qtui/chatview.h b/src/qtui/chatview.h index cc627c76..21367fe4 100644 --- a/src/qtui/chatview.h +++ b/src/qtui/chatview.h @@ -18,8 +18,8 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#ifndef _CHATVIEW_H_ -#define _CHATVIEW_H_ +#ifndef CHATVIEW_H_ +#define CHATVIEW_H_ #include @@ -29,32 +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 &); - - private: - ChatScene *_scene; + ChatScene *_scene; }; + #endif