158 return d_func()->isActiveData.value();
193 d->isActiveData.notify();
211 const bool intervalChanged = msec !=
d->inter;
212 d->inter.setValue(msec);
232 d->isActiveData.notify();
243 if (
e->timerId() ==
d->id) {
313 timerId =
startTimer(std::chrono::milliseconds{msec}, timerType);
346void QTimer::singleShotImpl(
int msec,
Qt::TimerType timerType,
351 bool deleteReceiver =
false;
362 }
else if (!receiver) {
366 deleteReceiver =
true;
369 QMetaObject::invokeMethodImpl(
const_cast<QObject *
>(receiver), slotObj,
425 qWarning(
"QTimer::singleShot: Timers cannot have negative timeouts");
428 if (receiver && member) {
431 const char* bracketPosition = strchr(member,
'(');
432 if (!bracketPosition || !(member[0] >=
'0' && member[0] <=
'2')) {
433 qWarning(
"QTimer::singleShot: Invalid slot specification");
587 return d_func()->single;
610 const bool intervalChanged = msec !=
d->inter;
611 d->inter.setValue(msec);
624 return d_func()->inter;
663 d_func()->type = atype;
668 return d_func()->type;
679#include "moc_qtimer.cpp"
static QAbstractEventDispatcher * instance(QThread *thread=nullptr)
Returns a pointer to the event dispatcher object for the specified thread.
virtual int remainingTime(int timerId)=0
Returns the remaining time in milliseconds with the given timerId.
static QThread * mainThread()
static QCoreApplication * instance() noexcept
Returns a pointer to the application's QCoreApplication (or QGuiApplication/QApplication) instance.
void aboutToQuit(QPrivateSignal)
This signal is emitted when the application is about to quit the main event loop, e....
bool hasExpired() const noexcept
Returns true if this QDeadlineTimer object has expired, false if there remains time left.
qint64 remainingTime() const noexcept
Returns the remaining time in this QDeadlineTimer object in milliseconds.
static QMetaObject::Connection connectImpl(const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject)
int startTimer(int interval, Qt::TimerType timerType=Qt::CoarseTimer)
This is an overloaded function that will start a timer of type timerType and a timeout of interval mi...
void moveToThread(QThread *thread)
Changes the thread affinity for this object and its children.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
void setParent(QObject *parent)
Makes the object a child of parent.
QThread * thread() const
Returns the thread in which the object lives.
void killTimer(int id)
Kills the timer with timer identifier, id.
void deleteLater()
\threadsafe
void startTimerForReceiver(int msec, Qt::TimerType timerType, const QObject *receiver)
QSingleShotTimer(int msec, Qt::TimerType timerType, const QObject *r, const char *m)
void timerEvent(QTimerEvent *) override
This event handler can be reimplemented in a subclass to receive timer events for the object.
const QChar * constData() const
Returns a pointer to the data stored in the QString.
static QThread * currentThread()
static constexpr int INV_TIMER
QTimer(QObject *parent=nullptr)
Constructs a timer with the given parent.
void setSingleShot(bool singleShot)
void timerEvent(QTimerEvent *) override
\reimp
bool isSingleShot() const
void start(int msec)
Starts or restarts the timer with a timeout interval of msec milliseconds.
int interval
the timeout interval in milliseconds
int remainingTime
the remaining time in milliseconds
Qt::TimerType timerType
controls the accuracy of the timer
void setInterval(int msec)
QBindable< Qt::TimerType > bindableTimerType()
int timerId() const
Returns the ID of the timer if the timer is running; otherwise returns -1.
bool isActive() const
Returns true if the timer is running (pending); otherwise returns false.
bool singleShot
whether the timer is a single-shot timer
QBindable< int > bindableInterval()
QBindable< bool > bindableActive()
void stop()
Stops the timer.
void timeout(QPrivateSignal)
This signal is emitted when the timer times out.
QBindable< bool > bindableSingleShot()
~QTimer()
Destroys the timer.
void setTimerType(Qt::TimerType atype)
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
static QString methodName(const QDBusIntrospection::Method &method)
void qDeleteInEventHandler(QObject *o)
GLbitfield GLuint64 timeout
[4]
QDeadlineTimer deadline(30s)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent