QIfMediaIndexerControl Class
Provides an interface to control the media indexer. More...
Header: | #include <QIfMediaIndexerControl> |
qmake: | QT += ifmedia |
Instantiated By: | MediaIndexerControl |
Inherits: | QIfAbstractFeature |
Public Types
enum | State { Idle, Active, Paused, Error } |
Properties
Public Functions
QIfMediaIndexerControl(QObject *parent = nullptr) | |
qreal | progress() const |
QIfMediaIndexerControl::State | state() const |
Public Slots
Signals
void | progressChanged(qreal progress) |
void | stateChanged(QIfMediaIndexerControl::State state) |
Reimplemented Protected Functions
virtual void | clearServiceObject() override |
virtual void | connectToServiceObject(QIfServiceObject *serviceObject) override |
Detailed Description
The QIfMediaIndexerControl 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 QIfMediaIndexerControl expects a single backend to be available. It is recommended to use it with discoveryMode set to QIfAbstractFeature::AutoDiscovery.
Member Type Documentation
enum QIfMediaIndexerControl::State
Constant | Value | Description |
---|---|---|
QIfMediaIndexerControl::Idle | 0 | The indexer is currently idle and is waiting for new files to be indexed. |
QIfMediaIndexerControl::Active | 1 | The indexer is currently busy with indexing. |
QIfMediaIndexerControl::Paused | 2 | The indexer is paused, due to a call to pause(). |
QIfMediaIndexerControl::Error | 3 | An error has occurred during the indexing operation. |
Property Documentation
[read-only]
progress : const qreal
Holds the progress of the indexing operation.
The value is between 0 and 1.
Access functions:
qreal | progress() const |
Notifier signal:
void | progressChanged(qreal progress) |
[read-only]
state : const QIfMediaIndexerControl::State
Holds the current state of the indexer.
Access functions:
QIfMediaIndexerControl::State | state() const |
Notifier signal:
void | stateChanged(QIfMediaIndexerControl::State state) |
Member Function Documentation
QIfMediaIndexerControl::QIfMediaIndexerControl(QObject *parent = nullptr)
Constructs a QIfMediaIndexerControl.
The parent argument is passed on to the QIfAbstractFeature base class.
[slot]
void QIfMediaIndexerControl::pause()
Pauses the currently ongoing indexing operation.
[slot]
void QIfMediaIndexerControl::resume()
Resumes from the Paused state and resumes the indexing operation.
[override virtual protected]
void QIfMediaIndexerControl::clearServiceObject()
Reimplements: QIfAbstractFeature::clearServiceObject().
[override virtual protected]
void QIfMediaIndexerControl::connectToServiceObject(QIfServiceObject *serviceObject)
Reimplements: QIfAbstractFeature::connectToServiceObject(QIfServiceObject *serviceObject).
© 2021 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.