DeviceListModel QML Type

Contains all devices discovered by DeviceDiscoveryAgent. Uncreatable. More...

Import Statement: import ArcGIS.AppFramework.Devices 1.0

Properties

Signals

Methods

Detailed Description

The DeviceListModel component provides a list of all external devices that have been found through DeviceDiscoveryAgent.

For an example of this component in action, refer to the code sample for DeviceDiscoveryAgent.

Enumerations

DeviceListModelRoles enumeration

NameValue
DeviceListModel.AddressRole257
DeviceListModel.NameRole258
DeviceListModel.DeviceTypeRole259
DeviceListModel.ConnectedRole260

Property Documentation

[read-only] count : int

Returns the number of items in the list model.


Signal Documentation

error(int code)

Signal emitted when an error has occurred.

Note: The corresponding handler is onError.


Method Documentation

clear()

Clears the device list.


Device get(int index)

Returns the device at the specified index.

Item {
    property var deviceInfo: discoveryAgent.devices.get(index)

    TextArea {
        Layout.fillWidth: true
        text: JSON.stringify(deviceInfo, undefined, 2)
        readOnly: true
    }
}

The index parameter

This parameter returns the device at the nominated index position.


remove(string name)

Removes the device that uses the given name from the list model.

The name parameter

The exact name of the device to remove from the list.


remove(device::devicetype deviceType)

Removes the given device type from the list model.

The deviceType parameter

The device type to remove from the list. This is informed by the DeviceType enum in the Device component.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.