|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I> |
Constructor Summary | |
---|---|
QBasicTimer()
Contructs a basic timer. |
Method Summary | |
---|---|
static QBasicTimer |
fromNativePointer(QNativePointer nativePointer)
This function returns the QBasicTimer instance pointed to by nativePointer |
boolean |
isActive()
Returns true if the timer is running, has not yet timed out, and has not been stopped; otherwise returns false. |
static QNativePointer |
nativePointerArray(QBasicTimer[] array)
This function returns a QNativePointer that is pointing to the specified QBasicTimer array. |
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, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class java.lang.Object |
---|
clone, equals, 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()
Contructs a basic timer.
Method Detail |
---|
public final boolean isActive()
Returns true if the timer is running, has not yet timed out, and has not been stopped; otherwise returns false.
public final void start(int msec, QObject obj)
Starts (or restarts) the timer with a msec milliseconds timeout.
The given obj will receive timer events.
public final void stop()
Stops the timer.
public final int timerId()
Returns the timer's ID.
public static QBasicTimer fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.public static QNativePointer nativePointerArray(QBasicTimer[] array)
array
- the array that the returned pointer will point to.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |