20#ifndef ORES_QT_CURRENCY_MDI_WINDOW_HPP
21#define ORES_QT_CURRENCY_MDI_WINDOW_HPP
26#include <QSortFilterProxyModel>
29#include "ores.qt/EntityListMdiWindow.hpp"
30#include "ores.qt/ClientManager.hpp"
31#include "ores.logging/make_logger.hpp"
32#include "ores.qt/ClientCurrencyModel.hpp"
33#include "ores.qt/PaginationWidget.hpp"
46 inline static std::string_view logger_name =
47 "ores.qt.currency_mdi_window";
49 [[nodiscard]]
static auto& lg() {
51 static auto instance = make_logger(logger_name);
58 const QString& username,
59 QWidget* parent =
nullptr);
64 QSize sizeHint()
const override;
67 void statusChanged(
const QString& message);
68 void errorOccurred(
const QString& error_message);
69 void selectionChanged(
int selection_count);
70 void addNewRequested();
72 void currencyDeleted(
const QString& iso_code);
73 void showCurrencyHistory(
const QString& iso_code);
76 void reload()
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 onFeatureFlagNotification(
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();
105 void setupColumnVisibility();
106 void showHeaderContextMenu(
const QPoint& pos);
108 void restoreSettings();
111 void closeEvent(QCloseEvent* event)
override;
114 QVBoxLayout* verticalLayout_;
115 QTableView* currencyTableView_;
120 QAction* reloadAction_;
123 QAction* editAction_;
124 QAction* deleteAction_;
125 QAction* historyAction_;
126 QAction* generateAction_;
128 std::unique_ptr<ClientCurrencyModel> currencyModel_;
129 QSortFilterProxyModel* proxyModel_;
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:35
Model for displaying currencies fetched from the server via client.
Definition ClientCurrencyModel.hpp:43
Manages the lifecycle of the network client and IO context.
Definition ClientManager.hpp:90
MDI window for displaying currencies.
Definition CurrencyMdiWindow.hpp:42
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:56
Cache for dynamically loaded images (flags, icons) from the server.
Definition ImageCache.hpp:52
Widget providing pagination controls for data tables.
Definition PaginationWidget.hpp:39
Represents a currency with its metadata and formatting rules.
Definition currency.hpp:33