|
ORE Studio 0.0.4
|
Model for displaying parties fetched from the server. More...
#include <ClientPartyModel.hpp>


Public Types | |
| enum | Column { BusinessCenterCode , ShortCode , Codename , FullName , TransliteratedName , PartyCategory , PartyType , Status , Version , ModifiedBy , RecordedAt , ColumnCount } |
| Enumeration of table columns for type-safe column access. | |
Public Member Functions | |
| ClientPartyModel (ClientManager *clientManager, ImageCache *imageCache, 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 (bool replace=true) |
| Refresh party data from server asynchronously. | |
| void | load_page (std::uint32_t offset, std::uint32_t limit) |
| Load a specific page of party data. | |
| const refdata::domain::party * | getParty (int row) const |
| Get party at the specified row. | |
| 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. | |
Additional Inherited Members | |
Signals inherited from AbstractClientModel | |
| void | dataLoaded () |
| void | loadError (const QString &error_message, const QString &details={}) |
Model for displaying parties fetched from the server.
This model extends QAbstractTableModel and fetches party data asynchronously using the ores.comms client.
| void refresh | ( | bool | replace = true | ) |
Refresh party data from server asynchronously.
| replace | If true, replace existing data; if false, append. |
| void load_page | ( | std::uint32_t | offset, |
| std::uint32_t | limit | ||
| ) |
Load a specific page of party data.
| offset | Number of records to skip |
| limit | Number of records to fetch |
| const refdata::domain::party * getParty | ( | int | row | ) | const |
Get party at the specified row.
| row | The row index. |
| void set_page_size | ( | std::uint32_t | size | ) |
Set the page size for pagination.
| size | The number of records to fetch per page (1-1000). |