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

List model over the saved connection profiles NetworkManager knows about (org.freedesktop.NetworkManager.Settings). More...

#include <PhosphorServiceNetwork/NetworkConnectionModel.h>

Inheritance diagram for PhosphorServiceNetwork::NetworkConnectionModel:
[legend]

Public Types

enum  Roles { ConnectionRole = Qt::UserRole + 1 , IdRole , UuidRole , ConnectionTypeRole }

Signals

void countChanged ()

Public Member Functions

 NetworkConnectionModel (QObject *parent=nullptr)
 ~NetworkConnectionModel () override
int rowCount (const QModelIndex &parent={}) const override
QVariant data (const QModelIndex &index, int role) const override
QHash< int, QByteArray > roleNames () const override
PhosphorServiceNetwork::NetworkConnection * connectionAt (int index) const

Detailed Description

List model over the saved connection profiles NetworkManager knows about (org.freedesktop.NetworkManager.Settings).

Self-contained: it binds the Settings object on construction, lists existing connections, and tracks NewConnection / ConnectionRemoved. Owns the NetworkConnection row objects (parented to it). No host binding needed; just instantiate it.

Member Enumeration Documentation

◆ Roles

Enumerator
ConnectionRole 
IdRole 
UuidRole 
ConnectionTypeRole 

Constructor & Destructor Documentation

◆ NetworkConnectionModel()

PhosphorServiceNetwork::NetworkConnectionModel::NetworkConnectionModel ( QObject * parent = nullptr)
explicit

◆ ~NetworkConnectionModel()

PhosphorServiceNetwork::NetworkConnectionModel::~NetworkConnectionModel ( )
override

Member Function Documentation

◆ connectionAt()

PhosphorServiceNetwork::NetworkConnection * PhosphorServiceNetwork::NetworkConnectionModel::connectionAt ( int index) const

◆ countChanged

void PhosphorServiceNetwork::NetworkConnectionModel::countChanged ( )
signal

◆ data()

QVariant PhosphorServiceNetwork::NetworkConnectionModel::data ( const QModelIndex & index,
int role ) const
nodiscardoverride

◆ roleNames()

QHash< int, QByteArray > PhosphorServiceNetwork::NetworkConnectionModel::roleNames ( ) const
nodiscardoverride

◆ rowCount()

int PhosphorServiceNetwork::NetworkConnectionModel::rowCount ( const QModelIndex & parent = {}) const
nodiscardoverride

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