267 if (
id >=0 &&
nulltimer && !msec && sshot)
347 #include "qtimer.moc" 375 if (receiver && member) {
378 const char* bracketPosition = strchr(member,
'(');
379 if (!bracketPosition || !(member[0] >=
'0' && member[0] <=
'3')) {
380 qWarning(
"QTimer::singleShot: Invalid slot specification");
void timerEvent(QTimerEvent *)
Reimplemented Function
int startTimer(int interval)
Starts a timer and returns a timer identifier, or returns zero if it could not start a timer...
void setSingleShot(bool singleShot)
#define QT_END_NAMESPACE
This macro expands to.
static QString fromAscii(const char *, int size=-1)
Returns a QString initialized with the first size characters from the string str. ...
QSingleShotTimer(int msec, QObject *r, const char *m)
The QByteArray class provides an array of bytes.
#define QT_END_INCLUDE_NAMESPACE
This macro is equivalent to QT_BEGIN_NAMESPACE.
The QObject class is the base class of all Qt objects.
QTimer(QObject *parent=0)
Constructs a timer with the given parent.
void setObjectName(const QString &name)
#define QT_BEGIN_NAMESPACE
This macro expands to.
int timerId() const
Returns the ID of the timer if the timer is running; otherwise returns -1.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Q_CORE_EXPORT void qWarning(const char *,...)
void timerEvent(QTimerEvent *)
This event handler can be reimplemented in a subclass to receive timer events for the object...
int timerId() const
Returns the unique timer identifier, which is the same identifier as returned from QObject::startTime...
void timeout()
This signal is emitted when the timer times out.
static const int INV_TIMER
void setInterval(int msec)
const char * constData() const
Returns a pointer to the data stored in the byte array.
void qDeleteInEventHandler(QObject *o)
The QTimerEvent class contains parameters that describe a timer event.
~QTimer()
Destroys the timer.
Q_INVOKABLE QObject(QObject *parent=0)
Constructs an object with parent object parent.
QObject * parent() const
Returns a pointer to the parent object.
bool singleShot
This static function calls a slot after a given time interval.
static QByteArray methodName(const char *signature, int nameLength)
Makes a deep copy of the first nameLength characters of the given method signature and returns the co...
#define QT_BEGIN_INCLUDE_NAMESPACE
This macro is equivalent to QT_END_NAMESPACE.
void stop()
Stops the timer.
The QAbstractEventDispatcher class provides an interface to manage Qt's event queue.
void killTimer(int id)
Kills the timer with timer identifier, id.