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

Model for displaying floating index types fetched from the server. More...

#include <ClientFloatingIndexTypeModel.hpp>

Inherits QAbstractTableModel.

Collaboration diagram for ClientFloatingIndexTypeModel:
Collaboration graph

Public Types

enum  Column {
  Code , Description , Version , ModifiedBy ,
  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

 ClientFloatingIndexTypeModel (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 floating index type data from server asynchronously.
 
const trading::domain::floating_index_typegetType (int row) const
 Get floating index type at the specified row.
 
void load_page (std::uint32_t offset, std::uint32_t limit)
 Load a specific page of data.
 
std::uint32_t page_size () const
 Get the page size used for pagination.
 
void set_page_size (std::uint32_t size)
 Set the page size for pagination.
 
std::uint32_t total_available_count () const
 Get the total number of records available on the server.
 

Detailed Description

Model for displaying floating index types fetched from the server.

This model extends QAbstractTableModel and fetches floating index type data asynchronously using the ores.comms client.

Member Function Documentation

◆ getType()

const trading::domain::floating_index_type * getType ( int  row) const

Get floating index type at the specified row.

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