|
ORE Studio 0.0.4
|
Model for displaying business centres fetched from the server. More...
#include <ClientBusinessCentreModel.hpp>


Public Types | |
| enum | Column { CountryAlpha2 , Code , City , Source , Description , CodingScheme , Version , ModifiedBy , RecordedAt , ColumnCount } |
| Enumeration of table columns for type-safe column access. | |
Public Member Functions | |
| ClientBusinessCentreModel (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 business centre data from server asynchronously. | |
| void | load_page (std::uint32_t offset, std::uint32_t limit) |
| Load a specific page of business centre data. | |
| const refdata::domain::business_centre * | getBusinessCentre (int row) const |
| Get business centre at the specified row. | |
| std::uint32_t | page_size () const |
| void | set_page_size (std::uint32_t size) |
| std::uint32_t | total_available_count () const |
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 = {900, 400} |
| Default window size for the tenant list window. | |
| static constexpr std::string_view | kSettingsGroup = "BusinessCentreListWindow" |
| 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 business centres fetched from the server.
This model extends QAbstractTableModel and fetches business centre data asynchronously using the ores.comms client.
| void refresh | ( | bool | replace = true | ) |
Refresh business centre data from server asynchronously.
When replace is true, existing data is cleared before loading. When false, new data is appended (for pagination).
| 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 business centre data.
| offset | Number of records to skip |
| limit | Number of records to fetch |
| const refdata::domain::business_centre * getBusinessCentre | ( | int | row | ) | const |
Get business centre at the specified row.
| row | The row index. |
|
staticconstexpr |
Column metadata: header text, style, visibility, and width.
Order must match the Column enum.