X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fuisupport%2Fabstractbuffercontainer.h;h=bf8a34c77b0258ea88212d453e7dcebb298d19d7;hb=e1b6d538b7c4cc279f9218614e23adb5d8a81fe5;hp=245f38d263bd88087618762c1f2c8f011b1068e1;hpb=869b85ff258185c7b1b3e7695db72e74f9cb176c;p=quassel.git diff --git a/src/uisupport/abstractbuffercontainer.h b/src/uisupport/abstractbuffercontainer.h index 245f38d2..bf8a34c7 100644 --- a/src/uisupport/abstractbuffercontainer.h +++ b/src/uisupport/abstractbuffercontainer.h @@ -37,6 +37,9 @@ class AbstractBufferContainer : public AbstractItemView { inline BufferId currentBuffer() const { return _currentBuffer; } + signals: + void currentChanged(BufferId); + protected: //! Create an AbstractChatView for the given BufferId and add it to the UI if necessary virtual AbstractChatView *createChatView(BufferId) = 0; @@ -46,7 +49,7 @@ class AbstractBufferContainer : public AbstractItemView { * It also shall delete the object afterwards. * \param view The chat view to be removed and deleted */ - virtual void removeChatView(AbstractChatView *view) = 0; + virtual void removeChatView(BufferId) = 0; protected slots: virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous); @@ -57,11 +60,9 @@ class AbstractBufferContainer : public AbstractItemView { * selecting the appropriate page in a QStackedWidget. * \param view The chat view to be displayed. May be 0 if no chat view is selected. */ - virtual void showChatView(AbstractChatView *view) = 0; + virtual void showChatView(BufferId) = 0; private slots: - void appendMsg(AbstractUiMsg *); - void prependMsg(AbstractUiMsg *); void removeBuffer(BufferId bufferId); void setCurrentBuffer(BufferId bufferId); @@ -73,10 +74,7 @@ class AbstractBufferContainer : public AbstractItemView { class AbstractChatView { public: - virtual ~AbstractChatView() = 0; - virtual void appendMsg(AbstractUiMsg *msg) = 0; - virtual void prependMsg(AbstractUiMsg *msg) = 0; - virtual void setContents(const QList &contents) = 0; + virtual ~AbstractChatView() {}; };