Communi  3.5.0
A cross-platform IRC framework written with Qt
Public Slots | Signals | Public Member Functions | Properties | List of all members
IrcCommandQueue Class Reference

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

Inherits QObject.

Public Slots

void clear ()
 
void flush ()
 

Signals

void sizeChanged (int size)
 

Public Member Functions

 IrcCommandQueue (QObject *parent=0)
 
virtual ~IrcCommandQueue ()
 

Properties

int batch
 
IrcConnection connection
 
int interval
 
int size
 

Detailed Description

Since
3.4

Constructor & Destructor Documentation

IrcCommandQueue::IrcCommandQueue ( QObject parent = 0)
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 ( )
virtual

Destructs the command queue.

Member Function Documentation

void IrcCommandQueue::clear ( )
slot

This methods clears the command queue.

Note
Any queued commands are not sent.
See also
flush()
void IrcCommandQueue::flush ( )
slot

This methods flushes the whole command queue without batching.

void IrcCommandQueue::sizeChanged ( int  size)
signal

This signal is emitted when the queue size has changed.

Property Documentation

int IrcCommandQueue::batch
readwrite

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)
IrcConnection * IrcCommandQueue::connection
readwrite

This property holds the associated connection.

Access functions:
  • IrcConnection* connection() const
  • void setConnection(IrcConnection* connection)
int IrcCommandQueue::interval
readwrite

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)
int IrcCommandQueue::size
read

This property holds the current size of the queue.

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