|
ORE Studio 0.0.4
|
Model for displaying roles fetched from the server via client. More...
#include <ClientRoleModel.hpp>


Public Types | |
| enum | Column { Name , Description , PermissionCount , Version , ModifiedBy , RecordedAt , ColumnCount } |
| Enumeration of table columns for type-safe column access. | |
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::role * | getRole (int row) const |
| Get role at the specified row. | |
| std::vector< iam::domain::role > | getRoles () const |
| Get all roles. | |
Static Public Member Functions | |
| static std::vector< column_style > const & | columnStyles () |
| Returns a static vector of column styles (built once per process). | |
| static QVector< int > | defaultHiddenColumns () |
| Returns a static QVector of hidden column indices (built once per process). | |
Static Public Attributes | |
| static constexpr std::size_t | kColumnCount = std::size_t(ColumnCount) |
| Column metadata: header text, style, visibility, and width. | |
| static constexpr std::array< ColumnMetadata, kColumnCount > | kColumns |
| static const QSize | kDefaultWindowSize = {700, 400} |
| Default window size for the role list window. | |
| static constexpr std::string_view | kSettingsGroup = "RoleListWindow" |
| Settings group name for persisting window and column state. | |
Additional Inherited Members | |
Signals inherited from AbstractClientModel | |
| void | dataLoaded () |
| void | loadError (const QString &error_message, const QString &details={}) |
Model for displaying roles fetched from the server via client.
This model extends QAbstractTableModel and fetches role data asynchronously using the ores.comms client.
| const iam::domain::role * getRole | ( | int | row | ) | const |
Get role at the specified row.
| row | The row index. |
| std::vector< iam::domain::role > getRoles | ( | ) | const |
Get all roles.
|
staticconstexpr |
Column metadata: header text, style, visibility, and width.
Order must match the Column enum.