48 inline static std::string_view logger_name =
49 "ores.qt.change_reason_detail_dialog";
51 [[nodiscard]]
static auto& lg() {
53 static auto instance = make_logger(logger_name);
62 void setUsername(
const std::string& username);
66 void setCreateMode(
bool createMode);
67 void setReadOnly(
bool readOnly,
int versionNumber = 0);
68 void setHistory(
const std::vector<dq::domain::change_reason>& history,
73 void setCategories(
const std::vector<dq::domain::change_reason_category>& categories);
75 QString changeReasonCode()
const;
76 bool isDirty()
const {
return isDirty_; }
77 bool isReadOnly()
const {
return isReadOnly_; }
80 void isDirtyChanged(
bool dirty);
81 void changeReasonSaved(
const QString& code);
82 void changeReasonDeleted(
const QString& code);
86 void onDeleteClicked();
87 void onFieldChanged();
90 void onFirstVersionClicked();
91 void onPrevVersionClicked();
92 void onNextVersionClicked();
93 void onLastVersionClicked();
96 void updateSaveButtonState();
97 void closeParentWindow();
98 void displayCurrentVersion();
99 void updateVersionNavButtonStates();
100 void showVersionNavActions(
bool visible);
101 void populateCategoryComboBox();
104 Ui::ChangeReasonDetailDialog* ui_;
106 QAction* saveAction_;
107 QAction* deleteAction_;
108 QAction* revertAction_;
111 std::vector<dq::domain::change_reason_category> categories_;
115 std::string modifiedByUsername_;
119 std::vector<dq::domain::change_reason> history_;
120 int currentHistoryIndex_;
121 QAction* firstVersionAction_;
122 QAction* prevVersionAction_;
123 QAction* nextVersionAction_;
124 QAction* lastVersionAction_;