| 7 | #include "ElaImageCard.h" |
| 8 | #include "ElaText.h" |
| 9 | T_About::T_About(QWidget* parent) |
| 10 | : ElaDialog(parent) |
| 11 | { |
| 12 | setFixedSize(400, 400); |
| 13 | setWindowTitle("关于.."); |
| 14 | setWindowIcon(QIcon(":/include/Image/Moon.jpg")); |
| 15 | this->setIsFixedSize(true); |
| 16 | setWindowModality(Qt::ApplicationModal); |
| 17 | setWindowButtonFlags(ElaAppBarType::CloseButtonHint); |
| 18 | ElaImageCard* pixCard = new ElaImageCard(this); |
| 19 | pixCard->setFixedSize(60, 60); |
| 20 | pixCard->setIsPreserveAspectCrop(false); |
| 21 | pixCard->setCardImage(QImage(":/include/Image/Moon.jpg")); |
| 22 | |
| 23 | QVBoxLayout* pixCardLayout = new QVBoxLayout(); |
| 24 | pixCardLayout->addWidget(pixCard); |
| 25 | pixCardLayout->addStretch(); |
| 26 | |
| 27 | ElaText* versionText = new ElaText("ElaWidgetTools-LK-2024", this); |
| 28 | QFont versionTextFont = versionText->font(); |
| 29 | versionTextFont.setWeight(QFont::Bold); |
| 30 | versionText->setFont(versionTextFont); |
| 31 | versionText->setWordWrap(false); |
| 32 | versionText->setTextPixelSize(18); |
| 33 | |
| 34 | ElaText* licenseText = new ElaText("MIT授权协议", this); |
| 35 | licenseText->setWordWrap(false); |
| 36 | licenseText->setTextPixelSize(14); |
| 37 | ElaText* supportText = new ElaText("Windows支持版本: QT5.12以上\nLinux支持版本: Qt5.14以上", this); |
| 38 | supportText->setWordWrap(false); |
| 39 | supportText->setTextPixelSize(14); |
| 40 | ElaText* contactText = new ElaText("作者: 80985@qq.com\n交流群: 850243692(QQ)", this); |
| 41 | contactText->setWordWrap(false); |
| 42 | contactText->setTextInteractionFlags(Qt::TextSelectableByMouse); |
| 43 | contactText->setTextPixelSize(14); |
| 44 | ElaText* helperText = new ElaText("用户手册及API文档付费提供\n提供额外的专业技术支持", this); |
| 45 | helperText->setWordWrap(false); |
| 46 | helperText->setTextPixelSize(14); |
| 47 | ElaText* copyrightText = new ElaText("版权所有 © 2024 Liniyous", this); |
| 48 | copyrightText->setWordWrap(false); |
| 49 | copyrightText->setTextPixelSize(14); |
| 50 | |
| 51 | QVBoxLayout* textLayout = new QVBoxLayout(); |
| 52 | textLayout->setSpacing(15); |
| 53 | textLayout->addWidget(versionText); |
| 54 | textLayout->addWidget(licenseText); |
| 55 | textLayout->addWidget(supportText); |
| 56 | textLayout->addWidget(contactText); |
| 57 | textLayout->addWidget(helperText); |
| 58 | textLayout->addWidget(copyrightText); |
| 59 | textLayout->addStretch(); |
| 60 | |
| 61 | QHBoxLayout* contentLayout = new QHBoxLayout(); |
| 62 | contentLayout->addSpacing(30); |
| 63 | contentLayout->addLayout(pixCardLayout); |
| 64 | contentLayout->addSpacing(30); |
| 65 | contentLayout->addLayout(textLayout); |
| 66 |
nothing calls this directly
no test coverage detected