X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fbuffer.h;fp=src%2Fclient%2Fbuffer.h;h=fcf280508530c7f0e12d6895599da99a7d35b29c;hp=e862d5afa63b0a645925baf9a82c1349b0b971fd;hb=7795adca52f35204f8c354da6fcc5d8e8ee35531;hpb=0208d04a0b8c25f3c77727a68eef94ce2d608690 diff --git a/src/client/buffer.h b/src/client/buffer.h index e862d5af..fcf28050 100644 --- a/src/client/buffer.h +++ b/src/client/buffer.h @@ -22,6 +22,7 @@ #define _BUFFER_H_ class AbstractUiMsg; +class IrcChannel; struct BufferState; @@ -73,6 +74,13 @@ public: QString topic() const; QString ownNick() const; + //! Returns a pointer to the associated IrcChannel object for the buffer. + /** A buffer has an IrcChannel object only if it is a channel buffer + * (i.e. bufferType() == ChannelType), and if it is active at the moment. + * \returns A pointer to the associated IrcChannel object, if the buffer is a channel and online; 0 else. + */ + IrcChannel *ircChannel() const; + signals: void userInput(const BufferInfo &, QString); void nickListChanged(QVariantMap nicks); @@ -89,6 +97,7 @@ public slots: void appendMsg(const Message &); void prependMsg(const Message &); bool layoutMsg(); + void setIrcChannel(IrcChannel *chan = 0); // no longer needed // void setTopic(QString); @@ -106,6 +115,7 @@ private: bool _active; Type _type; BufferState *state; + IrcChannel *_ircChannel; QList layoutQueue; QList layoutedMsgs;