#ifndef PROMPTWIDGET_H
#define PROMPTWIDGET_H
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QLabel>
#include <QPushButton>
#include <QWidget>
#include <QFrame>
#include <QObject>
#include <QDialog>
#include <QPainter>
#include <QStyleOption>
#include "controller/Interaction.h"
#include "global/viewvar.h"
#include <QMovie>
class PromptWidget : public QWidget
{
    Q_OBJECT
public:
    explicit PromptWidget(QWidget *parent = nullptr);
    void initLayout(QString netError, int m_judgeFullScreen);
    int m_judgeFullScreen = 0;
    //    int m_judgeFullScreen;
    void isFullScreen(int m_isFullScreen);
    void changeLoadingIconToButton();

private:
    QHBoxLayout *m_networkErrorLayout = nullptr;
    QHBoxLayout *m_networkErrorIconLayout = nullptr;
    QLabel *m_networkWarnIconLabel = nullptr;
    QLabel *m_lodingIconLabel = nullptr;
    QString m_iconPath;
    QPixmap m_networkErrorIcon;
    QVBoxLayout *m_networkErrorRightLayout = nullptr;
    QLabel *m_networkErrorCode = nullptr;
    QPushButton *m_retryButton = nullptr;
    QString m_retryButtonIconPath;
    QPixmap m_retryButtonIcon;
    QHBoxLayout *m_networkErrorRightRetryButtonLayout = nullptr;
    QMovie *m_loadingMovie = nullptr;
    void paintEvent(QPaintEvent *event);
    void addItems();
    void initConnect();
    QString netErrorWords = " "; // 网络异常提示信息字段
    void lable2SetFontSizeSlot(int size);
    QGSettings *m_fontSize = nullptr;
    QFont m_font;

private slots:
    void monitorThemeChanged(QString themeChange);
    void changeButtonToLodingIcon();

signals:
};

#endif // PROMPTWIDGET_H
