Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QtAndroidQuickViewEmbedding Namespace Reference

Classes

class  QAndroidQuickView
 

Functions

void createQuickView (JNIEnv *, jobject nativeWindow, jstring qmlUri, jint width, jint height, jlong parentWindowReference, jlong viewReference, const QJniArray< jstring > &qmlImportPaths)
 
std::pair< QAndroidQuickView *, QQuickItem * > getViewAndRootObject (jlong windowReference)
 
void setRootObjectProperty (JNIEnv *env, jobject object, jlong windowReference, jstring propertyName, jobject value)
 
jobject getRootObjectProperty (JNIEnv *env, jobject object, jlong windowReference, jstring propertyName)
 
int addRootObjectSignalListener (JNIEnv *env, jobject, jlong windowReference, jstring signalName, jclass argType, jobject listener)
 
bool removeRootObjectSignalListener (JNIEnv *, jobject, jlong windowReference, jint signalListenerId)
 
bool registerNatives (QJniEnvironment &env)
 

Variables

constexpr const char * uninitializedViewMessage = "because QtQuickView is not loaded or ready yet."
 

Function Documentation

◆ addRootObjectSignalListener()

int QtAndroidQuickViewEmbedding::addRootObjectSignalListener ( JNIEnv * env,
jobject ,
jlong windowReference,
jstring signalName,
jclass argType,
jobject listener )

◆ createQuickView()

void QtAndroidQuickViewEmbedding::createQuickView ( JNIEnv * ,
jobject nativeWindow,
jstring qmlUri,
jint width,
jint height,
jlong parentWindowReference,
jlong viewReference,
const QJniArray< jstring > & qmlImportPaths )

Definition at line 30 of file qandroidquickviewembedding.cpp.

References QObject::connect(), engine, QQuickView::engine(), QMetaObject::invokeMethod(), nativeWindow(), qApp, QWindow::setHeight(), QQuickView::setResizeMode(), QQuickView::setSource(), QWindow::setWidth(), QQuickView::SizeRootObjectToView, QQuickView::statusChanged(), toString(), Qt::transparent, view, and window().

Referenced by registerNatives().

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

◆ getRootObjectProperty()

jobject QtAndroidQuickViewEmbedding::getRootObjectProperty ( JNIEnv * env,
jobject object,
jlong windowReference,
jstring propertyName )

Definition at line 114 of file qandroidquickviewembedding.cpp.

References getViewAndRootObject(), QMetaObject::indexOfProperty(), property, Q_ASSERT, Q_UNUSED, qPrintable, qWarning, QMetaProperty::read(), QAndroidTypeConverter::toJavaObject(), and uninitializedViewMessage.

Referenced by registerNatives().

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

◆ getViewAndRootObject()

std::pair< QAndroidQuickView *, QQuickItem * > QtAndroidQuickViewEmbedding::getViewAndRootObject ( jlong windowReference)

Definition at line 74 of file qandroidquickviewembedding.cpp.

References Q_LIKELY, QQuickView::rootObject(), and view.

Referenced by addRootObjectSignalListener(), getRootObjectProperty(), removeRootObjectSignalListener(), and setRootObjectProperty().

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

◆ registerNatives()

bool QtAndroidQuickViewEmbedding::registerNatives ( QJniEnvironment & env)

Definition at line 293 of file qandroidquickviewembedding.cpp.

References addRootObjectSignalListener(), createQuickView(), getRootObjectProperty(), removeRootObjectSignalListener(), and setRootObjectProperty().

Referenced by JNI_OnLoad().

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

◆ removeRootObjectSignalListener()

bool QtAndroidQuickViewEmbedding::removeRootObjectSignalListener ( JNIEnv * ,
jobject ,
jlong windowReference,
jint signalListenerId )

Definition at line 259 of file qandroidquickviewembedding.cpp.

References QAndroidViewSignalManager::connectionInfoMap, QAndroidViewSignalManager::connections, QHash< Key, T >::contains(), getViewAndRootObject(), qWarning, QHash< Key, T >::remove(), uninitializedViewMessage, QHash< Key, T >::value(), and view.

Referenced by registerNatives().

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

◆ setRootObjectProperty()

void QtAndroidQuickViewEmbedding::setRootObjectProperty ( JNIEnv * env,
jobject object,
jlong windowReference,
jstring propertyName,
jobject value )

Definition at line 81 of file qandroidquickviewembedding.cpp.

References getViewAndRootObject(), QMetaObject::indexOfProperty(), property, Q_UNUSED, qPrintable, qWarning, QAndroidTypeConverter::toQVariant(), toString(), uninitializedViewMessage, and QMetaProperty::write().

Referenced by registerNatives().

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

Variable Documentation

◆ uninitializedViewMessage

constexpr const char* QtAndroidQuickViewEmbedding::uninitializedViewMessage = "because QtQuickView is not loaded or ready yet."
constexpr