Communi  3.7.0
A cross-platform IRC framework written with Qt
Public Slots | Public Member Functions | List of all members
IrcChannel Class Reference

Keeps track of channel status. More...

Inherits IrcBuffer.

Public Slots

void close (const QString &reason=QString()) override
 
void join (const QString &key=QString())
 
void part (const QString &reason=QString())
 
void who ()
 
- Public Slots inherited from IrcBuffer
virtual void close (const QString &reason=QString())
 
void receiveMessage (IrcMessage *message)
 

Public Member Functions

Q_INVOKABLE IrcChannel (QObject *parent=nullptr)
 
 ~IrcChannel () override
 
IrcBufferclone (QObject *parent=nullptr) override
 
QString key () const
 
QString mode () const
 
QString topic () const
 
- Public Member Functions inherited from IrcBuffer
Q_INVOKABLE IrcBuffer (QObject *parent=nullptr)
 
 ~IrcBuffer () override
 
IrcConnectionconnection () const
 
IrcBufferModelmodel () const
 
QString name () const
 
IrcNetworknetwork () const
 
QString prefix () const
 
Q_INVOKABLE bool sendCommand (IrcCommand *command)
 
QString title () const
 
Q_INVOKABLE IrcChanneltoChannel ()
 
QVariantMap userData () const
 

Additional Inherited Members

- Signals inherited from IrcBuffer
void messageReceived (IrcMessage *message)
 
- Properties inherited from IrcBuffer
bool active
 
bool channel
 
bool persistent
 
bool sticky
 

Detailed Description

See also
IrcBufferModel

Constructor & Destructor Documentation

◆ IrcChannel()

IrcChannel::IrcChannel ( QObject *  parent = nullptr)
explicit

Constructs a new channel object with parent.

◆ ~IrcChannel()

IrcChannel::~IrcChannel ( )
override

Destructs the channel object.

Member Function Documentation

◆ clone()

IrcBuffer * IrcChannel::clone ( QObject *  parent = nullptr)
overridevirtual
Since
3.7

Clones the buffer with an optional parent.

Reimplemented from IrcBuffer.

◆ close

void IrcChannel::close ( const QString &  reason = QString())
overrideslot
Since
3.1

Closes the channel with an optional reason.

See also
IrcBuffer::close(), IrcChannel::part()

◆ join

void IrcChannel::join ( const QString &  key = QString())
slot
Since
3.1

Joins the channel with an optional key.

This method is provided for convenience. It is equal to:

IrcCommand* command = IrcCommand::createJoin(channel->title(), key);
channel->sendCommand(command);
bool channel
Definition: ircbuffer.h:59
Provides the most common commands.
Definition: irccommand.h:45
static Q_INVOKABLE IrcCommand * createJoin(const QString &channel, const QString &key=QString())
Definition: irccommand.cpp:572
See also
IrcBuffer::sendCommand(), IrcCommand::createJoin()

◆ key()

QString IrcChannel::key ( ) const
Since
3.1

This property holds the channel key.

Access function:
  • QString key() const
Notifier signal:
  • void keyChanged(const QString& key)

◆ mode()

QString IrcChannel::mode ( ) const

This property holds the complete channel mode including possible arguments.

Access function:
  • QString mode() const
Notifier signal:
  • void modeChanged(const QString& mode)

◆ part

void IrcChannel::part ( const QString &  reason = QString())
slot

Parts the channel with an optional reason.

This method is provided for convenience. It is equal to:

IrcCommand* command = IrcCommand::createPart(channel->title(), reason);
channel->sendCommand(command);
static Q_INVOKABLE IrcCommand * createPart(const QString &channel, const QString &reason=QString())
Definition: irccommand.cpp:748
See also
IrcBuffer::sendCommand(), IrcCommand::createPart()

◆ topic()

QString IrcChannel::topic ( ) const

This property holds the channel topic.

Access function:
  • QString topic() const
Notifier signal:
  • void topicChanged(const QString& topic)

◆ who

void IrcChannel::who ( )
slot
Since
3.3

Sends a who command to the channel.

This method is provided for convenience. It is equal to:

channel->sendCommand(command);
static Q_INVOKABLE IrcCommand * createWho(const QString &mask, bool operators=false)
Definition: irccommand.cpp:875
See also
IrcBuffer::sendCommand(), IrcCommand::createWho()