2017-01-17 00:15:44 +01:00
|
|
|
#ifndef TEXTINPUTDIALOG_H
|
|
|
|
#define TEXTINPUTDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
#include <QLineEdit>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QString>
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
|
|
|
class TextInputDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
TextInputDialog(QWidget *parent = NULL);
|
|
|
|
|
|
|
|
QString
|
|
|
|
text() const
|
|
|
|
{
|
|
|
|
return m_lineEdit.text();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
setText(const QString &text)
|
|
|
|
{
|
|
|
|
m_lineEdit.setText(text);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
QVBoxLayout m_vbox;
|
|
|
|
QLineEdit m_lineEdit;
|
|
|
|
QHBoxLayout m_buttonBox;
|
|
|
|
QPushButton m_okButton;
|
|
|
|
QPushButton m_cancelButton;
|
|
|
|
|
2017-01-17 00:42:32 +01:00
|
|
|
private slots:
|
2017-01-17 00:15:44 +01:00
|
|
|
void okButtonClicked();
|
|
|
|
void cancelButtonClicked();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TEXTINPUTDIALOG_H
|