|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QBasicTimer
public class QBasicTimer
The QBasicTimer
class provides timer events for objects. This is a fast, lightweight, and low-level class used by Qt internally. We recommend using the higher-level QTimer
class rather than this class if you want to use timers in your applications.
To use this class, create a QBasicTimer
, and call its start()
function with a timeout interval and with a pointer to a QObject
subclass. When the timer times out it will send a timer event to the QObject
subclass. The timer can be stopped at any time using stop()
. isActive()
returns true for a timer that is running; i.e. it has been started, has not reached the timeout time, and has not been stopped. The timer's ID can be retrieved using timerId()
.
The Wiggly example uses QBasicTimer
to repaint a widget at regular intervals.
QTimer
, QTimerEvent
, QObject::timerEvent()
, Timers, and Wiggly Example.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Field Summary |
---|
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
currentSender |
Constructor Summary | |
---|---|
QBasicTimer()
Contructs a basic timer. |
Method Summary | |
---|---|
QBasicTimer |
clone()
This method is reimplemented for internal reasons |
boolean |
isActive()
Returns true if the timer is running, has not yet timed out, and has not been stopped; otherwise returns false. |
void |
start(int msec,
QObject obj)
Starts (or restarts) the timer with a msec milliseconds timeout. |
void |
stop()
Stops the timer. |
int |
timerId()
Returns the timer's ID. |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
__qt_signalInitialization |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QBasicTimer()
start()
.
Method Detail |
---|
public final boolean isActive()
start()
, and stop()
.
public final void start(int msec, QObject obj)
The given object will receive timer events.
stop()
, isActive()
, and QObject::timerEvent()
.
public final void stop()
start()
, and isActive()
.
public final int timerId()
QTimerEvent::timerId()
.
public QBasicTimer clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |