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

  • progress : const qreal
  • state : const QIfMediaIndexerControl::State

Public Functions

QIfMediaIndexerControl(QObject *parent = nullptr)
qreal progress() const
QIfMediaIndexerControl::State state() const

Public Slots

void pause()
void resume()

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.

Uses qtifmedia as configurationId for QIfConfiguration based settings.

Member Type Documentation

enum QIfMediaIndexerControl::State

ConstantValueDescription
QIfMediaIndexerControl::Idle0The indexer is currently idle and is waiting for new files to be indexed.
QIfMediaIndexerControl::Active1The indexer is currently busy with indexing.
QIfMediaIndexerControl::Paused2The indexer is paused, due to a call to pause().
QIfMediaIndexerControl::Error3An 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

[explicit] QIfMediaIndexerControl::QIfMediaIndexerControl(QObject *parent = nullptr)

Constructs a QIfMediaIndexerControl.

The parent argument is passed on to the QIfAbstractFeature base class.

[override virtual protected] void QIfMediaIndexerControl::clearServiceObject()

Reimplements: QIfAbstractFeature::clearServiceObject().

[override virtual protected] void QIfMediaIndexerControl::connectToServiceObject(QIfServiceObject *serviceObject)

Reimplements: QIfAbstractFeature::connectToServiceObject(QIfServiceObject *serviceObject).

[slot] void QIfMediaIndexerControl::pause()

Pauses the currently ongoing indexing operation.

See also resume() and state.

[slot] void QIfMediaIndexerControl::resume()

Resumes from the Paused state and resumes the indexing operation.

See also pause() and state.

© 2024 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.