7#include <QtCore/qglobal.h>
11#include <QtCore/qbasictimer.h>
12#include <QtCore/qobject.h>
22 Q_PROPERTY(
bool singleShot READ isSingleShot WRITE setSingleShot BINDABLE bindableSingleShot)
23 Q_PROPERTY(
int interval READ interval WRITE setInterval BINDABLE bindableInterval)
24 Q_PROPERTY(
int remainingTime READ remainingTime)
35 void setInterval(
int msec);
39 int remainingTime()
const;
45 void setSingleShot(
bool singleShot);
46 bool isSingleShot()
const;
49 static void singleShot(
int msec,
const QObject *receiver,
const char *member);
50 static void singleShot(
int msec,
Qt::TimerType timerType,
const QObject *receiver,
const char *member);
53 template <
typename Duration,
typename Functor>
63 singleShot(interval, defaultTypeFor(interval), receiver, std::forward<Functor>(slot));
65 template <
typename Duration,
typename Functor>
74 using Prototype =
void(*)();
75 singleShotImpl(interval, timerType, receiver,
76 QtPrivate::makeCallableObject<Prototype>(std::forward<Functor>(slot)));
79 template <
typename Duration,
typename Functor>
82 singleShot(interval, defaultTypeFor(interval),
nullptr, std::forward<Functor>(slot));
84 template <
typename Duration,
typename Functor>
87 singleShot(interval, timerType,
nullptr, std::forward<Functor>(slot));
91 template <
typename Functor>
93 template <
typename Functor>
96 template <
typename ... Args>
105 void start(
int msec);
116 setInterval(
int(
value.count()));
121 return std::chrono::milliseconds(interval());
126 return std::chrono::milliseconds(remainingTime());
131 singleShot(
int(
value.count()), receiver, member);
136 singleShot(
int(
value.count()), timerType, receiver, member);
154 static constexpr Qt::TimerType defaultTypeFor(
int msecs)
noexcept
156 static void singleShotImpl(
int msec,
Qt::TimerType timerType,
159 static Qt::TimerType defaultTypeFor(std::chrono::milliseconds interval)
160 {
return defaultTypeFor(
int(interval.count())); }
162 static void singleShotImpl(std::chrono::milliseconds interval,
Qt::TimerType timerType,
165 singleShotImpl(
int(interval.count()),
166 timerType, receiver, slotObj);
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...
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
virtual void timerEvent(QTimerEvent *event)
This event handler can be reimplemented in a subclass to receive timer events for the object.
void killTimer(int id)
Kills the timer with timer identifier, id.
static void singleShot(Duration interval, Functor &&slot)
void start(std::chrono::milliseconds value)
std::chrono::milliseconds intervalAsDuration() const
static void singleShot(Duration interval, Qt::TimerType timerType, const typename QtPrivate::ContextTypeForFunctor< Functor >::ContextType *receiver, Functor &&slot)
void setInterval(std::chrono::milliseconds value)
static void singleShot(Duration interval, Qt::TimerType timerType, Functor &&slot)
static void singleShot(Duration interval, const typename QtPrivate::ContextTypeForFunctor< Functor >::ContextType *receiver, Functor &&slot)
static void singleShot(std::chrono::milliseconds value, const QObject *receiver, const char *member)
void timeout(QPrivateSignal)
This signal is emitted when the timer times out.
QMetaObject::Connection callOnTimeout(Args &&...args)
std::chrono::milliseconds remainingTimeAsDuration() const
static void singleShot(std::chrono::milliseconds value, Qt::TimerType timerType, const QObject *receiver, const char *member)
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
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent