Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QTimerInfoList Class Reference

#include <qtimerinfo_unix_p.h>

+ Inheritance diagram for QTimerInfoList:
+ Collaboration diagram for QTimerInfoList:

Public Member Functions

 QTimerInfoList ()
 
bool timerWait (timespec &)
 
void timerInsert (QTimerInfo *)
 
qint64 timerRemainingTime (int timerId)
 
std::chrono::milliseconds remainingDuration (int timerId)
 
void registerTimer (int timerId, qint64 interval, Qt::TimerType timerType, QObject *object)
 
void registerTimer (int timerId, std::chrono::milliseconds interval, Qt::TimerType timerType, QObject *object)
 
bool unregisterTimer (int timerId)
 
bool unregisterTimers (QObject *object)
 
QList< QAbstractEventDispatcher::TimerInforegisteredTimers (QObject *object) const
 
int activateTimers ()
 
bool hasPendingTimers ()
 
QList::const_iterator findTimerById (int timerId) const
 
- Public Member Functions inherited from QList< QTimerInfo * >
 QList (DataPointer dd) noexcept
 
 QList ()=default
 
 QList (qsizetype size)
 
 QList (qsizetype size, parameter_type t)
 
 QList (std::initializer_list< QTimerInfo * > args)
 
 QList (InputIterator i1, InputIterator i2)
 
 QList (const String &str)
 
QList< QTimerInfo * > & operator= (std::initializer_list< QTimerInfo * > args)
 
void swap (QList &other) noexcept
 
QTypeTraits::compare_eq_result_container< QList, U > operator== (const QList &other) const
 
QTypeTraits::compare_eq_result_container< QList, U > operator!= (const QList &other) const
 
QTypeTraits::compare_lt_result_container< QList, U > operator< (const QList &other) const noexcept(noexcept(std::lexicographical_compare< typename QList< U >::const_iterator, typename QList::const_iterator >(std::declval< QList< U > >().begin(), std::declval< QList< U > >().end(), other.begin(), other.end())))
 
QTypeTraits::compare_lt_result_container< QList, U > operator> (const QList &other) const noexcept(noexcept(other< std::declval< QList< U > >()))
 
QTypeTraits::compare_lt_result_container< QList, U > operator<= (const QList &other) const noexcept(noexcept(other< std::declval< QList< U > >()))
 
QTypeTraits::compare_lt_result_container< QList, U > operator>= (const QList &other) const noexcept(noexcept(std::declval< QList< U > >()< other))
 
qsizetype size () const noexcept
 
qsizetype count () const noexcept
 
qsizetype count (const AT &t) const noexcept
 
qsizetype length () const noexcept
 
bool isEmpty () const noexcept
 
void resize (qsizetype size)
 
void resize (qsizetype size, parameter_type c)
 
qsizetype capacity () const
 
void reserve (qsizetype size)
 
void squeeze ()
 
void detach ()
 
bool isDetached () const noexcept
 
bool isSharedWith (const QList< QTimerInfo * > &other) const
 
pointer data ()
 
const_pointer data () const noexcept
 
const_pointer constData () const noexcept
 
void clear ()
 
const_reference at (qsizetype i) const noexcept
 
reference operator[] (qsizetype i)
 
const_reference operator[] (qsizetype i) const noexcept
 
void append (parameter_type t)
 
void append (const_iterator i1, const_iterator i2)
 
void append (rvalue_ref t)
 
void append (const QList< QTimerInfo * > &l)
 
void append (QList< QTimerInfo * > &&l)
 
void prepend (rvalue_ref t)
 
void prepend (parameter_type t)
 
reference emplaceBack (Args &&... args)
 
reference emplaceFront (Args &&... args)
 
iterator insert (qsizetype i, parameter_type t)
 
iterator insert (qsizetype i, qsizetype n, parameter_type t)
 
iterator insert (const_iterator before, parameter_type t)
 
iterator insert (const_iterator before, qsizetype n, parameter_type t)
 
iterator insert (const_iterator before, rvalue_ref t)
 
iterator insert (qsizetype i, rvalue_ref t)
 
QListassign (qsizetype n, parameter_type t)
 
QListassign (InputIterator first, InputIterator last)
 
QListassign (std::initializer_list< QTimerInfo * > l)
 
iterator emplace (const_iterator before, Args &&... args)
 
iterator emplace (qsizetype i, Args &&... args)
 
void replace (qsizetype i, parameter_type t)
 
void replace (qsizetype i, rvalue_ref t)
 
void remove (qsizetype i, qsizetype n=1)
 
void removeFirst () noexcept
 
void removeLast () noexcept
 
value_type takeFirst ()
 
value_type takeLast ()
 
QList< QTimerInfo * > & fill (parameter_type t, qsizetype size=-1)
 
void removeAt (qsizetype i)
 
qsizetype removeAll (const AT &t)
 
bool removeOne (const AT &t)
 
qsizetype removeIf (Predicate pred)
 
