MediaDeviceDiscoveryModel QML Type

Provides a model for discovering media devices. More...

Import Statement: import QtInterfaceFramework.Media 1.0
Instantiates: QIfMediaDeviceDiscoveryModel
Inherits:

AbstractFeatureListModel

Properties

Signals

Methods

  • MediaDevice get(i)

Detailed Description

The MediaDeviceDiscoveryModel provides a way to query for available media devices and to get notified when new media devices get added or are removed.

All devices listed here need to be a subclass of MediaDevice.

The following roles are available in this model:

Role nameTypeDescription
namestringThe name of the media device. E.g. The name of the connected USB-Thumbdrive/SDCard or a connected Ipod.
typestringThe type of the media device. See SupportedMediaDevices for a detailed listing.
serviceObjectQIfMediaDeviceThe Media Device. This object be used as ServiceObject for other Features. E.g. The FilterAndBrowseModel.

The MediaDeviceDiscoveryModel expects a single backend to be available. It is recommended to use it with discoveryMode set to AbstractFeature.AutoDiscovery.

Property Documentation

count : int

Holds the current number of rows in this model.


Signal Documentation

deviceAdded(MediaDevice device)

This signal is emitted whenever a new media device got added. The new media device is passed as device.

Note: The corresponding handler is onDeviceAdded.


deviceRemoved(MediaDevice device)

This signal is emitted whenever a media device got removed. The device which got removed is passed as device. Afterwards the device will be deleted.

Note: The corresponding handler is onDeviceRemoved.


Method Documentation

MediaDevice get(i)

Returns the media devices at index i.

Note: The returned device is owned by the model and can be deleted at any time. If stored in a property or a var, this could lead to a dangling pointer.


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