6import QtQuick.Controls 2.15 as QQC2
7import QtQuick.Window 2.15
8import QtQuick.Layouts 1.15
9import org.kde.kirigami 2.20 as Kirigami
10import org.kde.kirigamiaddons.components 1.0 as KirigamiComponents
11import org.kde.coreaddons as Core
13import "private" as Private
71 property var aboutData: Core.AboutData
79 property url getInvolvedUrl: aboutData.desktopFileName.startsWith(
"org.kde.") ?
"https://community.kde.org/Get_Involved" :
""
86 property url donateUrl: aboutData.desktopFileName.startsWith(
"org.kde.") ?
"https://www.kde.org/donate" :
""
88 title:
i18nd(
"kirigami-addons6",
"About %1", page.aboutData.displayName)
91 Layout.topMargin:
Kirigami.Units.largeSpacing * 4
95 Layout.fillWidth:
true
97 contentItem: RowLayout {
98 spacing:
Kirigami.Units.smallSpacing * 2
101 Layout.preferredHeight:
Kirigami.Units.iconSizes.huge
102 Layout.preferredWidth: height
103 Layout.maximumWidth: page.width / 3;
104 Layout.rightMargin:
Kirigami.Units.largeSpacing
105 source:
Kirigami.Settings.applicationWindowIcon || page.aboutData.programLogo || page.aboutData.programIconName || page.aboutData.componentName
109 Layout.fillWidth:
true
110 spacing:
Kirigami.Units.smallSpacing
113 Layout.fillWidth:
true
114 text: page.aboutData.displayName +
" " + page.aboutData.version
115 wrapMode: Text.WordWrap
119 Layout.fillWidth:
true
121 type:
Kirigami.Heading.Type.Secondary
122 wrapMode: Text.WordWrap
123 text: page.aboutData.shortDescription
132 id: copyrightDelegate
133 text:
i18nd(
"kirigami-addons6",
"Copyright")
134 descriptionItem.textFormat: Text.PlainText
135 description: aboutData.otherText + (aboutData.otherText.length > 0 ?
'\n' :
'')
136 + aboutData.copyrightStatement
141 title:
i18ndp(
"kirigami-addons6",
"License",
"Licenses", aboutData.licenses.length)
142 visible: aboutData.licenses.length
146 visible: aboutData.licenses.length
149 model: aboutData.licenses
152 Layout.fillWidth:
true
154 licenseSheet.text = modelData.text;
155 licenseSheet.title = modelData.name;
161 data: KirigamiComponents.MessageDialog {
164 property alias text: bodyLabel.text
166 parent: QQC2.Overlay.overlay
174 text: licenseSheet.title
175 elide: QQC2.Label.ElideRight
176 padding: licenseSheet.padding
177 topPadding:
Kirigami.Units.largeSpacing
178 bottomPadding:
Kirigami.Units.largeSpacing
184 bottom: parent.bottom
189 contentItem: QQC2.ScrollView {
194 text: licenseSheet.text
204 Layout.topMargin:
Kirigami.Units.gridUnit
207 id: getInvolvedDelegate
208 text:
i18nd(
"kirigami-addons6",
"Homepage")
209 onClicked:
Qt.openUrlExternally(aboutData.homepage)
210 visible: aboutData.homepage.length > 0
214 above: getInvolvedDelegate
215 below: donateDelegate
216 visible: aboutData.homepage.length > 0
221 text:
i18nd(
"kirigami-addons6",
"Donate")
222 onClicked:
Qt.openUrlExternally(donateUrl + "?app=" + page.aboutData.componentName)
223 visible: donateUrl.toString().length > 0
227 above: donateDelegate
228 below: homepageDelegate
229 visible: donateUrl.toString().length > 0
234 text:
i18nd(
"kirigami-addons6",
"Get Involved")
235 onClicked:
Qt.openUrlExternally(page.getInvolvedUrl)
236 visible: page.getInvolvedUrl != ""
240 above: homepageDelegate
242 visible: page.getInvolvedUrl !=
""
247 readonly
property string theUrl: {
248 if (aboutData.bugAddress !==
"submit@bugs.kde.org") {
249 return aboutData.bugAddress
251 const elements = aboutData.productName.split(
'/');
253 if (elements.length === 2) {
254 url +=
"&component=" + elements[1];
259 text:
i18nd(
"kirigami-addons6",
"Report a Bug")
260 onClicked:
Qt.openUrlExternally(theUrl)
261 visible: theUrl.length > 0
266 title:
i18nd(
"kirigami-addons6",
"Libraries in use")
267 visible:
Kirigami.Settings.information
271 visible:
Kirigami.Settings.information
274 model:
Kirigami.Settings.information
277 Layout.fillWidth:
true
283 model: aboutData.components
284 delegate: libraryDelegate
289 title:
i18nd(
"kirigami-addons6",
"Authors")
290 visible: aboutData.authors !== undefined && aboutData.authors.length > 0
294 visible: aboutData.authors !== undefined && aboutData.authors.length > 0
298 model: aboutData.authors
299 delegate: personDelegate
304 title:
i18nd(
"kirigami-addons6",
"Credits")
305 visible: aboutData.credits !== undefined && aboutData.credits.length > 0
309 visible: aboutData.credits !== undefined && aboutData.credits.length > 0
313 model: aboutData.credits
314 delegate: personDelegate
319 title:
i18nd(
"kirigami-addons6",
"Translators")
320 visible: aboutData.translators !== undefined && aboutData.translators.length > 0
324 visible: aboutData.translators !== undefined && aboutData.translators.length > 0
328 model: aboutData.translators
329 delegate: personDelegate
338 Layout.fillWidth:
true
340 contentItem: RowLayout {
341 spacing:
Kirigami.Units.smallSpacing * 2
343 KirigamiComponents.Avatar {
347 property bool hasRemoteAvatar:
false
348 implicitWidth:
Kirigami.Units.iconSizes.medium
349 implicitHeight: implicitWidth
351 source:
if (!!modelData.avatarUrl && modelData.avatarUrl.toString().startsWith(
'https://')) {
352 const url =
new URL(modelData.avatarUrl);
353 const params =
new URLSearchParams(url.search);
354 params.append(
"s", width);
355 url.search = params.toString();
363 Layout.fillWidth:
true
364 spacing:
Kirigami.Units.smallSpacing
367 Layout.fillWidth:
true
369 elide:
Text.ElideRight
373 id: internalDescriptionItem
374 Layout.fillWidth:
true
376 color:
Kirigami.Theme.disabledTextColor
378 elide:
Text.ElideRight
379 visible: text.length > 0
384 visible: typeof(modelData.ocsUsername) !==
"undefined" && modelData.ocsUsername.length > 0
385 icon.name:
"get-hot-new-stuff"
386 QQC2.ToolTip.delay:
Kirigami.Units.toolTipDelay
387 QQC2.ToolTip.visible: hovered
388 QQC2.ToolTip.text:
i18nd(
"kirigami-addons6",
"Visit %1's KDE Store page", modelData.name)
389 onClicked:
Qt.openUrlExternally("https:
393 visible: typeof(modelData.emailAddress) !==
"undefined" && modelData.emailAddress.length > 0
394 icon.name:
"mail-sent"
395 QQC2.ToolTip.delay:
Kirigami.Units.toolTipDelay
396 QQC2.ToolTip.visible: hovered
397 QQC2.ToolTip.text:
i18nd(
"kirigami-addons6",
"Send an email to %1", modelData.emailAddress)
398 onClicked:
Qt.openUrlExternally("mailto:%1".arg(modelData.emailAddress))
402 visible: typeof(modelData.webAddress) !==
"undefined" && modelData.webAddress.length > 0
404 QQC2.ToolTip.delay:
Kirigami.Units.toolTipDelay
405 QQC2.ToolTip.visible: hovered
406 QQC2.ToolTip.text: (typeof(modelData.webAddress) ===
"undefined" && modelData.webAddress.length > 0) ?
"" : modelData.webAddress
407 onClicked:
Qt.openUrlExternally(modelData.webAddress)
418 required property var modelData
420 Layout.fillWidth: true
422 contentItem: RowLayout {
426 Layout.fillWidth: true
430 Layout.fillWidth: true
431 text: delegate.modelData.
name +
' ' + delegate.modelData.
version
436 id: internalDescriptionItem
437 Layout.fillWidth: true
438 text: delegate.modelData.description
439 color:
Kirigami.Theme.disabledTextColor
442 visible: text.length > 0
447 visible: modelData.licenses !== 0
452 QQC2.
ToolTip.text: !visible ?
"" : delegate.modelData.licenses.
name
457 parent: root.QQC2.Overlay.overlay
458 title: delegate.modelData.
name
466 text: licenseSheet.title
468 padding: licenseSheet.padding
476 bottom: parent.bottom
484 text: delegate.modelData.licenses.text
492 onClicked: licenseSheet.
open()
496 visible: typeof(modelData.webAddress) !==
"undefined" && modelData.webAddress.length > 0
500 QQC2.
ToolTip.text: (typeof(modelData.webAddress) ===
"undefined" && modelData.webAddress.length > 0) ?
"" : modelData.webAddress
501 onClicked:
Qt.openUrlExternally(modelData.webAddress)
A scrollable page used as a container for one or more FormCards.
A Form delegate that corresponds to a text label and a description.
A dialog to show a message.
QString i18ndp(const char *domain, const char *singular, const char *plural, const TYPE &arg...)
QString i18nd(const char *domain, const char *text, const TYPE &arg...)
QString name(StandardAction id)
NETWORKMANAGERQT_EXPORT QString version()
QTextStream & left(QTextStream &stream)
QTextStream & right(QTextStream &stream)