QxtTimer Class Reference
[QxtCore module]
The QxtTimer class extends QTimer. More...
#include <QxtTimer>
Inherits QTimer.
Public Functions
- 6 public functions inherited from QTimer
- 29 public functions inherited from QObject
Static Public Members
- void singleShot ( int msec, QObject * receiver, const char * member, const QVariant & arg0, const QVariant & arg1 = QVariant(), const QVariant & arg2 = QVariant(), const QVariant & arg3 = QVariant(), const QVariant & arg4 = QVariant(), const QVariant & arg5 = QVariant(), const QVariant & arg6 = QVariant(), const QVariant & arg7 = QVariant(), const QVariant & arg8 = QVariant(), const QVariant & arg9 = QVariant() )
- 1 static public member inherited from QTimer
- 4 static public members inherited from QObject
Additional Inherited Members
- 3 properties inherited from QTimer
- 1 property inherited from QObject
- 3 public slots inherited from QTimer
- 1 public slot inherited from QObject
- 1 signal inherited from QTimer
- 1 signal inherited from QObject
- 1 public type inherited from QObject
- 7 protected functions inherited from QObject
- 2 protected variables inherited from QObject
Detailed Description
The QxtTimer class extends QTimer.
QxtTimer extends QTimer with capability to call a slot after with given parameters after a given time interval.
Example usage:
QxtTimer::singleShot(500, widget, SLOT(setWindowTitle(QString)), QString("Window Title"));
Member Function Documentation
QxtTimer::QxtTimer ( QObject * parent = 0 )
Constructs a new QxtTimer with parent.
QxtTimer::~QxtTimer () [virtual]
Destructs the timer.
void QxtTimer::singleShot ( int msec, QObject * receiver, const char * member, const QVariant & arg0, const QVariant & arg1 = QVariant(), const QVariant & arg2 = QVariant(), const QVariant & arg3 = QVariant(), const QVariant & arg4 = QVariant(), const QVariant & arg5 = QVariant(), const QVariant & arg6 = QVariant(), const QVariant & arg7 = QVariant(), const QVariant & arg8 = QVariant(), const QVariant & arg9 = QVariant() ) [static]
This static function calls a slot with given parameters after a given time interval.
It is very convenient to use this function because you do not need to bother with a timerEvent or create a local QTimer object.
You can pass up to ten arguments (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 and arg9).
The receiver is the receiving object and the member is the slot. The time interval is msec milliseconds.