20#ifndef ORES_QT_BOND_INSTRUMENT_DETAIL_DIALOG_HPP
21#define ORES_QT_BOND_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/bond_instrument.hpp"
29class BondInstrumentDetailDialog;
41 inline static std::string_view logger_name =
42 "ores.qt.bond_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 bondInstrumentSaved(
const QString&
id);
62 void bondInstrumentDeleted(
const QString&
id);
66 void onDeleteClicked();
67 void onFieldChanged();
77 void setupConnections();
78 void updateUiFromBondInstrument();
79 void updateBondInstrumentFromUi();
80 void updateSaveButtonState();
83 Ui::BondInstrumentDetailDialog* 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
Detail dialog for viewing and editing bond instrument records.
Definition BondInstrumentDetailDialog.hpp:37
ProvenanceWidget * provenanceWidget() const override
Returns the promoted ProvenanceWidget (named "provenanceWidget" in .ui).
Definition BondInstrumentDetailDialog.cpp:59
bool hasUnsavedChanges() const override
Definition BondInstrumentDetailDialog.hpp:73
QTabWidget * tabWidget() const override
Returns the dialog's QTabWidget (named "tabWidget" in .ui).
Definition BondInstrumentDetailDialog.cpp:51
QWidget * provenanceTab() const override
Returns the Provenance tab widget (named "provenanceTab" in .ui).
Definition BondInstrumentDetailDialog.cpp:55
Manages the lifecycle of the NATS client and login state.
Definition ClientManager.hpp:109
Base class for all detail dialogs.
Definition DetailDialogBase.hpp:74
Widget displaying the 6 standard record provenance fields.
Definition ProvenanceWidget.hpp:39
Bond instrument economics for Bond, ForwardBond, CallableBond, ConvertibleBond, and BondRepo trades.
Definition bond_instrument.hpp:38