X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fbuffer.h;h=746ba3dad10808fa25a2142e7515a88df4d51292;hp=fa2e4724e860a18fa8f01e333419a3f516d260ab;hb=8a3c3f283e33a9ae87b4b3bed94e676f12dd5d2e;hpb=a76b7bf7206e939b1503910825a3225119c89e8b diff --git a/src/client/buffer.h b/src/client/buffer.h index fa2e4724..746ba3da 100644 --- a/src/client/buffer.h +++ b/src/client/buffer.h @@ -22,6 +22,8 @@ #define _BUFFER_H_ class AbstractUiMsg; +class IrcChannel; +class NickModel; struct BufferState; @@ -61,12 +63,11 @@ public: BufferInfo bufferInfo() const; void updateBufferInfo(BufferInfo bufferid); - uint uid() const; - uint networkId() const; + BufferId uid() const; + NetworkId networkId() const; QString networkName() const; - QString bufferName() const; - QString displayName() const; + QString name() const; QList contents() const; @@ -74,6 +75,14 @@ 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; + NickModel *nickModel() const; + signals: void userInput(const BufferInfo &, QString); void nickListChanged(QVariantMap nicks); @@ -90,6 +99,7 @@ public slots: void appendMsg(const Message &); void prependMsg(const Message &); bool layoutMsg(); + void setIrcChannel(IrcChannel *chan = 0); // no longer needed // void setTopic(QString); @@ -107,6 +117,8 @@ private: bool _active; Type _type; BufferState *state; + QPointer _ircChannel; + QPointer _nickModel; QList layoutQueue; QList layoutedMsgs;