X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fabstractbuffercontainer.h;h=cb0e5026d836c896d3af66ef232ece5e0d6ef379;hb=2a7928256ace73ac40b89b8c327cf08815da882d;hp=d7278954947b731497ffb63448735db246aa93c3;hpb=2684aa5295d12e4f7c66b3011fc8b1819f3d1cbb;p=quassel.git diff --git a/src/uisupport/abstractbuffercontainer.h b/src/uisupport/abstractbuffercontainer.h index d7278954..cb0e5026 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,7 +60,7 @@ 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 *); @@ -73,9 +76,11 @@ class AbstractBufferContainer : public AbstractItemView { class AbstractChatView { public: + virtual ~AbstractChatView() {}; virtual void appendMsg(AbstractUiMsg *msg) = 0; virtual void prependMsg(AbstractUiMsg *msg) = 0; virtual void setContents(const QList &contents) = 0; + //virtual BufferId bufferId() const = 0; };