QMetaDataReaderControl Class

The QMetaDataReaderControl class provides read access to the meta-data of a QMediaService 's media. 更多...

头: #include <QMetaDataReaderControl>
qmake: QT += multimedia
继承: QMediaControl

公共函数

virtual ~QMetaDataReaderControl ()
virtual QStringList availableMetaData () const = 0
virtual bool isMetaDataAvailable () const = 0
virtual QVariant metaData (const QString & key ) const = 0

信号

void metaDataAvailableChanged (bool available )
void metaDataChanged ()
void metaDataChanged (const QString & key , const QVariant & value )

静态公共成员

const QMetaObject staticMetaObject

保护函数

QMetaDataReaderControl (QObject * parent = nullptr)

QMetaDataReaderControl_iid

额外继承成员

详细描述

The QMetaDataReaderControl class provides read access to the meta-data of a QMediaService 's media.

QMediaService can provide read or write access to the meta-data of its current media it will implement QMetaDataReaderControl . This control provides functions for both retrieving and setting meta-data values. Meta-data may be addressed by the keys defined in the QMediaMetaData 名称空间。

The functionality provided by this control is exposed to application code by the meta-data members of QMediaObject , and so meta-data access is potentially available in any of the media object classes. Any media service may implement QMetaDataReaderControl .

接口名称对于 QMetaDataReaderControl is org.qt-project.qt.metadatareadercontrol/5.0 作为定义在 QMetaDataReaderControl_iid .

另请参阅 QMediaService::requestControl () 和 QMediaObject .

成员函数文档编制

[protected] QMetaDataReaderControl:: QMetaDataReaderControl ( QObject * parent = nullptr)

构造 QMetaDataReaderControl with parent . This class is meant as a base class for service specific meta data providers so this constructor is protected.

[虚拟] QMetaDataReaderControl:: ~QMetaDataReaderControl ()

Destroy the meta-data object.

[pure virtual] QStringList QMetaDataReaderControl:: availableMetaData () const

返回元数据的可用键列表。

[pure virtual] bool QMetaDataReaderControl:: isMetaDataAvailable () const

Identifies if meta-data is available from a media service.

Returns true if the meta-data is available and false otherwise.

[pure virtual] QVariant QMetaDataReaderControl:: metaData (const QString & key ) const

Returns the meta-data for the given key .

[signal] void QMetaDataReaderControl:: metaDataAvailableChanged ( bool available )

Signal the availability of meta-data has changed, available will be true if the multimedia object has meta-data.

[signal] void QMetaDataReaderControl:: metaDataChanged ()

Signal the changes of meta-data.

If multiple meta-data elements are changed, metaDataChanged(const QString &key, const QVariant &value) signal is emitted for each of them with metaDataChanged() changed emitted once.

注意: 信号 metaDataChanged 在此类中被重载。通过使用函数指针句法连接到此信号,Qt 提供用于获得如此范例展示的函数指针的方便帮助程序:

connect(metaDataReaderControl, QOverload<>::of(&QMetaDataReaderControl::metaDataChanged),
    [=](){ /* ... */ });
					

[signal] void QMetaDataReaderControl:: metaDataChanged (const QString & key , const QVariant & value )

Signal the changes of one meta-data element value 采用给定 key .

注意: 信号 metaDataChanged 在此类中被重载。通过使用函数指针句法连接到此信号,Qt 提供用于获得如此范例展示的函数指针的方便帮助程序:

connect(metaDataReaderControl, QOverload<const QString &, const QVariant &>::of(&QMetaDataReaderControl::metaDataChanged),
    [=](const QString &key, const QVariant &value){ /* ... */ });
					

宏文档编制

QMetaDataReaderControl_iid

org.qt-project.qt.metadatareadercontrol/5.0

定义接口名为 QMetaDataReaderControl 类。