1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2007 Urs Wolfer <uwolfer at kde.org>
4
5 Parts of this class have been take from the KAboutKDE class, which was
6 SPDX-FileCopyrightText: 2000 Espen Sand <espen@kde.org>
7
8 SPDX-License-Identifier: LGPL-2.0-only
9*/
10
11#include "kaboutkdedialog_p.h"
12
13#include <QDialogButtonBox>
14#include <QHBoxLayout>
15#include <QLabel>
16#include <QStandardPaths>
17#include <QTabWidget>
18#include <QVBoxLayout>
19
20#include <KLocalizedString>
21#include <KTitleWidget>
22
23#include <kxmlgui_version.h>
24
25namespace KDEPrivate
26{
27KAboutKdeDialog::KAboutKdeDialog(QWidget *parent)
28 : QDialog(parent)
29 , d(nullptr)
30{
31 setWindowTitle(i18nc("@title:window", "About KDE"));
32
33 KTitleWidget *titleWidget = new KTitleWidget(this);
34 titleWidget->setText(i18n("<html><font size=\"5\">KDE - Be Free!</font></html>"));
35 titleWidget->setIconSize(QSize(48, 48));
36 titleWidget->setIcon(icon: QIcon::fromTheme(QStringLiteral("kde")), alignment: KTitleWidget::ImageLeft);
37
38 QLabel *about = new QLabel;
39 about->setMargin(10);
40 about->setAlignment(Qt::AlignTop);
41 about->setWordWrap(true);
42 about->setOpenExternalLinks(true);
43 about->setTextInteractionFlags(Qt::TextBrowserInteraction);
44 about->setText(
45 i18n("<html>"
46 "<b>KDE</b> is a world-wide community of software engineers, artists, writers, "
47 "translators and creators who are committed to <a href=\"%1\">Free Software</a> "
48 "development. KDE produces the Plasma desktop environment, hundreds of applications, "
49 "and the many software libraries that support them.<br /><br />"
50 "KDE is a cooperative enterprise: no single entity controls its direction or products. "
51 "Instead, we work together to achieve the common goal of building the world's finest "
52 "Free Software. Everyone is welcome to <a href=\"%2\">join and contribute</a> to KDE, including you.<br /><br />"
53 "Visit <a href=\"%3\">%3</a> for "
54 "more information about the KDE community and the software we produce.</html>",
55 QStringLiteral("https://www.gnu.org/philosophy/free-sw.html"),
56 QStringLiteral("https://community.kde.org/Get_Involved"),
57 QStringLiteral("https://www.kde.org/")));
58
59 QLabel *report = new QLabel;
60 report->setMargin(10);
61 report->setAlignment(Qt::AlignTop);
62 report->setWordWrap(true);
63 report->setOpenExternalLinks(true);
64 report->setTextInteractionFlags(Qt::TextBrowserInteraction);
65 report->setText(
66 i18n("<html>"
67 "Software can always be improved, and the KDE team is ready to "
68 "do so. However, you - the user - must tell us when "
69 "something does not work as expected or could be done better.<br /><br />"
70 "KDE has a bug tracking system. Visit "
71 "<a href=\"%1\">%1</a> or "
72 "use the \"Report Bug...\" dialog from the \"Help\" menu to report bugs.<br /><br />"
73 "If you have a suggestion for improvement then you are welcome to use "
74 "the bug tracking system to register your wish. Make sure you use the "
75 "severity called \"Wishlist\".</html>",
76 QStringLiteral("https://bugs.kde.org/")));
77
78 QLabel *join = new QLabel;
79 join->setMargin(10);
80 join->setAlignment(Qt::AlignTop);
81 join->setWordWrap(true);
82 join->setOpenExternalLinks(true);
83 join->setTextInteractionFlags(Qt::TextBrowserInteraction);
84 join->setText(
85 i18n("<html>"
86 "You do not have to be a software developer to be a member of the "
87 "KDE team. You can join the language teams that translate "
88 "program interfaces. You can provide graphics, themes, sounds, and "
89 "improved documentation. You decide!"
90 "<br /><br />"
91 "Visit "
92 "<a href=\"%1\">%1</a> "
93 "for information on some projects in which you can participate."
94 "<br /><br />"
95 "If you need more information or documentation, then a visit to "
96 "<a href=\"%2\">%2</a> "
97 "will provide you with what you need.</html>",
98 QStringLiteral("https://community.kde.org/Get_Involved"),
99 QStringLiteral("https://develop.kde.org/")));
100
101 QLabel *support = new QLabel;
102 support->setMargin(10);
103 support->setAlignment(Qt::AlignTop);
104 support->setWordWrap(true);
105 support->setOpenExternalLinks(true);
106 support->setTextInteractionFlags(Qt::TextBrowserInteraction);
107 support->setText(
108 i18n("<html>"
109 "KDE software is and will always be available free of charge, however creating it is not free.<br /><br />"
110 "To support development the KDE community has formed the KDE e.V., a non-profit organization "
111 "legally founded in Germany. KDE e.V. represents the KDE community in legal and financial matters. "
112 "See <a href=\"%1\">%1</a>"
113 " for information on KDE e.V.<br /><br />"
114 "KDE benefits from many kinds of contributions, including financial. "
115 "We use the funds to reimburse members and others for expenses "
116 "they incur when contributing. Further funds are used for legal "
117 "support and organizing conferences and meetings. <br /> <br />"
118 "We would like to encourage you to support our efforts with a "
119 "financial donation, using one of the ways described at "
120 "<a href=\"%2\">%2</a>."
121 "<br /><br />Thank you very much in advance for your support.</html>",
122 QStringLiteral("https://ev.kde.org/"),
123 QStringLiteral("https://www.kde.org/community/donations/")));
124 support->setMinimumSize(support->sizeHint());
125
126 QTabWidget *tabWidget = new QTabWidget;
127 tabWidget->setUsesScrollButtons(false);
128 tabWidget->addTab(widget: about, i18nc("@title:tab About KDE", "&About"));
129 tabWidget->addTab(widget: report, i18nc("@title:tab", "&Report Bugs or Wishes"));
130 tabWidget->addTab(widget: join, i18nc("@title:tab", "&Join KDE"));
131 tabWidget->addTab(widget: support, i18nc("@title:tab", "&Support KDE"));
132
133 QLabel *image = new QLabel;
134 QIcon icon(QStringLiteral(":/kxmlgui5/aboutkde.svg"));
135 image->setPixmap(icon.pixmap(w: 150, h: 250));
136
137 QHBoxLayout *midLayout = new QHBoxLayout;
138 midLayout->addWidget(image);
139 midLayout->addWidget(tabWidget);
140
141 QDialogButtonBox *buttonBox = new QDialogButtonBox;
142 buttonBox->setStandardButtons(QDialogButtonBox::Close);
143 connect(sender: buttonBox, signal: &QDialogButtonBox::accepted, context: this, slot: &QDialog::accept);
144 connect(sender: buttonBox, signal: &QDialogButtonBox::rejected, context: this, slot: &QDialog::reject);
145
146 QVBoxLayout *mainLayout = new QVBoxLayout;
147 mainLayout->addWidget(titleWidget);
148 mainLayout->addLayout(layout: midLayout);
149 mainLayout->addWidget(buttonBox);
150
151 setLayout(mainLayout);
152}
153
154}
155
156#include "moc_kaboutkdedialog_p.cpp"
157

source code of kxmlgui/src/kaboutkdedialog_p.cpp