41 lines
694 B
C++
41 lines
694 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"
|
|
#include "generic_dialog.h"
|
|
|
|
namespace display {
|
|
|
|
class NameDialog : public GenericDialog {
|
|
|
|
public:
|
|
NameDialog(std::string currentName, std::set<std::string>& names);
|
|
|
|
std::string getName();
|
|
|
|
protected:
|
|
bool onUpdate() override;
|
|
|
|
public slots:
|
|
void onNameUpdate(const QString& text);
|
|
|
|
private:
|
|
std::set<std::string> usedNames;
|
|
QLineEdit *edit = nullptr;
|
|
std::string currentName;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
#endif //NAME_DIALOG_H
|