MediaIndexerControl QML Type
Provides an interface to control the media indexer. More...
Import Statement: | import QtIvi.Media 1.0 |
Instantiates: | QIviMediaIndexerControl |
Inherits: |
Properties
- discoveryMode : enumeration
- discoveryResult : enumeration
- isInitialized : bool
- isValid : bool
- progress : real
- serviceObject : ServiceObject
- state : enumeration
Methods
- pause()
- resume()
- enumeration startAutoDiscovery()
Detailed Description
The MediaIndexerControl controls the media indexer. It provides a way to temporarily pause the indexing and resume it, as well as to inquire about the current state and progress of the indexing operation.
The MediaIndexerControl expects a single backend to be available. It is recommended to use it with discoveryMode set to AbstractFeature.AutoDiscovery.
Property Documentation
discoveryMode : enumeration |
Holds the mode that is used for the autoDiscovery
Available values are:
Constant | Description |
---|---|
NoAutoDiscovery | No auto discovery is done and the ServiceObject needs to be set manually. |
AutoDiscovery | Tries to find a production backend with a matching interface and falls back to a simulation backend if not found. |
LoadOnlyProductionBackends | Only tries to load a production backend with a matching interface. |
LoadOnlySimulationBackends | Only tries to load a simulation backend with a matching interface. |
If necessary, auto discovery is started once the feature creation is completed.
Note: If you change this property after the feature is instantiated, make sure to call startAutoDiscovery() to search for a new service object.
discoveryResult : enumeration |
The result of the last autoDiscovery
Available values are:
Constant | Description |
---|---|
NoResult | Indicates that no auto discovery was started because the feature has already assigned a valid ServiceObject. |
ErrorWhileLoading | An error has happened while searching for a backend with a matching interface. |
ProductionBackendLoaded | A production backend was loaded, as a result of auto discovery. |
SimulationBackendLoaded | A simulation backend was loaded, as a result of auto discovery.s |
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.
progress : real |
Holds the progress of the indexing operation.
The value is between 0 and 1.
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 QIviServiceObject
is already set to this particular instance or the QIviServiceObject isn't accepted by the feature.
See also discoveryMode.
state : enumeration |
Holds the current state of the indexer.
It can be one of the following values:
Constant | Description |
---|---|
Idle | The indexer is currently idle and is waiting for new files to be indexed. |
Active | The indexer is currently busy with indexing. |
Paused | The indexer is paused, due to a call to pause(). |
Error | An error has occurred during the indexing operation. |
Method Documentation
enumeration startAutoDiscovery() |
Performs an automatic discovery attempt.
The feature tries to locate a single ServiceObject that implements the required interface.
If no ServiceObject is found, the feature remains invalid. If more than one ServiceObject is found, the first instance is used.
This function returns either the type of the backend that was loaded; or an error.
If the discoveryMode
is set to QIviAbstractFeature::NoAutoDiscovery, this function does nothing and returns QIviAbstractFeature::NoResult.
Return values are:
Constant | Description |
---|---|
NoResult | Indicates that no auto discovery was started because the feature already has a valid ServiceObject assigned. |
ErrorWhileLoading | Indicates an error has occurred while searching for a backend with a matching interface. |
ProductionBackendLoaded | A production backend was loaded, as a result of auto discovery. |
SimulationBackendLoaded | A simulation backend was loaded, as a result of auto discovery. |
See also Dynamic Backend System and QIviServiceManager.
© 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.