20#ifndef ORES_QT_COUNTRY_MDI_WINDOW_HPP
21#define ORES_QT_COUNTRY_MDI_WINDOW_HPP
26#include <QSortFilterProxyModel>
28#include "ores.qt/EntityListMdiWindow.hpp"
29#include "ores.qt/ClientManager.hpp"
30#include "ores.logging/make_logger.hpp"
31#include "ores.qt/ClientCountryModel.hpp"
32#include "ores.qt/PaginationWidget.hpp"
45 inline static std::string_view logger_name =
46 "ores.qt.country_mdi_window";
48 [[nodiscard]]
static auto& lg() {
50 static auto instance = make_logger(logger_name);
57 const QString& username,
58 QWidget* parent =
nullptr);
64 void statusChanged(
const QString& message);
65 void errorOccurred(
const QString& error_message);
66 void selectionChanged(
int selection_count);
67 void addNewRequested();
69 void countryDeleted(
const QString& alpha2_code);
70 void showCountryHistory(
const QString& alpha2_code);
73 void doReload()
override;
76 void deleteSelected();
77 void viewHistorySelected();
82 void onLoadError(
const QString& error_message,
const QString& details = {});
83 void onRowDoubleClicked(
const QModelIndex& index);
84 void onSelectionChanged();
85 void onConnectionStateChanged();
91 void updateActionStates();
92 void setupReloadAction();
95 QVBoxLayout* verticalLayout_;
96 QTableView* countryTableView_;
101 QAction* reloadAction_;
104 QAction* editAction_;
105 QAction* deleteAction_;
106 QAction* historyAction_;
108 std::unique_ptr<ClientCountryModel> countryModel_;
109 QSortFilterProxyModel* proxyModel_;
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:29
Model for displaying countries fetched from the server.
Definition ClientCountryModel.hpp:45
Manages the lifecycle of the NATS client and login state.
Definition ClientManager.hpp:109
MDI window for displaying countries.
Definition CountryMdiWindow.hpp:41
QString normalRefreshTooltip() const override
Get the normal (non-stale) tooltip text for the refresh action.
Definition CountryMdiWindow.hpp:88
Base class for entity list MDI windows providing stale indicator support.
Definition EntityListMdiWindow.hpp:62
Cache for dynamically loaded images (flags, icons) from the server.
Definition ImageCache.hpp:53
Widget providing pagination controls for data tables.
Definition PaginationWidget.hpp:39
Represents a country using ISO 3166-1 standard codes.
Definition country.hpp:34