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

Provides a timer for measuring lag. More...

Inherits QObject.

Signals

void lagChanged (qint64 lag)
 

Public Member Functions

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

Properties

IrcConnection connection
 
int interval
 
qint64 lag
 

Detailed Description

Note
IrcLagTimer relies on functionality introduced in Qt 4.7.0, and is therefore not functional when built against earlier versions of Qt.

Constructor & Destructor Documentation

IrcLagTimer::IrcLagTimer ( QObject parent = 0)
explicit

Constructs a new lag timer with parent.

Note
If parent is an instance of IrcConnection, it will be automatically assigned to connection.
IrcLagTimer::~IrcLagTimer ( )
virtual

Destructs the lag timer.

Member Function Documentation

void IrcLagTimer::lagChanged ( qint64  lag)
signal

This signal is emitted when the lag has changed.

Property Documentation

IrcConnection * IrcLagTimer::connection
readwrite

This property holds the associated connection.

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

This property holds the lag measurement interval in seconds.

The default value is 60 seconds. A value equal to or less than 0 seconds disables the lag measurement.

Access functions:
  • int interval() const
  • void setInterval(int seconds)
qint64 IrcLagTimer::lag
read

This property holds the current lag in milliseconds.

The value is -1 when

  • the connection is not connected,
  • the lag has not yet been measured,
  • the lag timer is disabled (interval <= 0s), or
  • the Qt version is too old (4.7.0 or later is required).
Access function:
  • qint64 lag() const
Notifier signal:
  • void lagChanged(qint64 lag)