20#ifndef ORES_QT_PRICING_MODEL_PRODUCT_DETAIL_DIALOG_HPP
21#define ORES_QT_PRICING_MODEL_PRODUCT_DETAIL_DIALOG_HPP
24#include "ores.qt/ClientManager.hpp"
25#include "ores.qt/DetailDialogBase.hpp"
26#include "ores.logging/make_logger.hpp"
27#include "ores.analytics.api/domain/pricing_model_product.hpp"
29#include "ores.analytics.api/domain/pricing_engine_type.hpp"
33class PricingModelProductDetailDialog;
49 inline static std::string_view logger_name =
50 "ores.qt.pricing_model_product_detail_dialog";
52 [[nodiscard]]
static auto& lg() {
54 static auto instance = make_logger(logger_name);
63 void setUsername(
const std::string& username);
65 void setCreateMode(
bool createMode);
66 void setReadOnly(
bool readOnly);
68 void setPricingEngineTypes(
const std::vector<analytics::domain::pricing_engine_type>& items);
72 void productSaved(
const QString& code);
73 void productDeleted(
const QString& code);
77 void onDeleteClicked();
78 void onCodeChanged(
const QString& text);
79 void onFieldChanged();
89 void setupConnections();
91 void updateUiFromProduct();
92 void updateProductFromUi();
93 void updateSaveButtonState();
96 void populatePricingEngineTypes();
99 Ui::PricingModelProductDetailDialog* ui_;
101 std::string username_;
103 bool createMode_{
true};
104 bool readOnly_{
false};
105 bool hasChanges_{
false};
107 std::vector<analytics::domain::pricing_engine_type> pricingEngineTypes_;
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Qt-based graphical user interface for ORE Studio.
Definition AccountController.hpp:32
Per-product model and engine assignment within a pricing model config.
Definition pricing_model_product.hpp:38
Detail dialog for viewing and editing pricing model product records.
Definition PricingModelProductDetailDialog.hpp:45
ProvenanceWidget * provenanceWidget() const override
Returns the promoted ProvenanceWidget (named "provenanceWidget" in .ui).
Definition PricingModelProductDetailDialog.cpp:59
bool hasUnsavedChanges() const override
Definition PricingModelProductDetailDialog.hpp:85
QTabWidget * tabWidget() const override
Returns the dialog's QTabWidget (named "tabWidget" in .ui).
Definition PricingModelProductDetailDialog.cpp:51
QWidget * provenanceTab() const override
Returns the Provenance tab widget (named "provenanceTab" in .ui).
Definition PricingModelProductDetailDialog.cpp:55
Manages the lifecycle of the NATS client and login state.
Definition ClientManager.hpp:123
Base class for all detail dialogs.
Definition DetailDialogBase.hpp:75
Widget displaying the 6 standard record provenance fields.
Definition ProvenanceWidget.hpp:40