mirror-chatterino2/textinputdialog.h

43 lines
702 B
C
Raw Normal View History

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
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();
};
#endif // TEXTINPUTDIALOG_H