|
|
| ClientCountryModel (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 country data from server asynchronously.
|
| |
| void | load_page (std::uint32_t offset, std::uint32_t limit) |
| | Load a specific page of country data.
|
| |
| const refdata::domain::country * | getCountry (int row) const |
| | Get country at the specified row.
|
| |
| std::vector< refdata::domain::country > | getCountries () const |
| | Get all countries.
|
| |
|
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.
|
| |
|
| 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, 600} |
| | Default window size for the country list window.
|
| |
|
static constexpr std::string_view | kSettingsGroup = "CountryListWindow" |
| | Settings group name for persisting window and column state.
|
| |
Model for displaying countries fetched from the server.
This model extends QAbstractTableModel and fetches country data asynchronously using the ores.comms client.