37 lines
654 B
C++
37 lines
654 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;
|
|
std::string currentName;
|
|
QPushButton *button;
|
|
|
|
public:
|
|
NameDialog(std::string currentName, std::set<std::string>& names);
|
|
|
|
std::string getName();
|
|
|
|
public slots:
|
|
void onNameUpdate(const QString& text);
|
|
void onNameChange();
|
|
};
|
|
|
|
}
|
|
|
|
|
|
#endif //NAME_DIALOG_H
|