QTimerInfotakeAt (qsizetype i)
 
void move (qsizetype from, qsizetype to)
 
iterator begin ()
 
const_iterator begin () const noexcept
 
iterator end ()
 
const_iterator end () const noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 
const_iterator constBegin () const noexcept
 
const_iterator constEnd () const noexcept
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const noexcept
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const noexcept
 
const_reverse_iterator crbegin () const noexcept
 
const_reverse_iterator crend () const noexcept
 
iterator erase (const_iterator begin, const_iterator end)
 
iterator erase (const_iterator pos)
 
QTimerInfo * & first ()
 
const QTimerInfo * & first () const noexcept
 
QList< QTimerInfo * > first (qsizetype n) const
 
const QTimerInfo * & constFirst () const noexcept
 
QTimerInfo * & last ()
 
const QTimerInfo * & last () const noexcept
 
QList< QTimerInfo * > last (qsizetype n) const
 
const QTimerInfo * & constLast () const noexcept
 
bool startsWith (parameter_type t) const
 
bool endsWith (parameter_type t) const
 
QList< QTimerInfo * > mid (qsizetype pos, qsizetype len=-1) const
 
QList< QTimerInfo * > sliced (qsizetype pos) const
 
QList< QTimerInfo * > sliced (qsizetype pos, qsizetype n) const
 
QTimerInfovalue (qsizetype i) const
 
QTimerInfovalue (qsizetype i, parameter_type defaultValue) const
 
void swapItemsAt (qsizetype i, qsizetype j)
 
void push_back (parameter_type t)
 
void push_back (rvalue_ref t)
 
void push_front (rvalue_ref t)
 
void push_front (parameter_type t)
 
void pop_back () noexcept
 
void pop_front () noexcept
 
reference emplace_back (Args &&... args)
 
bool empty () const noexcept
 
reference front ()
 
const_reference front () const noexcept
 
reference back ()
 
const_reference back () const noexcept
 
void shrink_to_fit ()
 
QList< QTimerInfo * > & operator+= (const QList< QTimerInfo * > &l)
 
QList< QTimerInfo * > & operator+= (QList< QTimerInfo * > &&l)
 
QList< QTimerInfo * > & operator+= (parameter_type t)
 
QList< QTimerInfo * > & operator+= (rvalue_ref t)
 
QList< QTimerInfo * > operator+ (const QList< QTimerInfo * > &l) const &
 
QList< QTimerInfo * > operator+ (const QList< QTimerInfo * > &l) &&
 
QList< QTimerInfo * > operator+ (QList< QTimerInfo * > &&l) const &
 
QList< QTimerInfo * > operator+ (QList< QTimerInfo * > &&l) &&
 
QList< QTimerInfo * > & operator<< (parameter_type t)
 
QList< QTimerInfo * > & operator<< (const QList< QTimerInfo * > &l)
 
QList< QTimerInfo * > & operator<< (QList< QTimerInfo * > &&l)
 
QList< QTimerInfo * > & operator<< (rvalue_ref t)
 
QList< QTimerInfo * > toList () const noexcept
 
QList< QTimerInfo * > toVector () const noexcept
 
- Public Member Functions inherited from QListSpecialMethodsBase< T >
template<typename AT = T>
qsizetype indexOf (const AT &t, qsizetype from=0) const noexcept
 
template<typename AT = T>
qsizetype lastIndexOf (const AT &t, qsizetype from=-1) const noexcept
 
template<typename AT = T>
bool contains (const AT &t) const noexcept
 

Public Attributes

std::chrono::steady_clock::time_point currentTime
 

Additional Inherited Members

- Public Types inherited from QList< QTimerInfo * >
using Type = QTimerInfo *
 
using value_type = QTimerInfo *
 
using pointer = QTimerInfo * *
 
using const_pointer = const QTimerInfo * *
 
using reference = QTimerInfo * &
 
using const_reference = const QTimerInfo * &
 
using size_type = qsizetype
 
using difference_type = qptrdiff
 
using parameter_type = typename DataPointer::parameter_type
 
using rvalue_ref = typename std::conditional< DataPointer::pass_parameter_by_value, DisableRValueRefs, QTimerInfo * && >::type
 
using Iterator = iterator
 
using ConstIterator = const_iterator
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 
- Static Public Member Functions inherited from QList< QTimerInfo * >
static QList< QTimerInfo * > fromList (const QList< QTimerInfo * > &list) noexcept
 
static QList< QTimerInfo * > fromVector (const QList< QTimerInfo * > &vector) noexcept
 
static QList< QTimerInfo * > fromReadOnlyData (const QTimerInfo *(&t)[N]) noexcept
 
- Protected Types inherited from QListSpecialMethodsBase< T >
using Self = QList< T >
 
- Protected Member Functions inherited from QListSpecialMethods< T >
 ~QListSpecialMethods ()=default
 
