20#ifndef ORES_QT_BOOK_DETAIL_DIALOG_HPP
21#define ORES_QT_BOOK_DETAIL_DIALOG_HPP
23#include "ores.qt/ClientManager.hpp"
24#include "ores.qt/DetailDialogBase.hpp"
25#include "ores.qt/ImageCache.hpp"
26#include "ores.qt/LookupFetcher.hpp"
27#include "ores.logging/make_logger.hpp"
28#include "ores.refdata.api/domain/book.hpp"
31class BookDetailDialog;
47 inline static std::string_view logger_name =
48 "ores.qt.book_detail_dialog";
50 [[nodiscard]]
static auto& lg() {
52 static auto instance = make_logger(logger_name);
62 void setUsername(
const std::string& username);
64 void setCreateMode(
bool createMode);
65 void setReadOnly(
bool readOnly);
68 void bookSaved(
const QString& code);
69 void bookDeleted(
const QString& code);
73 void onDeleteClicked();
74 void onCodeChanged(
const QString& text);
75 void onFieldChanged();
85 void setupConnections();
86 void updateUiFromBook();
87 void updateBookFromUi();
88 void updateSaveButtonState();
89 void populateCurrencyCombo();
90 void populateBookStatusCombo();
91 void populateParentPortfolioCombo();
92 void populateOwnerUnitCombo();
95 Ui::BookDetailDialog* ui_;
98 std::string username_;
100 std::vector<portfolio_entry> portfolioEntries_;
101 std::vector<business_unit_entry> ownerUnitEntries_;
102 bool createMode_{
true};
103 bool readOnly_{
false};
104 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 book records.
Definition BookDetailDialog.hpp:43
ProvenanceWidget * provenanceWidget() const override
Returns the promoted ProvenanceWidget (named "provenanceWidget" in .ui).
Definition BookDetailDialog.cpp:58
bool hasUnsavedChanges() const override
Definition BookDetailDialog.hpp:81
QTabWidget * tabWidget() const override
Returns the dialog's QTabWidget (named "tabWidget" in .ui).
Definition BookDetailDialog.cpp:56
QWidget * provenanceTab() const override
Returns the Provenance tab widget (named "provenanceTab" in .ui).
Definition BookDetailDialog.cpp:57
Manages the lifecycle of the NATS client and login state.
Definition ClientManager.hpp:109
Base class for all detail dialogs.
Definition DetailDialogBase.hpp:74
Cache for dynamically loaded images (flags, icons) from the server.
Definition ImageCache.hpp:53
Widget displaying the 6 standard record provenance fields.
Definition ProvenanceWidget.hpp:39
Operational ledger leaf that holds trades.
Definition book.hpp:37