![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qqmlthread_p.h>
Public Member Functions | |
QQmlThread () | |
virtual | ~QQmlThread () |
void | lock () |
void | unlock () |
void | wakeOne () |
void | wait () |
QThread * | thread () const |
QObject * | threadObject () const |
And object living in the QML thread, in case you want to parent other objects to it. | |
bool | isThisThread () const |
template<typename Method, typename ... Args> | |
void | callMethodInThread (Method &&method, Args &&...args) |
template<typename Method, typename ... Args> | |
void | callMethodInMain (Method &&method, Args &&...args) |
template<typename Method, typename ... Args> | |
void | postMethodToThread (Method &&method, Args &&...args) |
template<typename Method, typename ... Args> | |
void | postMethodToMain (Method &&method, Args &&...args) |
void | waitForNextMessage () |
void | discardMessages () |
Protected Member Functions | |
void | startup () |
void | shutdown () |
Friends | |
class | QQmlThreadPrivate |
Definition at line 29 of file qqmlthread_p.h.
QQmlThread::QQmlThread | ( | ) |
Definition at line 160 of file qqmlthread_impl.cpp.
References QQmlThreadPrivate::QQmlThreadPrivate().
|
virtual |
Definition at line 165 of file qqmlthread_impl.cpp.
void QQmlThread::callMethodInMain | ( | Method && | method, |
Args &&... | args ) |
Definition at line 114 of file qqmlthread_p.h.
void QQmlThread::callMethodInThread | ( | Method && | method, |
Args &&... | args ) |
Definition at line 121 of file qqmlthread_p.h.
void QQmlThread::discardMessages | ( | ) |
Clear all pending events, for either thread.
Definition at line 374 of file qqmlthread_impl.cpp.
References isThisThread().
Referenced by shutdown().
bool QQmlThread::isThisThread | ( | ) | const |
Definition at line 226 of file qqmlthread_impl.cpp.
Referenced by discardMessages(), QQmlThreadPrivate::triggerMainEvent(), QQmlThreadPrivate::triggerThreadEvent(), and waitForNextMessage().
void QQmlThread::lock | ( | ) |
Definition at line 206 of file qqmlthread_impl.cpp.
Referenced by waitForNextMessage().
void QQmlThread::postMethodToMain | ( | Method && | method, |
Args &&... | args ) |
Definition at line 135 of file qqmlthread_p.h.
void QQmlThread::postMethodToThread | ( | Method && | method, |
Args &&... | args ) |
Definition at line 128 of file qqmlthread_p.h.
|
protected |
Definition at line 181 of file qqmlthread_impl.cpp.
References discardMessages().
|
protected |
Starts the actual worker thread.
Definition at line 174 of file qqmlthread_impl.cpp.
QThread * QQmlThread::thread | ( | ) | const |
Definition at line 231 of file qqmlthread_impl.cpp.
QObject * QQmlThread::threadObject | ( | ) | const |
And object living in the QML thread, in case you want to parent other objects to it.
Definition at line 239 of file qqmlthread_impl.cpp.
void QQmlThread::unlock | ( | ) |
Definition at line 211 of file qqmlthread_impl.cpp.
Referenced by waitForNextMessage().
void QQmlThread::wait | ( | ) |
Definition at line 221 of file qqmlthread_impl.cpp.
void QQmlThread::waitForNextMessage | ( | ) |
A call to this method will either:
Definition at line 343 of file qqmlthread_impl.cpp.
References isThisThread(), lock(), unlock(), and wakeOne().
void QQmlThread::wakeOne | ( | ) |
Definition at line 216 of file qqmlthread_impl.cpp.
Referenced by waitForNextMessage().
|
friend |
Definition at line 70 of file qqmlthread_p.h.