File indexing completed on 2024-09-08 06:44:57
0001 /* 0002 This file is part of the KDE libraries 0003 SPDX-FileCopyrightText: 2007 Urs Wolfer <uwolfer at kde.org> 0004 0005 Parts of this class have been take from the KAboutKDE class, which was 0006 SPDX-FileCopyrightText: 2000 Espen Sand <espen@kde.org> 0007 0008 SPDX-License-Identifier: LGPL-2.0-only 0009 */ 0010 0011 #include "kaboutkdedialog_p.h" 0012 0013 #include <QDialogButtonBox> 0014 #include <QHBoxLayout> 0015 #include <QLabel> 0016 #include <QStandardPaths> 0017 #include <QTabWidget> 0018 #include <QVBoxLayout> 0019 0020 #include <KLocalizedString> 0021 #include <KTitleWidget> 0022 0023 #include <kxmlgui_version.h> 0024 0025 namespace KDEPrivate 0026 { 0027 KAboutKdeDialog::KAboutKdeDialog(QWidget *parent) 0028 : QDialog(parent) 0029 , d(nullptr) 0030 { 0031 setWindowTitle(i18nc("@title:window", "About KDE")); 0032 0033 KTitleWidget *titleWidget = new KTitleWidget(this); 0034 titleWidget->setText(i18n("<html><font size=\"5\">KDE - Be Free!</font></html>")); 0035 titleWidget->setIconSize(QSize(48, 48)); 0036 titleWidget->setIcon(QIcon::fromTheme(QStringLiteral("kde")), KTitleWidget::ImageLeft); 0037 0038 QLabel *about = new QLabel; 0039 about->setMargin(10); 0040 about->setAlignment(Qt::AlignTop); 0041 about->setWordWrap(true); 0042 about->setOpenExternalLinks(true); 0043 about->setTextInteractionFlags(Qt::TextBrowserInteraction); 0044 about->setText( 0045 i18n("<html>" 0046 "<b>KDE</b> is a world-wide community of software engineers, artists, writers, " 0047 "translators and creators who are committed to <a href=\"%1\">Free Software</a> " 0048 "development. KDE produces the Plasma desktop environment, hundreds of applications, " 0049 "and the many software libraries that support them.<br /><br />" 0050 "KDE is a cooperative enterprise: no single entity controls its direction or products. " 0051 "Instead, we work together to achieve the common goal of building the world's finest " 0052 "Free Software. Everyone is welcome to <a href=\"%2\">join and contribute</a> to KDE, including you.<br /><br />" 0053 "Visit <a href=\"%3\">%3</a> for " 0054 "more information about the KDE community and the software we produce.</html>", 0055 QStringLiteral("https://www.gnu.org/philosophy/free-sw.html"), 0056 QStringLiteral("https://community.kde.org/Get_Involved"), 0057 QStringLiteral("https://www.kde.org/"))); 0058 0059 QLabel *report = new QLabel; 0060 report->setMargin(10); 0061 report->setAlignment(Qt::AlignTop); 0062 report->setWordWrap(true); 0063 report->setOpenExternalLinks(true); 0064 report->setTextInteractionFlags(Qt::TextBrowserInteraction); 0065 report->setText( 0066 i18n("<html>" 0067 "Software can always be improved, and the KDE team is ready to " 0068 "do so. However, you - the user - must tell us when " 0069 "something does not work as expected or could be done better.<br /><br />" 0070 "KDE has a bug tracking system. Visit " 0071 "<a href=\"%1\">%1</a> or " 0072 "use the \"Report Bug...\" dialog from the \"Help\" menu to report bugs.<br /><br />" 0073 "If you have a suggestion for improvement then you are welcome to use " 0074 "the bug tracking system to register your wish. Make sure you use the " 0075 "severity called \"Wishlist\".</html>", 0076 QStringLiteral("https://bugs.kde.org/"))); 0077 0078 QLabel *join = new QLabel; 0079 join->setMargin(10); 0080 join->setAlignment(Qt::AlignTop); 0081 join->setWordWrap(true); 0082 join->setOpenExternalLinks(true); 0083 join->setTextInteractionFlags(Qt::TextBrowserInteraction); 0084 join->setText( 0085 i18n("<html>" 0086 "You do not have to be a software developer to be a member of the " 0087 "KDE team. You can join the language teams that translate " 0088 "program interfaces. You can provide graphics, themes, sounds, and " 0089 "improved documentation. You decide!" 0090 "<br /><br />" 0091 "Visit " 0092 "<a href=\"%1\">%1</a> " 0093 "for information on some projects in which you can participate." 0094 "<br /><br />" 0095 "If you need more information or documentation, then a visit to " 0096 "<a href=\"%2\">%2</a> " 0097 "will provide you with what you need.</html>", 0098 QStringLiteral("https://community.kde.org/Get_Involved"), 0099 QStringLiteral("https://develop.kde.org/"))); 0100 0101 QLabel *support = new QLabel; 0102 support->setMargin(10); 0103 support->setAlignment(Qt::AlignTop); 0104 support->setWordWrap(true); 0105 support->setOpenExternalLinks(true); 0106 support->setTextInteractionFlags(Qt::TextBrowserInteraction); 0107 support->setText( 0108 i18n("<html>" 0109 "KDE software is and will always be available free of charge, however creating it is not free.<br /><br />" 0110 "To support development the KDE community has formed the KDE e.V., a non-profit organization " 0111 "legally founded in Germany. KDE e.V. represents the KDE community in legal and financial matters. " 0112 "See <a href=\"%1\">%1</a>" 0113 " for information on KDE e.V.<br /><br />" 0114 "KDE benefits from many kinds of contributions, including financial. " 0115 "We use the funds to reimburse members and others for expenses " 0116 "they incur when contributing. Further funds are used for legal " 0117 "support and organizing conferences and meetings. <br /> <br />" 0118 "We would like to encourage you to support our efforts with a " 0119 "financial donation, using one of the ways described at " 0120 "<a href=\"%2\">%2</a>." 0121 "<br /><br />Thank you very much in advance for your support.</html>", 0122 QStringLiteral("https://ev.kde.org/"), 0123 QStringLiteral("https://www.kde.org/community/donations/"))); 0124 support->setMinimumSize(support->sizeHint()); 0125 0126 QTabWidget *tabWidget = new QTabWidget; 0127 tabWidget->setUsesScrollButtons(false); 0128 tabWidget->addTab(about, i18nc("@title:tab About KDE", "&About")); 0129 tabWidget->addTab(report, i18nc("@title:tab", "&Report Bugs or Wishes")); 0130 tabWidget->addTab(join, i18nc("@title:tab", "&Join KDE")); 0131 tabWidget->addTab(support, i18nc("@title:tab", "&Support KDE")); 0132 0133 QLabel *image = new QLabel; 0134 QIcon icon(QStringLiteral(":/kxmlgui5/aboutkde.svg")); 0135 image->setPixmap(icon.pixmap(150, 250)); 0136 0137 QHBoxLayout *midLayout = new QHBoxLayout; 0138 midLayout->addWidget(image); 0139 midLayout->addWidget(tabWidget); 0140 0141 QDialogButtonBox *buttonBox = new QDialogButtonBox; 0142 buttonBox->setStandardButtons(QDialogButtonBox::Close); 0143 connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); 0144 connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); 0145 0146 QVBoxLayout *mainLayout = new QVBoxLayout; 0147 mainLayout->addWidget(titleWidget); 0148 mainLayout->addLayout(midLayout); 0149 mainLayout->addWidget(buttonBox); 0150 0151 setLayout(mainLayout); 0152 } 0153 0154 } 0155 0156 #include "moc_kaboutkdedialog_p.cpp"