20#ifndef ORES_QT_CURRENCY_MDI_WINDOW_HPP
21#define ORES_QT_CURRENCY_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/ClientCurrencyModel.hpp"
32#include "ores.qt/PaginationWidget.hpp"
45 inline static std::string_view logger_name =
46 "ores.qt.currency_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 currencyDeleted(
const QString& iso_code);
70 void showCurrencyHistory(
const QString& iso_code);
71 void showRoundingTypesRequested();
72 void showMonetaryNaturesRequested();
73 void showMarketTiersRequested();
76 void doReload()
override;
79 void deleteSelected();
80 void viewHistorySelected();
84 void generateSynthetic();
88 void onLoadError(
const QString& error_message,
const QString& details = {});
89 void onRowDoubleClicked(
const QModelIndex& index);
90 void onSelectionChanged();
91 void onConnectionStateChanged();
92 void onSystemSettingNotification(
const QString& eventType,
const QDateTime& timestamp,
93 const QStringList& entityIds);
97 return tr(
"Refresh currencies");
101 void updateActionStates();
102 void setupReloadAction();
103 void setupGenerateAction();
104 void updateGenerateActionVisibility();
107 QVBoxLayout* verticalLayout_;
108 QTableView* currencyTableView_;
113 QAction* reloadAction_;
116 QAction* editAction_;
117 QAction* deleteAction_;
118 QAction* historyAction_;
119 QAction* generateAction_;
121 std::unique_ptr<ClientCurrencyModel> currencyModel_;
122 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 currencies fetched from the server via client.
Definition ClientCurrencyModel.hpp:46
Manages the lifecycle of the NATS client and login state.
Definition ClientManager.hpp:109
MDI window for displaying currencies.
Definition CurrencyMdiWindow.hpp:41
QString normalRefreshTooltip() const override
Get the normal (non-stale) tooltip text for the refresh action.
Definition CurrencyMdiWindow.hpp:96
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 currency with its metadata and formatting rules.
Definition currency.hpp:34