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=f7439137b8e59f6857dcb266784021b28c448cb9;hp=3cd6f6a7f6f2c1b10c30ecb06dabe995b08ff789;hb=50706d89d4d60e258ebb6873d3778383621898e4;hpb=fd7c2c4a41b5bb9cffcfe7a8f86a28ab7f38ac27 diff --git a/src/client/buffer.h b/src/client/buffer.h index 3cd6f6a7..f7439137 100644 --- a/src/client/buffer.h +++ b/src/client/buffer.h @@ -30,8 +30,6 @@ struct BufferState; #include "message.h" #include "bufferinfo.h" -#include - //!\brief Encapsulates the contents of a single channel, query or server status context. /** A Buffer maintains a list of existing nicks and their status. */ @@ -40,90 +38,31 @@ class Buffer : public QObject { public: Buffer(BufferInfo, QObject *parent = 0); - virtual ~Buffer(); - - enum Type { - StatusType, - ChannelType, - QueryType - }; - - enum Activity { - NoActivity = 0x00, - OtherActivity = 0x01, - NewMessage = 0x02, - Highlight = 0x40 - }; - Q_DECLARE_FLAGS(ActivityLevel, Activity) - - bool isStatusBuffer() const; - Type bufferType() const; - bool isActive() const; BufferInfo bufferInfo() const; - void updateBufferInfo(BufferInfo bufferid); - BufferId uid() const; - NetworkId networkId() const; - - QString networkName() const; - QString name() const; - QList contents() const; - QVariantMap nickList() const; - 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); - void topicSet(QString topic); - void ownNickSet(QString ownNick); - void bufferUpdated(Buffer *); void msgAppended(AbstractUiMsg *); void msgPrepended(AbstractUiMsg *); void layoutQueueEmpty(); public slots: - void setActive(bool active = true); void appendMsg(const Message &); void prependMsg(const Message &); bool layoutMsg(); - void setIrcChannel(IrcChannel *chan = 0); - - // no longer needed -// void setTopic(QString); -// //void setNicks(QStringList); -// void addNick(QString nick, QVariantMap props); -// void renameNick(QString oldnick, QString newnick); -// void removeNick(QString nick); -// void updateNick(QString nick, QVariantMap props); -// void setOwnNick(QString nick); void processUserInput(QString); private: BufferInfo _bufferInfo; - bool _active; - Type _type; - BufferState *state; - QPointer _ircChannel; - QPointer _nickModel; QList layoutQueue; QList layoutedMsgs; }; -Q_DECLARE_OPERATORS_FOR_FLAGS(Buffer::ActivityLevel) #endif