#ifndef INPUTCHANGE_H
#define INPUTCHANGE_H

#include <QDialog>
#include <QMessageBox>
#include <QKeyEvent>
#include "windowtitle.h"
#include "src/frame/xatom-helper.h"
namespace Ui {
class InputChange;
}

class InputChange : public QDialog
{
    Q_OBJECT
signals:
    void content1(QString);
    void result1(QString);
public:
    explicit InputChange(QWidget *parent = nullptr);
    ~InputChange();
    bool isWayland() {return m_bIsWayland; }
private:
    bool    m_bIsWayland;
    QString m_labelContent;
    QPushButton *m_oCancelBtn;
    QPushButton *m_oEnsureBtn;
    QString m_result;
private:
    Ui::InputChange *ui;
public slots:
    QString input(QString, QString, QString result = QString());
    void setText(QString);
    void close();
public:
    int information(QString, QString, bool next = false);
    void error(QString, QString, bool next = false);
    bool question(QString, QString, bool next = false);
    QString result();
    QString content();
    void setResult(QString);
    void setcontext(QString);
    bool input(QString&, QString, QString, QString result);
    QPushButton* replayEnsure();
    QPushButton* replayCancel();
protected:
    void keyPressEvent(QKeyEvent *event);
};

#endif // INPUTCHANGE_H
