BluezQt::DevicesModel Class
class BluezQt::DevicesModelModel of all devices. More...
Header: | #include <BluezQt/DevicesModel> |
CMake: | find_package(KF6 REQUIRED COMPONENTS BluezQt) target_link_libraries(mytarget PRIVATE KF6::BluezQt) |
Inherits: | QAbstractListModel |
Public Functions
DevicesModel(BluezQt::Manager *manager, QObject *parent = nullptr) | |
BluezQt::DevicePtr | device(const QModelIndex &index) const |
Detailed Description
This class represents a model of all devices.
Example use in QML code:
import org.kde.bluezqt 1.0 as BluezQt ListView { model: BluezQt.DevicesModel { } delegate: Text { text: "%1 (%2)".arg(Name).arg(Address) } }
Member Function Documentation
[explicit]
DevicesModel::DevicesModel(BluezQt::Manager *manager, QObject *parent = nullptr)
Creates a new DevicesModel object using the given manager as a child of parent.
BluezQt::DevicePtr DevicesModel::device(const QModelIndex &index) const
Returns a device object for the specified index in the model.