20#ifndef ORES_QT_COMMODITY_INSTRUMENT_MDI_WINDOW_HPP
21#define ORES_QT_COMMODITY_INSTRUMENT_MDI_WINDOW_HPP
25#include <QSortFilterProxyModel>
26#include "ores.qt/EntityListMdiWindow.hpp"
27#include "ores.qt/ClientManager.hpp"
28#include "ores.qt/ClientCommodityInstrumentModel.hpp"
29#include "ores.qt/PaginationWidget.hpp"
30#include "ores.logging/make_logger.hpp"
31#include "ores.trading.api/domain/commodity_instrument.hpp"
42 inline static std::string_view logger_name =
43 "ores.qt.commodity_instrument_mdi_window";
45 [[nodiscard]]
static auto& lg() {
47 static auto instance = make_logger(logger_name);
55 QWidget* parent =
nullptr);
59 void doReload()
override;
62 void statusChanged(
const QString& message);
63 void errorOccurred(
const QString& error_message);
65 void addNewRequested();
66 void commodityInstrumentDeleted(
const QString&
id);
72 void deleteSelected();
73 void viewHistorySelected();
77 void onLoadError(
const QString& error_message,
const QString& details = {});
78 void onSelectionChanged();
79 void onDoubleClicked(
const QModelIndex& index);
83 return tr(
"Refresh commodity instruments");
90 void setupConnections();
91 void updateActionStates();
97 QTableView* tableView_;
99 QSortFilterProxyModel* proxyModel_;
102 QAction* reloadAction_;
104 QAction* editAction_;
105 QAction* deleteAction_;
106 QAction* historyAction_;
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 commodity instruments fetched from the server.
Definition ClientCommodityInstrumentModel.hpp:37
Manages the lifecycle of the NATS client and login state.
Definition ClientManager.hpp:109
MDI window for displaying and managing commodity instruments.
Definition CommodityInstrumentMdiWindow.hpp:38
QString normalRefreshTooltip() const override
Get the normal (non-stale) tooltip text for the refresh action.
Definition CommodityInstrumentMdiWindow.hpp:82
Base class for entity list MDI windows providing stale indicator support.
Definition EntityListMdiWindow.hpp:62
Widget providing pagination controls for data tables.
Definition PaginationWidget.hpp:39
Commodity instrument economics for all commodity ORE product types.
Definition commodity_instrument.hpp:48