31 lines
491 B
C++
31 lines
491 B
C++
#ifndef DIALOG_H
|
|
#define DIALOG_H
|
|
|
|
#include <QDialog>
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
namespace Ui { class Dialog; }
|
|
QT_END_NAMESPACE
|
|
|
|
class Dialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
Dialog(QWidget *parent = nullptr);
|
|
~Dialog();
|
|
int showPrompt(const QString& prompt);
|
|
QString getInput();
|
|
|
|
private slots:
|
|
void on_txtInput_returnPressed();
|
|
|
|
private:
|
|
Ui::Dialog *ui;
|
|
|
|
// QWidget interface
|
|
protected:
|
|
void closeEvent(QCloseEvent *event) override;
|
|
};
|
|
#endif // DIALOG_H
|