- Protected Member Functions inherited from QListSpecialMethodsBase< T >
 ~QListSpecialMethodsBase ()=default
 
Selfself ()
 
const Selfself () const
 

Detailed Description

Definition at line 37 of file qtimerinfo_unix_p.h.

Constructor & Destructor Documentation

◆ QTimerInfoList()

QTimerInfoList::QTimerInfoList ( )
default

Member Function Documentation

◆ activateTimers()

int QTimerInfoList::activateTimers ( )

Definition at line 388 of file qtimerinfo_unix.cpp.

References QTimerInfo::activateRef, calculateNextTimeout(), QList< QTimerInfo * >::cbegin(), QList< QTimerInfo * >::cend(), QList< QTimerInfo * >::constFirst(), e, QTimerInfo::id, QTimerInfo::interval, QList< QTimerInfo * >::isEmpty(), it, now, QTimerInfo::obj, qt_disable_lowpriority_timers, QList< QTimerInfo * >::removeFirst(), QCoreApplication::sendEvent(), and timerInsert().

Referenced by QEventDispatcherUNIXPrivate::activateTimers(), QCocoaEventDispatcherPrivate::processTimers(), and timerSourceDispatch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findTimerById()

QList::const_iterator QTimerInfoList::findTimerById ( int  timerId) const
inline

Definition at line 63 of file qtimerinfo_unix_p.h.

References QList< T >::cbegin(), and QList< T >::cend().

Referenced by remainingDuration(), and unregisterTimer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasPendingTimers()

bool QTimerInfoList::hasPendingTimers ( )

Updates the currentTime member to the current time, and returns true if the first timer's timeout is in the future (after currentTime).

The list is sorted by timeout, thus it's enough to check the first timer only.

Definition at line 42 of file qtimerinfo_unix.cpp.

References QList< QTimerInfo * >::constFirst(), QList< QTimerInfo * >::isEmpty(), and QTimerInfo::timeout.

+ Here is the call graph for this function:

◆ registeredTimers()

QList< QAbstractEventDispatcher::TimerInfo > QTimerInfoList::registeredTimers ( QObject object) const

Definition at line 375 of file qtimerinfo_unix.cpp.

References QList< T >::emplaceBack(), and list.

Referenced by QEventDispatcherWasm::registeredTimers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ registerTimer() [1/2]

void QTimerInfoList::registerTimer ( int  timerId,
qint64  interval,
Qt::TimerType  timerType,
QObject object 
)

Definition at line 283 of file qtimerinfo_unix.cpp.

References registerTimer().

Referenced by registerTimer(), and QEventDispatcherWasm::registerTimer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ registerTimer() [2/2]

void QTimerInfoList::registerTimer ( int  timerId,
std::chrono::milliseconds  interval,
Qt::TimerType  timerType,
QObject object 
)

◆ remainingDuration()

milliseconds QTimerInfoList::remainingDuration ( int  timerId)

Definition at line 265 of file qtimerinfo_unix.cpp.

References QList< QTimerInfo * >::cend(), findTimerById(), it, now, qWarning, and roundToMillisecond().

Referenced by timerRemainingTime().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ timerInsert()

void QTimerInfoList::timerInsert ( QTimerInfo ti)

Definition at line 52 of file qtimerinfo_unix.cpp.

References at, QList< QTimerInfo * >::insert(), QList< QTimerInfo * >::size(), and QTimerInfo::timeout.

Referenced by activateTimers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ timerRemainingTime()

qint64 QTimerInfoList::timerRemainingTime ( int  timerId)

Definition at line 260 of file qtimerinfo_unix.cpp.

References remainingDuration().

Referenced by QEventDispatcherWasm::remainingTime().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ timerWait()

bool QTimerInfoList::timerWait ( timespec &  tm)

Definition at line 235 of file qtimerinfo_unix.cpp.

References QList< QTimerInfo * >::cbegin(), QList< QTimerInfo * >::cend(), durationToTimespec(), it, now, and roundToMillisecond().

Referenced by QCocoaEventDispatcherPrivate::maybeStartCFRunLoopTimer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unregisterTimer()

bool QTimerInfoList::unregisterTimer ( int  timerId)

Definition at line 337 of file qtimerinfo_unix.cpp.

References QList< QTimerInfo * >::cend(), QList< QTimerInfo * >::erase(), findTimerById(), and it.

Referenced by QEventDispatcherWasm::unregisterTimer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unregisterTimers()

bool QTimerInfoList::unregisterTimers ( QObject object)

Definition at line 354 of file qtimerinfo_unix.cpp.

References at, i, QList< QTimerInfo * >::isEmpty(), QList< QTimerInfo * >::removeAt(), and QList< QTimerInfo * >::size().

Referenced by QEventDispatcherWasm::unregisterTimers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ currentTime

std::chrono::steady_clock::time_point QTimerInfoList::currentTime

Definition at line 45 of file qtimerinfo_unix_p.h.


The documentation for this class was generated from the following files: