Communi  3.7.0
A cross-platform IRC framework written with Qt
Loading...
Searching...
No Matches
IrcCommandQueue Class Reference

Provides a flood protection queue for commands. More...

#include <IrcCommandQueue>

Public Slots

void clear ()
 
void flush ()
 

Signals

void sizeChanged (int size)
 

Public Member Functions

 IrcCommandQueue (QObject *parent=nullptr)
 
 ~IrcCommandQueue () override
 
int batch () const
 
IrcConnectionconnection () const
 
int interval () const
 
int size () const
 

Detailed Description

Since
3.4

Constructor & Destructor Documentation

◆ IrcCommandQueue()

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

Constructs a new command queue with parent.

Note
If parent is an instance of IrcConnection, it will be automatically assigned to connection.

◆ ~IrcCommandQueue()

IrcCommandQueue::~IrcCommandQueue ( )
override

Destructs the command queue.

Member Function Documentation

◆ batch()

int IrcCommandQueue::batch ( ) const

This property holds the batch size.

This is the amount of commands sent at once. The default value is 3.

Access functions:
  • int batch() const
  • void setBatch(int batch)

◆ clear

void IrcCommandQueue::clear ( )
slot

This methods clears the command queue.

Note
Any queued commands are not sent.
See also
flush()

◆ connection()

IrcConnection * IrcCommandQueue::connection ( ) const

This property holds the associated connection.

Access functions:
  • IrcConnection* connection() const
  • void setConnection(IrcConnection* connection)

◆ flush

void IrcCommandQueue::flush ( )
slot

This methods flushes the whole command queue without batching.

◆ interval()

int IrcCommandQueue::interval ( ) const

This property holds the queue processing interval in seconds.

The default value is 2 seconds. A value equal to or less than 0 seconds disables command queueing.

Access functions:
  • int interval() const
  • void setInterval(int seconds)

◆ size()

int IrcCommandQueue::size ( ) const

This property holds the current size of the queue.

Access function:
  • int size() const
Notifier signal:
  • void sizeChanged(int size)

◆ sizeChanged

void IrcCommandQueue::sizeChanged ( int size)
signal

This signal is emitted when the queue size has changed.