#ifndef AISERVICEDIALOG_H
#define AISERVICEDIALOG_H

#include <QDialog>
#include <QPushButton>
#include <QLabel>
#include <QShowEvent>

class AiServiceDialog : public QDialog
{
    Q_OBJECT
public:
    explicit AiServiceDialog(QWidget *parent = nullptr);
    ~AiServiceDialog();

    void setLowVersionText();

protected:
    void showEvent(QShowEvent *event) override;

private:
    void initLayout();
    void initConnect();
    void openUkuiControlCenter();
    void applyFont(const qreal fontSize, const QString &fontFamily);
    void elidePushButtonText(QPushButton *btn, const QString &fullText);
    void refreshButtonElide();
    int getLabelHeight(QLabel *label);
    void updateFixedSize();
    QScreen *getCurrentScreen(); // 获取当前所在屏幕
    void moveToCenter();

private:
    QString m_cancelButtonFullText;
    QString m_goButtonFullText;

    QPushButton *closeButton;
    QPushButton *cancelButton;
    QPushButton *goButton;
    QLabel *iconLabel;
    QLabel *titleLabel;
    QLabel *detailLabel;

signals:

};

#endif // AISERVICEDIALOG_H
