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

Model for displaying change reasons fetched from the server. More...

#include <ClientChangeReasonModel.hpp>

Inherits QAbstractTableModel.

Collaboration diagram for ClientChangeReasonModel:
Collaboration graph

Public Types

enum  Column {
  Code , CategoryCode , AppliesToAmend , AppliesToDelete ,
  RequiresCommentary , DisplayOrder , Version , RecordedBy ,
  RecordedAt , ColumnCount
}
 Enumeration of table columns for type-safe column access.
 

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

 ClientChangeReasonModel (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 reason data from server asynchronously.
 
const dq::domain::change_reasongetReason (int row) const
 Get reason at the specified row.
 

Detailed Description

Model for displaying change reasons fetched from the server.

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

Member Function Documentation

◆ getReason()

const dq::domain::change_reason * getReason ( int  row) const

Get reason at the specified row.

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