![]() |
VR-Forces 4.2 Class Documentation
|
As of Qt 4.4, QTimers no longer allow recursion. More...

Classes | |
| struct | TimerInfo |
Public Member Functions | |
| DtRecursiveTimer (QObject *parent=0) | |
| ~DtRecursiveTimer () | |
| int | start (QObject *object, int duration, bool singleShot=false) |
| Starts a timer. | |
| void | stop (int id) |
Private Slots | |
| void | onTimerInvoked () |
| Generates the QTimerEvents. | |
Private Attributes | |
| QMap< QTimer *, TimerInfo > | timers |
| int | counter |
As of Qt 4.4, QTimers no longer allow recursion.
This class is based on a work-around from TrollTech. It is used by DtTMApplication and DtVrf3DGuiApplication. It operates by posting new QTimerEvents to the QApplication's event queue. To receive the events derived classes must override QObject::timerEvent and check to see if the timerId matches the one returned by start(). If not, it should be passed down to the base class.
|
inline |
|
inline |
Starts a timer.
| object | the parent object, usually "this" |
| duration | counter time in miliseconds |
| singleShot | if true the timer will only fire once |
References DtRecursiveTimer::TimerInfo::id, DtRecursiveTimer::TimerInfo::object, and DtRecursiveTimer::TimerInfo::singleShot.
|
inline |
|
inlineprivateslot |
Generates the QTimerEvents.
|
private |
|
private |