ORE Studio 0.0.4
Loading...
Searching...
No Matches
Signals | Public Member Functions | List of all members
ClientRoleModel Class Referencefinal

Model for displaying roles fetched from the server via client. More...

#include <ClientRoleModel.hpp>

Inherits QAbstractTableModel.

Collaboration diagram for ClientRoleModel:
Collaboration graph

Signals

void dataLoaded ()
 Emitted when data has been successfully loaded.
 
void loadError (const QString &error_message, const QString &details={})
 Emitted when an error occurs during data loading.
 

Public Member Functions

 ClientRoleModel (ClientManager *clientManager, QObject *parent=nullptr)
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
void refresh ()
 Refresh role data from server asynchronously.
 
const iam::domain::rolegetRole (int row) const
 Get role at the specified row.
 
std::vector< iam::domain::rolegetRoles () const
 Get all roles.
 

Detailed Description

Model for displaying roles fetched from the server via client.

This model extends QAbstractTableModel and fetches role data asynchronously using the ores.comms client.

Member Function Documentation

◆ getRole()

const iam::domain::role * getRole ( int  row) const

Get role at the specified row.

Parameters
rowThe row index.
Returns
The role, or nullptr if row is invalid.

◆ getRoles()

std::vector< iam::domain::role > getRoles ( ) const

Get all roles.

Returns
A vector containing all current roles.