2017-06-07 10:09:24 +02:00
|
|
|
#pragma once
|
2017-01-17 00:15:44 +01:00
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
#include <QLineEdit>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QString>
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
2017-04-14 17:52:22 +02:00
|
|
|
namespace chatterino {
|
2017-01-18 21:30:23 +01:00
|
|
|
|
2017-01-17 00:15:44 +01:00
|
|
|
class TextInputDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2017-06-11 09:37:30 +02:00
|
|
|
TextInputDialog(QWidget *parent = nullptr);
|
2017-01-17 00:15:44 +01:00
|
|
|
|
2018-07-06 19:23:47 +02:00
|
|
|
QString getText() const;
|
|
|
|
void setText(const QString &text);
|
2017-01-17 00:15:44 +01:00
|
|
|
|
2018-04-07 21:21:56 +02:00
|
|
|
void highlightText();
|
|
|
|
|
2017-01-17 00:15:44 +01:00
|
|
|
private:
|
2018-07-06 19:23:47 +02: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-06-07 10:09:24 +02:00
|
|
|
} // namespace chatterino
|