diff --git a/kybackup/aboutdialog.cpp b/kybackup/aboutdialog.cpp index 6d3fbcc..5a33b4d 100644 --- a/kybackup/aboutdialog.cpp +++ b/kybackup/aboutdialog.cpp @@ -6,11 +6,14 @@ #include #include #include +#include #include "xatom-helper.h" #include "gsettingswrapper.h" #include "./component/mylabel.h" #include "../common/utils.h" +#define SUPPORT "support@kylinos.cn" + AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDialog) @@ -85,6 +88,7 @@ AboutDialog::AboutDialog(QWidget *parent) : introduction->setIsOriginal(true); introduction->setWordWrap(true); introduction->setSizePolicy(sizePolicy); + // 麒麟备份还原工具是一款支持系统备份还原和数据备份还原的工具,当用户数据损坏或系统遭受攻击时能够通过该工具灵活的还原到备份节点的状态。针对国产软硬件平台开展了大量的优化和创新。 introduction->setDeplayText(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 " @@ -94,6 +98,17 @@ AboutDialog::AboutDialog(QWidget *parent) : hlayoutLine5->addWidget(introduction); hlayoutLine5->addStretch(); + // 第六行,服务与支持团队 + MyLabel *serviceAndSupport = new MyLabel; + serviceAndSupport->setIsOriginal(true); + serviceAndSupport->setDeplayText(tr("Service & Support: %1").arg(SUPPORT)); + serviceAndSupport->setAlignment(Qt::AlignCenter); + serviceAndSupport->setContextMenuPolicy(Qt::NoContextMenu); + QHBoxLayout *hlayoutLine6 = new QHBoxLayout; + hlayoutLine6->addStretch(); + hlayoutLine6->addWidget(serviceAndSupport); + hlayoutLine6->addStretch(); + QVBoxLayout *vlayout = new QVBoxLayout; vlayout->addLayout(hlayoutLine1); vlayout->addLayout(hlayoutLine2); @@ -101,9 +116,16 @@ AboutDialog::AboutDialog(QWidget *parent) : vlayout->addLayout(hlayoutLine4); vlayout->addLayout(hlayoutLine5); vlayout->addSpacing(20); + vlayout->addLayout(hlayoutLine6); + vlayout->addSpacing(20); vlayout->addStretch(); this->setLayout(vlayout); this->adjustSize(); + + connect(serviceAndSupport, &QLabel::linkActivated, this, [=](const QString url) { + QDesktopServices::openUrl(QUrl(url)); + }); + } QString AboutDialog::getBackupVersion() @@ -120,14 +142,6 @@ QString AboutDialog::getBackupVersion() return version; } -//void AboutDialog::resizeEvent(QResizeEvent *event) -//{ -// // 警告:在resizeEvent()中调用resize()或setGeometry()可能导致无限递归。所以最好不要这样用 -// if (event->oldSize() != event->size()) { -// this->resize(event->size()); -// } -//} - AboutDialog::~AboutDialog() { delete ui; diff --git a/kybackup/aboutdialog.h b/kybackup/aboutdialog.h index 1cec9f6..3656319 100644 --- a/kybackup/aboutdialog.h +++ b/kybackup/aboutdialog.h @@ -18,8 +18,6 @@ public: QString getBackupVersion(); - //virtual void resizeEvent(QResizeEvent *event); - private: Ui::AboutDialog *ui; };