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

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

#include <ClientChangeReasonModel.hpp>

Inheritance diagram for ClientChangeReasonModel:
Inheritance graph
Collaboration diagram for ClientChangeReasonModel:
Collaboration graph

Public Types

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

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.
 

Additional Inherited Members

- Signals inherited from AbstractClientModel
void dataLoaded ()
 
void loadError (const QString &error_message, const QString &details={})
 

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.