23 #ifndef __IRCCHATADAPTER_H__ 24 #define __IRCCHATADAPTER_H__ 26 #include "irc/ircadapterbase.h" 27 #include <QStringList> 73 virtual void emitChatMessage(
const QString &sender,
const QString &content);
77 return this->pNetwork;
80 QString recipient()
const override 82 return this->recipientName;
94 QString
title()
const override;
100 virtual void userChangesNickname(
const QString &oldNickname,
const QString &newNickname) = 0;
105 virtual void userJoins(
const QString &nickname,
const QString &fullSignature) = 0;
110 virtual void userLeaves(
const QString &nickname,
const QString &farewellMessage, IRCQuitType quitType) = 0;
116 const QList<char> &addedFlags,
const QList<char> &removedFlags) = 0;
120 QString recipientName;
132 void sendChatMessage(
const QString &message);
133 void setRecipient(
const QString &name);
Interprets communication between the client and the IRC server.
void setNetwork(IRCNetworkAdapter *pNetwork)
Sets IRCNetworkAdapter for this chat window. This adapter is not detached from the old network...
Provides an unified communication interface between a client and IRC network entities.
virtual void emitChatMessage(const QString &sender, const QString &content)
Emits message() signal formatting it to present sender's message.
QString title() const override
For chat adapters this will return recipientName.
Handles chatting through IRC.
virtual void userModeChanges(const QString &nickname, const QList< char > &addedFlags, const QList< char > &removedFlags)=0
Use this to register the fact that user MODE flags have changed.
virtual void userChangesNickname(const QString &oldNickname, const QString &newNickname)=0
Use this to register the fact that user has changed his/hers nickname.
IRCChatAdapter(IRCNetworkAdapter *pNetwork, const QString &recipient)
virtual void userJoins(const QString &nickname, const QString &fullSignature)=0
Use this to register the fact that user has joined the chat.
IRCNetworkAdapter * network() override
The idea of the adapter system is that each adapter is either a network or is a child of a network...
QString extractMessageLine(QStringList &words, int maxLength)
void doSendMessage(const QString &message, IRCAdapterBase *pOrigin) override
virtual void userLeaves(const QString &nickname, const QString &farewellMessage, IRCQuitType quitType)=0
Use this to register the fact that user has left the chat.