X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fbuffer.h;h=f7439137b8e59f6857dcb266784021b28c448cb9;hp=3465e5f282ccacb4ca807e40028fd9baea8bf811;hb=2a04cb443a50e37165fc2d5447cc705a813efd3e;hpb=902c95728306e5ba115de84800fc8d5d239c9d62 diff --git a/src/client/buffer.h b/src/client/buffer.h index 3465e5f2..f7439137 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 * @@ -22,14 +22,14 @@ #define _BUFFER_H_ 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. */ @@ -38,80 +38,31 @@ class Buffer : public QObject { public: Buffer(BufferInfo, QObject *parent = 0); - ~Buffer(); - - enum Type { - ServerBuffer, - ChannelBuffer, - QueryBuffer - }; - - 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); - - uint networkId() const; - - QString networkName() const; - QString bufferName() const; - QString displayName() 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 bufferDestroyed(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