20#ifndef ORES_QT_CHANGE_REASON_DIALOG_HPP
21#define ORES_QT_CHANGE_REASON_DIALOG_HPP
28#include <QDialogButtonBox>
30#include "ores.dq.api/domain/change_reason.hpp"
75 const std::vector<dq::domain::change_reason>& reasons,
78 QWidget* parent =
nullptr);
97 void onReasonChanged(
int index);
98 void onCommentaryChanged();
99 void validateAndAccept();
103 void updateValidation();
105 std::vector<dq::domain::change_reason> reasons_;
107 bool hasFieldChanges_;
109 QComboBox* reasonCombo_;
110 QLabel* descriptionLabel_;
111 QLabel* commentaryLabel_;
112 QTextEdit* commentaryEdit_;
113 QLabel* requiredLabel_;
114 QDialogButtonBox* buttonBox_;
115 QPushButton* saveButton_;
117 bool commentary_required_{
false};
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:29
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:250
OperationType
Type of operation requiring a change reason.
Definition ChangeReasonDialog.hpp:57
@ Create
Creating a new entity.
@ Delete
Deleting an entity.
@ Amend
Updating an existing entity.
std::string commentary() const
Get the commentary entered by the user.
Definition ChangeReasonDialog.cpp:258