关于界面

This commit is contained in:
zhaominyong 2022-02-10 10:12:29 +08:00
parent db6438005d
commit 2c760cb233
2 changed files with 22 additions and 10 deletions

View File

@ -6,11 +6,14 @@
#include <QLabel>
#include <QRegularExpression>
#include <QSizePolicy>
#include <QDesktopServices>
#include "xatom-helper.h"
#include "gsettingswrapper.h"
#include "./component/mylabel.h"
#include "../common/utils.h"
#define SUPPORT "<a href=\"mailto://support@kylinos.cn\">support@kylinos.cn</a>"
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;

View File

@ -18,8 +18,6 @@ public:
QString getBackupVersion();
//virtual void resizeEvent(QResizeEvent *event);
private:
Ui::AboutDialog *ui;
};