| 1 | #ifndef DIALOG_H |
|---|---|
| 2 | #define DIALOG_H |
| 3 | |
| 4 | #include <QDialog> |
| 5 | |
| 6 | QT_BEGIN_NAMESPACE |
| 7 | namespace Ui { class Dialog; } |
| 8 | QT_END_NAMESPACE |
| 9 | |
| 10 | class Dialog : public QDialog |
| 11 | { |
| 12 | Q_OBJECT |
| 13 | |
| 14 | public: |
| 15 | Dialog(QWidget *parent = nullptr); |
| 16 | ~Dialog(); |
| 17 | int showPrompt(const QString& prompt); |
| 18 | QString getInput(); |
| 19 | |
| 20 | private slots: |
| 21 | void on_txtInput_returnPressed(); |
| 22 | |
| 23 | private: |
| 24 | Ui::Dialog *ui; |
| 25 | |
| 26 | // QWidget interface |
| 27 | protected: |
| 28 | void closeEvent(QCloseEvent *event) override; |
| 29 | }; |
| 30 | #endif // DIALOG_H |
| 31 |