schema_editor/comdel/display/name_dialog.h

39 lines
800 B
C++

#ifndef NAME_DIALOG_H
#define NAME_DIALOG_H
#include <QDialog>
#include <QLabel>
#include <QVBoxLayout>
#include <QLineEdit>
#include <QPushButton>
#include <set>
#include <comdel/domain/instance.h>
namespace display {
class NameDialog : public QDialog {
std::set<std::string> usedNames;
QLineEdit *edit = nullptr;
domain::ComponentInstance *componentInstance = nullptr;
domain::BusInstance *busInstance = nullptr;
QPushButton *button;
public:
NameDialog(domain::ComponentInstance *instance, std::set<std::string>& names);
NameDialog(domain::BusInstance *instance, std::set<std::string>& names);
public slots:
void onNameUpdate(const QString& text);
void onNameChange();
};
}
#endif //NAME_DIALOG_H