AbstractFeatureListModel QML Type

The QIviAbstractFeatureListModel is the base class for QtIvi Features which should act as a model. More...

Import Statement: import QtIvi 1.0
Instantiates: QIviAbstractFeatureListModel
Inherited By:

MediaDeviceDiscoveryModel and PagingModel



Detailed Description

See QIviAbstractFeature for more details on how a Feature works. This base class is needed to avoid a diamond inheritance from QAbstractListModel and QIviAbstractFeature.

This element is not directly accessible from QML. It provides the base QML properties for the feature, like autoDiscovery and isValid.

See the Models section for more information about all models in QtIvi.

See also AbstractFeature.

Property Documentation

discoveryMode : enumeration

Holds the mode that is used for the autoDiscovery

Available values are:

NoAutoDiscoveryNo auto discovery is done and the ServiceObject needs to be set manually.
AutoDiscoveryTries to find a production backend with a matching interface and falls back to a simulation backend if not found.
LoadOnlyProductionBackendsOnly tries to load a production backend with a matching interface.
LoadOnlySimulationBackendsOnly tries to load a simulation backend with a matching interface.

If needed the auto discovery will be started once the Feature creation is completed.

Note: If you change this property after the Feature is instantiated you need to call startAutoDiscovery() to search for a new Service Object

discoveryResult : enumeration

The result of the last autoDiscovery attempt

Available values are:

NoResultIndicates that no auto discovery was started because the feature has already assigned a valid ServiceObject.
ErrorWhileLoadingAn error has happened while searching for a backend with a matching interface.
ProductionBackendLoadedAs a result of the auto discovery a production backend was loaded.
SimulationBackendLoadedAs a result of the auto discovery a simulation backend was loaded.

error : string

Last error message of the feature. Empty if no error.

isInitialized : bool

Indicates whether the feature has been initialized with all the values from the backend.

The property is true once the backend sends the QIviFeatureInterface::initializationDone signal to indicate that all values have now been initialized with values from the backend.

See also isValid and QIviFeatureInterface::initializationDone.

isValid : bool

Indicates whether the feature is ready for use.

The property is true if the feature is ready to be used, otherwise false. Not being ready usually indicates that no suitable service object could be found, or that automatic discovery has not been triggered.

The backend still might not have sent all properties yet and is not fully initialized. Use isInitialized instead to know when the feature holds all correct values.

See also QIviServiceObject, discoveryMode, and isInitialized.

serviceObject : ServiceObject

Sets the service object for the feature.

As features only expose the front API facing the developer, a service object implementing the actual function is required. This is usually retrieved through the auto discovery mechanism.

The setter for this property returns false if the Service Object is already set to exactly this instance or the Service Object doesn't get accepted by the feature.

See also discoveryMode.

Method Documentation

enumeration startAutoDiscovery()

Performs an automatic discovery attempt.

See AbstractFeature::startAutoDiscovery() for more information

© 2020 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.