47 inline static std::string_view logger_name =
48 "ores.qt.feature_flag_detail_dialog";
50 [[nodiscard]]
static auto& lg() {
52 static auto instance = make_logger(logger_name);
61 void setUsername(
const std::string& username);
65 void setCreateMode(
bool createMode);
66 void setReadOnly(
bool readOnly,
int versionNumber = 0);
67 void setHistory(
const std::vector<variability::domain::feature_flags>& history,
72 QString featureFlagName()
const;
73 bool isDirty()
const {
return isDirty_; }
74 bool isReadOnly()
const {
return isReadOnly_; }
77 void isDirtyChanged(
bool dirty);
78 void featureFlagSaved(
const QString& name);
79 void featureFlagDeleted(
const QString& name);
83 void onDeleteClicked();
84 void onFieldChanged();
87 void onFirstVersionClicked();
88 void onPrevVersionClicked();
89 void onNextVersionClicked();
90 void onLastVersionClicked();
93 void updateSaveButtonState();
94 void closeParentWindow();
95 void displayCurrentVersion();
96 void updateVersionNavButtonStates();
97 void showVersionNavActions(
bool visible);
100 Ui::FeatureFlagDetailDialog* ui_;
102 QAction* saveAction_;
103 QAction* deleteAction_;
104 QAction* revertAction_;
110 std::string modifiedByUsername_;
114 std::vector<variability::domain::feature_flags> history_;
115 int currentHistoryIndex_;
116 QAction* firstVersionAction_;
117 QAction* prevVersionAction_;
118 QAction* nextVersionAction_;
119 QAction* lastVersionAction_;