20#ifndef ORES_QT_REPORT_DEFINITION_DETAIL_DIALOG_HPP
21#define ORES_QT_REPORT_DEFINITION_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.reporting.api/domain/report_definition.hpp"
28#include "ores.reporting.api/domain/report_type.hpp"
29#include "ores.reporting.api/domain/concurrency_policy.hpp"
32class ReportDefinitionDetailDialog;
48 inline static std::string_view logger_name =
49 "ores.qt.report_definition_detail_dialog";
51 [[nodiscard]]
static auto& lg() {
53 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 definitionSaved(
const QString& code);
69 void definitionDeleted(
const QString& code);
73 void onDeleteClicked();
74 void onCodeChanged(
const QString& text);
75 void onFieldChanged();
85 void setupConnections();
86 void updateUiFromDefinition();
87 void updateDefinitionFromUi();
88 void updateSaveButtonState();
90 void loadReportTypes();
91 void loadConcurrencyPolicies();
92 void populateReportTypeCombo(
const std::vector<reporting::domain::report_type>& types);
93 void populateConcurrencyPolicyCombo(
const std::vector<reporting::domain::concurrency_policy>& policies);
95 Ui::ReportDefinitionDetailDialog* ui_;
97 std::string username_;
99 bool createMode_{
true};
100 bool readOnly_{
false};
101 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
Widget displaying the 6 standard record provenance fields.
Definition ProvenanceWidget.hpp:39
Detail dialog for viewing and editing report definition records.
Definition ReportDefinitionDetailDialog.hpp:44
ProvenanceWidget * provenanceWidget() const override
Returns the promoted ProvenanceWidget (named "provenanceWidget" in .ui).
Definition ReportDefinitionDetailDialog.cpp:63
bool hasUnsavedChanges() const override
Definition ReportDefinitionDetailDialog.hpp:81
QTabWidget * tabWidget() const override
Returns the dialog's QTabWidget (named "tabWidget" in .ui).
Definition ReportDefinitionDetailDialog.cpp:55
QWidget * provenanceTab() const override
Returns the Provenance tab widget (named "provenanceTab" in .ui).
Definition ReportDefinitionDetailDialog.cpp:59
Persistent template for a scheduled report.
Definition report_definition.hpp:44