20#ifndef ORES_QT_BADGE_SEVERITY_DETAIL_DIALOG_HPP
21#define ORES_QT_BADGE_SEVERITY_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.dq/domain/badge_severity.hpp"
29class BadgeSeverityDetailDialog;
45 inline static std::string_view logger_name =
46 "ores.qt.badge_severity_detail_dialog";
48 [[nodiscard]]
static auto& lg() {
50 static auto instance = make_logger(logger_name);
59 void setUsername(
const std::string& username);
61 void setCreateMode(
bool createMode);
62 void setReadOnly(
bool readOnly);
65 void severitySaved(
const QString& code);
66 void severityDeleted(
const QString& code);
70 void onDeleteClicked();
71 void onCodeChanged(
const QString& text);
72 void onFieldChanged();
82 void setupConnections();
83 void updateUiFromSeverity();
84 void updateSeverityFromUi();
85 void updateSaveButtonState();
88 Ui::BadgeSeverityDetailDialog* ui_;
90 std::string username_;
92 bool createMode_{
true};
93 bool readOnly_{
false};
94 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
Severity levels for badge visual classification.
Definition badge_severity.hpp:38
Detail dialog for viewing and editing badge severity records.
Definition BadgeSeverityDetailDialog.hpp:41
ProvenanceWidget * provenanceWidget() const override
Returns the promoted ProvenanceWidget (named "provenanceWidget" in .ui).
Definition BadgeSeverityDetailDialog.cpp:57
bool hasUnsavedChanges() const override
Definition BadgeSeverityDetailDialog.hpp:78
QTabWidget * tabWidget() const override
Returns the dialog's QTabWidget (named "tabWidget" in .ui).
Definition BadgeSeverityDetailDialog.cpp:49
QWidget * provenanceTab() const override
Returns the Provenance tab widget (named "provenanceTab" in .ui).
Definition BadgeSeverityDetailDialog.cpp:53
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