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
org.qtproject.qt.android.QtQmlComponent Class Referenceabstract
+ Collaboration diagram for org.qtproject.qt.android.QtQmlComponent:

Public Member Functions

void setStatusChangeListener (QtQmlStatusChangeListener listener)
 
boolean disconnectSignalListener (int signalListenerId)
 

Protected Member Functions

abstract String getLibraryName ()
 
abstract String getModuleName ()
 
abstract String getFilePath ()
 
QtQuickView getQuickView ()
 
boolean isViewAttached ()
 
void attachView (QtQuickView view)
 
void detachView ()
 
HashMap< String, Objectattributes ()
 
void setProperty (String propertyName, Object value)
 

Detailed Description

@Since 6.8

The QtQmlComponent represents a QML component that can be loaded by a QtQuickView instance This abstract class should be extended to be used by a QtQuickView. It provides QtQuickView with essential information to load the QML component it represents. It also offers convenient methods for seamless interaction with the QtQuickView that loads it.

Definition at line 19 of file QtQmlComponent.java.

Member Function Documentation

◆ attachView()

void org.qtproject.qt.android.QtQmlComponent.attachView ( QtQuickView view)
inlineprotected

Attaches this to a QtQuickView instance.

Definition at line 76 of file QtQmlComponent.java.

References view.

◆ attributes()

HashMap< String, Object > org.qtproject.qt.android.QtQmlComponent.attributes ( )
inlineprotected

Implement this to return more information about the QML Component. Default implementation returns an empty HashMap.

Definition at line 105 of file QtQmlComponent.java.

◆ detachView()

void org.qtproject.qt.android.QtQmlComponent.detachView ( )
inlineprotected

Detaches this from the QtQuickView to which it has previously been attached. A call to this method will disconnect all signal listeners that have been connected before.

Definition at line 87 of file QtQmlComponent.java.

References org.qtproject.qt.android.QtQmlComponent.getQuickView(), org.qtproject.qt.android.QtQmlStatus.NULL, org.qtproject.qt.android.QtQmlStatusChangeListener.onStatusChanged(), and view.

+ Here is the call graph for this function:

◆ disconnectSignalListener()

boolean org.qtproject.qt.android.QtQmlComponent.disconnectSignalListener ( int signalListenerId)
inline

Disconnects a SignalListener with a given id obtained from connectSignalListener call, from listening to a signal.

Parameters
signalListenerIdthe connection id
Returns
Returns true if the connection id is valid and has been successfully removed, otherwise returns false.

Definition at line 194 of file QtQmlComponent.java.

References org.qtproject.qt.android.QtQmlComponent.getQuickView(), TAG, and view.

+ Here is the call graph for this function:

◆ getFilePath()

abstract String org.qtproject.qt.android.QtQmlComponent.getFilePath ( )
abstractprotected

Implement this to return the qrc (Qt Resource) path of this QML component.

◆ getLibraryName()

abstract String org.qtproject.qt.android.QtQmlComponent.getLibraryName ( )
abstractprotected

Implement this to return the library name that this component belongs to.

◆ getModuleName()

abstract String org.qtproject.qt.android.QtQmlComponent.getModuleName ( )
abstractprotected

Implement this to return the module name that this component belongs to.

◆ getQuickView()

QtQuickView org.qtproject.qt.android.QtQmlComponent.getQuickView ( )
inlineprotected

Gets the QtQuickView instance that has loaded this component.

Returns
Returns an instance of QtQuickView or null if this component is not loaded by any QtQuickView.

Definition at line 59 of file QtQmlComponent.java.

Referenced by org.qtproject.qt.android.QtQmlComponent.detachView(), org.qtproject.qt.android.QtQmlComponent.disconnectSignalListener(), org.qtproject.qt.android.QtQmlComponent.isViewAttached(), org.qtproject.qt.android.QtQmlComponent.setProperty(), and org.qtproject.qt.android.QtQmlComponent.setStatusChangeListener().

+ Here is the caller graph for this function:

◆ isViewAttached()

boolean org.qtproject.qt.android.QtQmlComponent.isViewAttached ( )
inlineprotected

Checks if this is currently attached to a QtQuickView instance

Returns
Returns true if this is attached to a QtQuickView instance, otherwise, returns false.

Definition at line 71 of file QtQmlComponent.java.

References org.qtproject.qt.android.QtQmlComponent.getQuickView().

+ Here is the call graph for this function:

◆ setProperty()

void org.qtproject.qt.android.QtQmlComponent.setProperty ( String propertyName,
Object value )
inlineprotected

Sets the value of an existing property on the QML component if it has already been attached and loaded by a QtQuickView instance. The supported types are java.lang.Integer, java.lang.Double, java.lang.Float, java.lang.Boolean and java.lang.String. These types get converted to their corresponding QML types int, double/float, bool, and string. This function does not add properties to the QML root object if they do not exist but prints a warning.

Parameters
propertyNamethe name of the existing QML property to set the value of
valuethe value to set the property to QML's int, double/float, bool or string
See also
QML int
QML double/float
QML bool
QML string

Definition at line 123 of file QtQmlComponent.java.

References org.qtproject.qt.android.QtQmlComponent.getQuickView(), QObject.setProperty(), TAG, and view.

+ Here is the call graph for this function:

◆ setStatusChangeListener()

void org.qtproject.qt.android.QtQmlComponent.setStatusChangeListener ( QtQmlStatusChangeListener listener)
inline

Sets a StatusChangeListener to listen to status changes.

Parameters
listeneran instance of a StatusChangeListener interface

Definition at line 45 of file QtQmlComponent.java.

References org.qtproject.qt.android.QtQmlComponent.getQuickView(), and view.

+ Here is the call graph for this function:

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