20#ifndef ORES_QT_EQUITY_INSTRUMENT_DETAIL_DIALOG_HPP
21#define ORES_QT_EQUITY_INSTRUMENT_DETAIL_DIALOG_HPP
23#include "ores.qt/ClientManager.hpp"
24#include "ores.qt/DetailDialogBase.hpp"
25#include "ores.logging/make_logger.hpp"
26#include "ores.trading.api/domain/equity_instrument.hpp"
29class EquityInstrumentDetailDialog;
41 inline static std::string_view logger_name =
42 "ores.qt.equity_instrument_detail_dialog";
44 [[nodiscard]]
static auto& lg() {
46 static auto instance = make_logger(logger_name);
55 void setUsername(
const std::string& username);
57 void setCreateMode(
bool createMode);
58 void setReadOnly(
bool readOnly);
61 void equityInstrumentSaved(
const QString&
id);
62 void equityInstrumentDeleted(
const QString&
id);
66 void onDeleteClicked();
67 void onFieldChanged();
77 void setupConnections();
78 void updateUiFromEquityInstrument();
79 void updateEquityInstrumentFromUi();
80 void updateSaveButtonState();
83 Ui::EquityInstrumentDetailDialog* ui_;
85 std::string username_;
87 bool createMode_{
true};
88 bool readOnly_{
false};
89 bool hasChanges_{
false};
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:29
Manages the lifecycle of the NATS client and login state.
Definition ClientManager.hpp:109
Base class for all detail dialogs.
Definition DetailDialogBase.hpp:74
Detail dialog for viewing and editing equity instrument records.
Definition EquityInstrumentDetailDialog.hpp:37
ProvenanceWidget * provenanceWidget() const override
Returns the promoted ProvenanceWidget (named "provenanceWidget" in .ui).
Definition EquityInstrumentDetailDialog.cpp:58
bool hasUnsavedChanges() const override
Definition EquityInstrumentDetailDialog.hpp:73
QTabWidget * tabWidget() const override
Returns the dialog's QTabWidget (named "tabWidget" in .ui).
Definition EquityInstrumentDetailDialog.cpp:50
QWidget * provenanceTab() const override
Returns the Provenance tab widget (named "provenanceTab" in .ui).
Definition EquityInstrumentDetailDialog.cpp:54
Widget displaying the 6 standard record provenance fields.
Definition ProvenanceWidget.hpp:39
Equity instrument economics for all equity ORE product types.
Definition equity_instrument.hpp:45