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>
|
|
|
|
|
2017-01-18 21:30:23 +01:00
|
|
|
namespace chatterino {
|
|
|
|
namespace widgets {
|
|
|
|
|
2017-01-17 00:15:44 +01:00
|
|
|
class TextInputDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
TextInputDialog(QWidget *parent = NULL);
|
|
|
|
|
|
|
|
QString
|
2017-01-18 04:33:30 +01:00
|
|
|
getText() const
|
2017-01-17 00:15:44 +01:00
|
|
|
{
|
2017-01-18 04:33:30 +01:00
|
|
|
return lineEdit.text();
|
2017-01-17 00:15:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
setText(const QString &text)
|
|
|
|
{
|
2017-01-18 04:33:30 +01:00
|
|
|
lineEdit.setText(text);
|
2017-01-17 00:15:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
2017-01-18 04:33:30 +01:00
|
|
|
QVBoxLayout vbox;
|
|
|
|
QLineEdit lineEdit;
|
|
|
|
QHBoxLayout buttonBox;
|
|
|
|
QPushButton okButton;
|
|
|
|
QPushButton cancelButton;
|
2017-01-17 00:15:44 +01:00
|
|
|
|
2017-01-17 00:42:32 +01:00
|
|
|
private slots:
|
2017-01-17 00:15:44 +01:00
|
|
|
void okButtonClicked();
|
|
|
|
void cancelButtonClicked();
|
|
|
|
};
|
2017-01-18 21:30:23 +01:00
|
|
|
}
|
|
|
|
}
|
2017-01-17 00:15:44 +01:00
|
|
|
|
|
|
|
#endif // TEXTINPUTDIALOG_H
|