Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
PhosphorServiceBluetooth::BluetoothAdapterModel Class Reference

List model over a BluetoothHost's adapters. More...

#include <PhosphorServiceBluetooth/BluetoothAdapterModel.h>

Inheritance diagram for PhosphorServiceBluetooth::BluetoothAdapterModel:
[legend]

Public Types

enum  Roles {
  AdapterRole = Qt::UserRole + 1 , AddressRole , NameRole , AliasRole ,
  PoweredRole , DiscoverableRole , PairableRole , DiscoveringRole
}

Signals

void hostChanged ()
void countChanged ()

Public Member Functions

 BluetoothAdapterModel (QObject *parent=nullptr)
 ~BluetoothAdapterModel () override
BluetoothHost * host () const
void setHost (BluetoothHost *host)
int rowCount (const QModelIndex &parent={}) const override
QVariant data (const QModelIndex &index, int role) const override
QHash< int, QByteArray > roleNames () const override

Detailed Description

List model over a BluetoothHost's adapters.

Bind host, then drive a Repeater/ListView off the rows. The model keeps a local row mirror so its begin/end-insert/remove transactions always straddle the actual mutation regardless of when the host emits adapterAdded/adapterRemoved.

Member Enumeration Documentation

◆ Roles

Enumerator
AdapterRole 
AddressRole 
NameRole 
AliasRole 
PoweredRole 
DiscoverableRole 
PairableRole 
DiscoveringRole 

Constructor & Destructor Documentation

◆ BluetoothAdapterModel()

PhosphorServiceBluetooth::BluetoothAdapterModel::BluetoothAdapterModel ( QObject * parent = nullptr)
explicit

◆ ~BluetoothAdapterModel()

PhosphorServiceBluetooth::BluetoothAdapterModel::~BluetoothAdapterModel ( )
override

Member Function Documentation

◆ countChanged

void PhosphorServiceBluetooth::BluetoothAdapterModel::countChanged ( )
signal

◆ data()

QVariant PhosphorServiceBluetooth::BluetoothAdapterModel::data ( const QModelIndex & index,
int role ) const
nodiscardoverride

◆ host()

BluetoothHost * PhosphorServiceBluetooth::BluetoothAdapterModel::host ( ) const
nodiscard

◆ hostChanged

void PhosphorServiceBluetooth::BluetoothAdapterModel::hostChanged ( )
signal

◆ roleNames()

QHash< int, QByteArray > PhosphorServiceBluetooth::BluetoothAdapterModel::roleNames ( ) const
nodiscardoverride

◆ rowCount()

int PhosphorServiceBluetooth::BluetoothAdapterModel::rowCount ( const QModelIndex & parent = {}) const
nodiscardoverride

◆ setHost()

void PhosphorServiceBluetooth::BluetoothAdapterModel::setHost ( BluetoothHost * host)

The documentation for this class was generated from the following file: