2022-01-28 12:06:03 +08:00
|
|
|
#include "aboutdialog.h"
|
|
|
|
#include <QRegularExpression>
|
2022-06-09 17:27:06 +08:00
|
|
|
#include "globalbackupinfo.h"
|
2022-01-28 12:06:03 +08:00
|
|
|
#include "../common/utils.h"
|
|
|
|
|
2022-02-24 15:35:36 +08:00
|
|
|
// #define SUPPORT "<a href=\"mailto://support@kylinos.cn\">support@kylinos.cn</a>"
|
|
|
|
#define SUPPORT "<u>support@kylinos.cn</u>"
|
2022-02-10 10:12:29 +08:00
|
|
|
|
2022-01-28 12:06:03 +08:00
|
|
|
AboutDialog::AboutDialog(QWidget *parent) :
|
2022-06-09 17:27:06 +08:00
|
|
|
kdk::KAboutDialog(parent)
|
2022-01-28 12:06:03 +08:00
|
|
|
{
|
2022-06-29 17:34:08 +08:00
|
|
|
//setWindowIcon(QIcon::fromTheme(THEME_YHKYLIN_BACKUP_TOOLS, QIcon(":/images/yhkylin-backup-tools.png")));
|
|
|
|
setAppIcon(QIcon::fromTheme(THEME_YHKYLIN_BACKUP_TOOLS, QIcon(":/images/yhkylin-backup-tools.png")));
|
2022-06-15 13:52:02 +08:00
|
|
|
//setWindowTitle(tr("Backup & Restore"));
|
2022-06-09 17:27:06 +08:00
|
|
|
setAppName(tr("Backup & Restore"));
|
2022-07-11 15:21:58 +08:00
|
|
|
setAppVersion(tr("version:") + getBackupVersion());
|
2022-02-10 10:12:29 +08:00
|
|
|
// 麒麟备份还原工具是一款支持系统备份还原和数据备份还原的工具,当用户数据损坏或系统遭受攻击时能够通过该工具灵活的还原到备份节点的状态。针对国产软硬件平台开展了大量的优化和创新。
|
2022-06-09 17:27:06 +08:00
|
|
|
setBodyText(tr("The backup tool is a tool that supports system backup and data backup. "
|
|
|
|
"When the user data is damaged or the system is attacked, the tool can flexibly restore "
|
|
|
|
"the status of the backup node. A lot of optimization and innovation have been "
|
|
|
|
"carried out for domestic hardware and software platforms."));
|
2022-07-20 16:01:16 +08:00
|
|
|
// setBodyTextVisiable(true);
|
2022-07-20 13:52:07 +08:00
|
|
|
// setAppSupport(tr("Service & Support: %1").arg(SUPPORT));
|
2022-06-09 17:27:06 +08:00
|
|
|
|
|
|
|
connect(GlobelBackupInfo::inst().getGlobalSignals(), &GlobalSignals::themeIconChanged, this, [=](){
|
2022-06-29 17:34:08 +08:00
|
|
|
this->setAppIcon(QIcon::fromTheme(THEME_YHKYLIN_BACKUP_TOOLS, QIcon(":/images/yhkylin-backup-tools.png")));
|
2022-02-10 10:12:29 +08:00
|
|
|
});
|
2022-01-28 12:06:03 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
QString AboutDialog::getBackupVersion()
|
|
|
|
{
|
|
|
|
QString version;
|
|
|
|
Utils::executeCMD("dpkg -l yhkylin-backup-tools | grep yhkylin-backup-tools", version);
|
|
|
|
// "ii yhkylin-backup-tools 4.0.13-kylin72 amd64 YHkylin backup tools\n"
|
|
|
|
QStringList fields = version.split(QRegularExpression("[ \t]+"));
|
|
|
|
if (fields.size() >= 3)
|
|
|
|
version = fields.at(2);
|
|
|
|
else
|
|
|
|
version = "none";
|
|
|
|
|
|
|
|
return version;
|
|
|
|
}
|
|
|
|
|
|
|
|
AboutDialog::~AboutDialog()
|
|
|
|
{
|
|
|
|
}
|
2022-02-22 15:25:28 +08:00
|
|
|
|