mirror-chatterino2/widgets/textinputdialog.h
2017-01-18 21:30:23 +01:00

48 lines
750 B
C++

#ifndef TEXTINPUTDIALOG_H
#define TEXTINPUTDIALOG_H
#include <QDialog>
#include <QHBoxLayout>
#include <QLineEdit>
#include <QPushButton>
#include <QString>
#include <QVBoxLayout>
namespace chatterino {
namespace widgets {
class TextInputDialog : public QDialog
{
Q_OBJECT
public:
TextInputDialog(QWidget *parent = NULL);
QString
getText() const
{
return lineEdit.text();
}
void
setText(const QString &text)
{
lineEdit.setText(text);
}
private:
QVBoxLayout vbox;
QLineEdit lineEdit;
QHBoxLayout buttonBox;
QPushButton okButton;
QPushButton cancelButton;
private slots:
void okButtonClicked();
void cancelButtonClicked();
};
}
}
#endif // TEXTINPUTDIALOG_H