mirror-chatterino2/src/widgets/dialogs/TextInputDialog.hpp

37 lines
625 B
C++
Raw Normal View History

#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:
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
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();
};
} // namespace chatterino