#include "FormDeviceInfo.h"
#include "ui_FormDeviceInfo.h"

#include "LanguageManager.h"
#include "GeneralInterface.h"

FormDeviceInfo::FormDeviceInfo(BaseWidget *parent)
    : BaseWidget(parent)
    , ui(new Ui::FormDeviceInfo)
{
    ui->setupUi(this);

    connect(LanguageManager::instance(), &LanguageManager::languageChanged, this, [this]() { ui->retranslateUi(this); });

    // QPixmap pixmap = GeneralInterface::generateQRCode("https://blog.csdn.net/Jinyizhi2233/article/details/136703092?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522421368e8bee484efe61c4923817d2ce0%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=421368e8bee484efe61c4923817d2ce0&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-2-136703092-null-null.142^v102^pc_search_result_base1&utm_term=qt%E8%BF%9B%E9%98%B6&spm=1018.2226.3001.4187", 480);
    // if (!pixmap.isNull()) {
    //     ui->QrCode->setPixmap(pixmap);
    //     // ui->QrCode->setScaledContents(true);
    // }
}

FormDeviceInfo::~FormDeviceInfo()
{
    delete ui;
}

bool FormDeviceInfo::returnParent()
{
    return true;
}
