OGS
SetNameDialog.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <QDialog>
18#include "GeoLib/GeoType.h"
19
20class QDialogButtonBox;
21class QLabel;
22class QLineEdit;
23class QVBoxLayout;
24
28class SetNameDialog : public QDialog
29{
30 Q_OBJECT
31
32public:
34 SetNameDialog(const std::string& geo_object_type, std::size_t id,
35 const std::string& old_name, QDialog* parent = nullptr);
36 ~SetNameDialog() override;
37
38 std::string getNewName();
39
40private:
42 void setupDialog(const QString &label, const std::string &old_name);
43
44 QLabel* _txt_label;
45 QLineEdit* _new_name;
46 QVBoxLayout* _layout;
47 QDialogButtonBox* _buttonBox;
48
49private slots:
51 void accept() override;
52
54 void reject() override;
55};
Definition of the GEOTYPE enumeration.
Small dialog for setting a name for an object.
void setupDialog(const QString &label, const std::string &old_name)
Constructs a dialog window.
QDialogButtonBox * _buttonBox
QLineEdit * _new_name
std::string getNewName()
QLabel * _txt_label
void reject() override
Instructions if the Cancel-Button has been pressed.
~SetNameDialog() override
void accept() override
Instructions if the OK-Button has been pressed.
SetNameDialog(const std::string &geo_object_type, std::size_t id, const std::string &old_name, QDialog *parent=nullptr)
Constructor.
QVBoxLayout * _layout