schema_editor/comdel/display/dialog/attribute_dialog.h

48 lines
1.1 KiB
C
Raw Normal View History

2022-06-13 22:53:46 +00:00
#ifndef ATTRIBUTE_DIALOG_H
#define ATTRIBUTE_DIALOG_H
#include <QIntValidator>
#include <QPushButton>
#include <QComboBox>
#include <QGroupBox>
#include <QRadioButton>
#include <QDialog>
#include <QLineEdit>
#include <QLabel>
#include <QVBoxLayout>
#include <utility>
#include "comdel/domain/instance_attribute.h"
#include "comdel/domain/value.h"
#include "comdel/domain/comdel_validator.h"
#include "generic_dialog.h"
namespace display {
class AttributeDialog : public GenericDialog {
public:
AttributeDialog(std::string title, std::string action, domain::InstanceAttribute *attribute);
public slots:
void onTextChanged(const QString &string);
void onEnumerationChanged(int index);
protected:
bool onUpdate() override;
private:
QComboBox *setupEnumeration();
QLineEdit *setupLineEdit(domain::Value::ValueType type);
QGroupBox *setupBool();
std::vector<domain::ValidationError> validate();
domain::Value value;
domain::InstanceAttribute *attributeValue;
domain::Popup popup;
};
}
#endif //ATTRIBUTE_DIALOG_H