1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/XMuli-lfxSpeed

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
aboutdialog.cpp 3 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
XMuli Отправлено 06.02.2022 11:37 8cfe655
/*
* Copyright (c) 2020 xmuli
*
* Author: xmuli(偕臧) xmulitech@gmail.com
* GitHub: https://github.com/xmuli
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* */
#include "aboutdialog.h"
#include <QWidget>
#include <QLayout>
#include <QDebug>
#include <DLabel>
DWIDGET_USE_NAMESPACE
AboutDialog::AboutDialog(QWidget *parent)
: DDialog(parent)
{
init();
}
void AboutDialog::init()
{
setTitle(tr("lfxSpeed"));
setMessage(tr("A light and fast network speed plugin(DDE)."));
QVBoxLayout* mainLayout = static_cast<QVBoxLayout *>(layout());
DLabel *labLogo = new DLabel();
labLogo->setPixmap(QPixmap(":/images/lfxSpeed.svg"));
labLogo->resize(200, 200);
mainLayout->insertWidget(1, labLogo, 0, Qt::AlignCenter);
QWidget *content = new QWidget();
QVBoxLayout *vLayout = new QVBoxLayout(content);
vLayout->setContentsMargins(0, 0, 0, 0);
vLayout->addSpacing(15);
DLabel *labVersion = new DLabel(tr("Version: 0.7 2022/02/06"));
DLabel *labCopyright = new DLabel(tr("Copyright (c) 2021 By XMuli"));
vLayout->addWidget(labVersion, 0, Qt::AlignCenter);
vLayout->addWidget(labCopyright, 0, Qt::AlignCenter);
vLayout->addSpacing(15);
QHBoxLayout *hLayout = new QHBoxLayout();
hLayout->setContentsMargins(0, 0, 0, 0);
DLabel *labAuthor = new DLabel();
labAuthor->setOpenExternalLinks(true);
labAuthor->setText(tr("<a href=\"https://ifmet.cn\">Author"));
DLabel *labAcknowledgements = new DLabel();
labAcknowledgements->setOpenExternalLinks(true);
labAcknowledgements->setText(tr("<a href=\"https://github.com/justforlxz\">Thanks"));
DLabel *labGithub = new DLabel();
labGithub->setOpenExternalLinks(true);
labGithub->setText(tr("<a href=\"https://github.com/xmuli/lfxSpeed\">GitHub"));
DLabel *labLicense = new DLabel();
labLicense->setOpenExternalLinks(true);
labLicense->setText(tr("<a href=\"https://github.com/xmuli/lfxSpeed/blob/master/LICENSE\">License"));
DLabel *labDonation = new DLabel();
labDonation->setOpenExternalLinks(true);
labDonation->setText(tr("<a href=\"\">Donation"));
hLayout->addStretch(1);
hLayout->addWidget(labAuthor);
hLayout->addWidget(labAcknowledgements);
hLayout->addWidget(labGithub);
hLayout->addWidget(labLicense);
hLayout->addStretch(1);
hLayout->setStretch(1, 1);
hLayout->setStretch(2, 1);
hLayout->setStretch(3, 1);
vLayout->addLayout(hLayout);
addContent(content);
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/XMuli-lfxSpeed.git
git@api.gitlife.ru:oschina-mirror/XMuli-lfxSpeed.git
oschina-mirror
XMuli-lfxSpeed
XMuli-lfxSpeed
master