2022-06-05 17:02:44 +00:00
|
|
|
#ifndef SCHEMEEDITOR_SINGLE_AUTOMATIC_DIALOG_H
|
|
|
|
#define SCHEMEEDITOR_SINGLE_AUTOMATIC_DIALOG_H
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
#include "comdel/domain/value.h"
|
|
|
|
#include "comdel/domain/instance_attribute.h"
|
2022-06-13 22:53:46 +00:00
|
|
|
#include "generic_dialog.h"
|
2022-06-05 17:02:44 +00:00
|
|
|
|
|
|
|
namespace display {
|
|
|
|
|
2022-06-13 22:53:46 +00:00
|
|
|
class SingleAutomaticDialog: public GenericDialog {
|
2022-06-05 17:02:44 +00:00
|
|
|
domain::Value firstValue;
|
|
|
|
domain::Value secondValue;
|
|
|
|
std::vector<domain::InstanceAttribute> &attributes;
|
|
|
|
|
|
|
|
public:
|
2022-06-13 22:53:46 +00:00
|
|
|
explicit SingleAutomaticDialog(
|
|
|
|
std::string title,
|
|
|
|
std::string action,
|
|
|
|
std::vector<domain::InstanceAttribute>& values);
|
2022-06-05 17:02:44 +00:00
|
|
|
|
2022-06-13 22:53:46 +00:00
|
|
|
protected:
|
|
|
|
bool onUpdate() override;
|
2022-06-05 17:02:44 +00:00
|
|
|
void setupValues(QVBoxLayout *layout, domain::InstanceAttribute &attribute, void (display::SingleAutomaticDialog::* handler)(int));
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
void onFirstEnumerationChanged(int index);
|
|
|
|
void onSecondEnumerationChanged(int index);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // display
|
|
|
|
|
|
|
|
#endif //SCHEMEEDITOR_SINGLE_AUTOMATIC_DIALOG_H
|