20#ifndef ORES_QT_CURRENCY_DETAIL_DIALOG_HPP
21#define ORES_QT_CURRENCY_DETAIL_DIALOG_HPP
27#include "ores.risk/domain/currency.hpp"
28#include "ores.qt/ClientManager.hpp"
29#include "ores.utility/log/make_logger.hpp"
34class CurrencyDetailDialog;
40class CurrencyDetailDialog final :
public QWidget {
44 inline static std::string_view logger_name =
45 "ores.qt.currency_detail_dialog";
47 [[nodiscard]]
static auto& lg() {
49 static auto instance = make_logger(logger_name);
54 explicit CurrencyDetailDialog(QWidget* parent =
nullptr);
55 ~CurrencyDetailDialog()
override;
57 void setClientManager(ClientManager* clientManager);
58 void setUsername(
const std::string& username);
78 void setReadOnly(
bool readOnly,
int versionNumber = 0);
81 void currencyUpdated(
const QString& iso_code);
82 void currencyCreated(
const QString& iso_code);
83 void currencyDeleted(
const QString& iso_code);
84 void statusMessage(
const QString& message);
85 void errorMessage(
const QString& message);
86 void isDirtyChanged(
bool isDirty);
96 void onResetClicked();
97 void onDeleteClicked();
98 void onRevertClicked();
99 void onFieldChanged();
102 void updateSaveResetButtonState();
103 void setFieldsReadOnly(
bool readOnly);
106 std::unique_ptr<Ui::CurrencyDetailDialog> ui_;
110 int historicalVersion_;
111 std::string username_;
113 QAction* saveAction_;
114 QAction* deleteAction_;
115 QAction* revertAction_;
117 ClientManager* clientManager_;
119 static constexpr const char* max_timestamp =
"9999-12-31 23:59:59";
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:35
Implements logging for ORE Studio.
Definition lifecycle_manager.hpp:30
Represents a currency with its metadata and formatting rules.
Definition currency.hpp:30