QMetaDataWriterControl Class

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

头文件: #include <QMetaDataWriterControl>
qmake: QT += multimedia
基类: QMediaControl

公有函数

~QMetaDataWriterControl()
virtual QStringList availableMetaData() const = 0
virtual bool isMetaDataAvailable() const = 0
virtual bool isWritable() const = 0
virtual QVariant metaData(const QString &key) const = 0
virtual void setMetaData(const QString &key, const QVariant &value) = 0
  • 32 个公有函数继承自 QObject

信号

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

受保护的函数

QMetaDataWriterControl(QObject *parent = Q_NULLPTR)
  • 9 个受保护的函数继承自 QObject

Macros

其他继承的成员

  • 1 个属性继承自 QObject
  • 1 个公有槽函数继承自 QObject
  • 1 个公有变量继承自 QObject
  • 10 个静态公有成员继承自 QObject
  • 2 个受保护的变量继承自 QObject

详细描述

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

If a QMediaService can provide write access to the meta-data of its current media it will implement QMetaDataWriterControl. This control provides functions for both retrieving and setting meta-data values. Meta-data may be addressed by the keys defined in the QMediaMetaData namespace.

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 QMetaDataControl.

The interface name of QMetaDataWriterControl is org.qt-project.qt.metadatawritercontrol/5.0 as defined in QMetaDataWriterControl_iid.

参见 QMediaService::requestControl() and QMediaObject.

成员函数

[protected] QMetaDataWriterControl::QMetaDataWriterControl(QObject *parent = Q_NULLPTR)

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

QMetaDataWriterControl::~QMetaDataWriterControl()

Destroy the meta-data writer control.

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

Returns a list of keys there is meta-data available for.

[pure virtual] bool QMetaDataWriterControl::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] bool QMetaDataWriterControl::isWritable() const

Identifies if a media service's meta-data can be edited.

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

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

Returns the meta-data for the given key.

参见 setMetaData().

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

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

[signal] void QMetaDataWriterControl::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.

Note: Signal metaDataChanged is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:


  connect(metaDataWriterControl, static_cast<void(QMetaDataWriterControl::*)()>(&QMetaDataWriterControl::metaDataChanged),
      [=](){ /* ... */ });

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

Signal the changes of one meta-data element value with the given key.

Note: Signal metaDataChanged is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:


  connect(metaDataWriterControl, static_cast<void(QMetaDataWriterControl::*)(const QString &, const QVariant &)>(&QMetaDataWriterControl::metaDataChanged),
      [=](const QString &key, const QVariant &value){ /* ... */ });

[pure virtual] void QMetaDataWriterControl::setMetaData(const QString &key, const QVariant &value)

Sets the value of the meta-data element with the given key.

参见 metaData().

[signal] void QMetaDataWriterControl::writableChanged(bool writable)

Signal a change in the writable status of meta-data, writable will be true if meta-data elements can be added or adjusted.

QMetaDataWriterControl_iid

org.qt-project.qt.metadatawritercontrol/5.0

Defines the interface name of the QMetaDataWriterControl class.