X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fclient%2Fbuffer.h;h=84f34a3994e9ab2ffcfde87010e108c484620ac7;hb=aa49f1a8d52fb95920c7b686ea2c7ae5c1532d87;hp=e862d5afa63b0a645925baf9a82c1349b0b971fd;hpb=70706ff642683d03ff091cab25d984ec7d9612de;p=quassel.git diff --git a/src/client/buffer.h b/src/client/buffer.h index e862d5af..84f34a39 100644 --- a/src/client/buffer.h +++ b/src/client/buffer.h @@ -1,11 +1,11 @@ /*************************************************************************** - * Copyright (C) 2005-07 by The Quassel Team * + * Copyright (C) 2005-08 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * + * (at your option) version 3. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -21,31 +21,23 @@ #ifndef _BUFFER_H_ #define _BUFFER_H_ +#include + class AbstractUiMsg; +class IrcChannel; +class NickModel; 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. +/** */ class Buffer : public QObject { Q_OBJECT public: - Buffer(BufferInfo, QObject *parent = 0); - virtual ~Buffer(); - - enum Type { - StatusType, - ChannelType, - QueryType - }; - enum Activity { NoActivity = 0x00, OtherActivity = 0x01, @@ -54,63 +46,14 @@ public: }; Q_DECLARE_FLAGS(ActivityLevel, Activity) - bool isStatusBuffer() const; - Type bufferType() const; - bool isActive() const; + Buffer(BufferInfo, QObject *parent = 0); 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; - -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(); - - // 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; - - QList layoutQueue; - QList layoutedMsgs; - }; + Q_DECLARE_OPERATORS_FOR_FLAGS(Buffer::ActivityLevel) #endif