schema_editor/comdel/display/name_dialog.h

39 lines
800 B
C
Raw Normal View History

2022-04-19 06:16:41 +00:00
#ifndef NAME_DIALOG_H
#define NAME_DIALOG_H
#include <QDialog>
2022-04-20 19:50:39 +00:00
#include <QLabel>
#include <QVBoxLayout>
#include <QLineEdit>
#include <QPushButton>
#include <set>
2022-04-19 06:16:41 +00:00
#include <comdel/domain/instance.h>
namespace display {
2022-05-27 06:18:17 +00:00
class NameDialog : public QDialog {
2022-04-20 19:50:39 +00:00
std::set<std::string> usedNames;
2022-05-27 06:18:17 +00:00
QLineEdit *edit = nullptr;
domain::ComponentInstance *componentInstance = nullptr;
domain::BusInstance *busInstance = nullptr;
QPushButton *button;
2022-04-20 19:50:39 +00:00
2022-05-27 06:18:17 +00:00
public:
2022-04-19 06:16:41 +00:00
NameDialog(domain::ComponentInstance *instance, std::set<std::string>& names);
2022-05-15 15:00:20 +00:00
NameDialog(domain::BusInstance *instance, std::set<std::string>& names);
2022-05-15 15:00:20 +00:00
2022-05-27 06:18:17 +00:00
public slots:
void onNameUpdate(const QString& text);
2022-05-27 06:18:17 +00:00
void onNameChange();
};
2022-04-19 06:16:41 +00:00
}
2022-04-20 19:50:39 +00:00
#endif //NAME_DIALOG_H