20#ifndef ORES_QT_CHANGE_REASON_DIALOG_HPP
21#define ORES_QT_CHANGE_REASON_DIALOG_HPP
28#include <QDialogButtonBox>
30#include "ores.dq/domain/change_reason.hpp"
73 const std::vector<dq::domain::change_reason>& reasons,
76 QWidget* parent =
nullptr);
95 void onReasonChanged(
int index);
96 void onCommentaryChanged();
97 void validateAndAccept();
101 void updateValidation();
103 std::vector<dq::domain::change_reason> reasons_;
105 bool hasFieldChanges_;
107 QComboBox* reasonCombo_;
108 QLabel* descriptionLabel_;
109 QLabel* commentaryLabel_;
110 QTextEdit* commentaryEdit_;
111 QLabel* requiredLabel_;
112 QDialogButtonBox* buttonBox_;
113 QPushButton* saveButton_;
115 bool commentary_required_{
false};
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:35
Dialog for selecting a change reason when saving/deleting entities.
Definition ChangeReasonDialog.hpp:50
std::string selectedReasonCode() const
Get the selected reason code.
Definition ChangeReasonDialog.cpp:237
OperationType
Type of operation requiring a change reason.
Definition ChangeReasonDialog.hpp:57
@ Delete
Deleting an entity.
@ Amend
Updating an existing entity.
std::string commentary() const
Get the commentary entered by the user.
Definition ChangeReasonDialog.cpp:245