porymap/include/ui/newlocationdialog.h
2025-02-05 23:35:25 -05:00

35 lines
703 B
C++

#ifndef NEWLOCATIONDIALOG_H
#define NEWLOCATIONDIALOG_H
#include <QDialog>
#include <QAbstractButton>
#include <QPointer>
#include "project.h"
namespace Ui {
class NewLocationDialog;
}
class NewLocationDialog : public QDialog
{
Q_OBJECT
public:
explicit NewLocationDialog(Project *project = nullptr, QWidget *parent = nullptr);
~NewLocationDialog();
virtual void accept() override;
private:
Ui::NewLocationDialog *ui;
QPointer<Project> project = nullptr;
const QString namePrefix;
bool validateIdName(bool allowEmpty = false);
void onIdNameChanged(const QString &name);
void dialogButtonClicked(QAbstractButton *button);
};
#endif // NEWLOCATIONDIALOG_H