6import QtQuick.Controls as QQC2
9import org.kde.kirigami as Kirigami
10import org.kde.kirigamiaddons.components as KirigamiComponents
11import org.kde.kirigamiaddons.formcard as FormCardModule
12import org.kde.coreaddons as Core
14import "private" as Private
72 property var aboutData: Core.AboutData
80 property url getInvolvedUrl: aboutData.desktopFileName.startsWith(
"org.kde.") ?
"https://community.kde.org/Get_Involved" :
""
87 property url donateUrl: aboutData.desktopFileName.startsWith(
"org.kde.") ?
"https://www.kde.org/donate" :
""
89 title:
i18nd(
"kirigami-addons6",
"About %1", page.aboutData.displayName)
92 Layout.topMargin:
Kirigami.Units.largeSpacing * 4
94 AbstractFormDelegate {
96 Layout.fillWidth:
true
98 contentItem: RowLayout {
99 spacing:
Kirigami.Units.smallSpacing * 2
102 Layout.preferredHeight:
Kirigami.Units.iconSizes.huge
103 Layout.preferredWidth: height
104 Layout.maximumWidth: page.width / 3;
105 Layout.rightMargin:
Kirigami.Units.largeSpacing
106 source:
Kirigami.Settings.applicationWindowIcon || page.aboutData.programLogo || page.aboutData.programIconName || page.aboutData.componentName
110 Layout.fillWidth:
true
111 spacing:
Kirigami.Units.smallSpacing
114 Layout.fillWidth:
true
115 text: page.aboutData.displayName +
" " + page.aboutData.version
116 wrapMode: Text.WordWrap
120 Layout.fillWidth:
true
122 type:
Kirigami.Heading.Type.Secondary
123 wrapMode: Text.WordWrap
124 text: page.aboutData.shortDescription
133 id: copyrightDelegate
134 text:
i18nd(
"kirigami-addons6",
"Copyright")
135 descriptionItem.textFormat: Text.PlainText
136 description: aboutData.copyrightStatement
141 visible: aboutData.otherText.length > 0
142 title:
i18nd(
"kirigami-addons6",
"Description")
146 visible: aboutData.otherText.length > 0
148 Layout.fillWidth:
true
149 textItem.wrapMode:
Text.WordWrap
150 text: aboutData.otherText
155 title:
i18ndp(
"kirigami-addons6",
"License",
"Licenses", aboutData.licenses.length)
156 visible: aboutData.licenses.length
160 visible: aboutData.licenses.length
163 model: aboutData.licenses
166 Layout.fillWidth:
true
168 licenseSheet.text = modelData.text;
169 licenseSheet.title = modelData.name;
175 data: KirigamiComponents.MessageDialog {
178 property alias text: bodyLabel.text
180 parent: QQC2.Overlay.overlay
188 text: licenseSheet.title
189 elide: QQC2.Label.ElideRight
190 padding: licenseSheet.padding
191 topPadding:
Kirigami.Units.largeSpacing
192 bottomPadding:
Kirigami.Units.largeSpacing
198 bottom: parent.bottom
203 contentItem: QQC2.ScrollView {
208 text: licenseSheet.text
218 Layout.topMargin:
Kirigami.Units.gridUnit
221 id: getInvolvedDelegate
222 text:
i18nd(
"kirigami-addons6",
"Homepage")
223 onClicked:
Qt.openUrlExternally(aboutData.homepage)
224 visible: aboutData.homepage.length > 0
228 above: getInvolvedDelegate
229 below: donateDelegate
230 visible: aboutData.homepage.length > 0
235 text:
i18nd(
"kirigami-addons6",
"Donate")
236 onClicked:
Qt.openUrlExternally(donateUrl + "?app=" + page.aboutData.componentName)
237 visible: donateUrl.toString().length > 0
241 above: donateDelegate
242 below: homepageDelegate
243 visible: donateUrl.toString().length > 0
248 text:
i18nd(
"kirigami-addons6",
"Get Involved")
249 onClicked:
Qt.openUrlExternally(page.getInvolvedUrl)
250 visible: page.getInvolvedUrl != ""
254 above: homepageDelegate
256 visible: page.getInvolvedUrl !=
""
261 readonly
property string theUrl: {
262 if (aboutData.bugAddress !==
"submit@bugs.kde.org") {
263 return aboutData.bugAddress
265 const elements = aboutData.productName.split(
'/');
267 if (elements.length === 2) {
268 url +=
"&component=" + elements[1];
273 text:
i18nd(
"kirigami-addons6",
"Report a Bug")
274 onClicked:
Qt.openUrlExternally(theUrl)
275 visible: theUrl.length > 0
280 title:
i18nd(
"kirigami-addons6",
"Libraries in use")
285 model: FormCardModule.AboutComponent.components
286 delegate: libraryDelegate
291 title:
i18nd(
"kirigami-addons6",
"Authors")
292 visible: aboutData.authors !== undefined && aboutData.authors.length > 0
296 visible: aboutData.authors !== undefined && aboutData.authors.length > 0
300 model: aboutData.authors
301 delegate: personDelegate
306 title:
i18nd(
"kirigami-addons6",
"Credits")
307 visible: aboutData.credits !== undefined && aboutData.credits.length > 0
311 visible: aboutData.credits !== undefined && aboutData.credits.length > 0
315 model: aboutData.credits
316 delegate: personDelegate
321 title:
i18nd(
"kirigami-addons6",
"Translators")
322 visible: aboutData.translators !== undefined && aboutData.translators.length > 0
326 visible: aboutData.translators !== undefined && aboutData.translators.length > 0
330 model: aboutData.translators
331 delegate: personDelegate
340 Layout.fillWidth:
true
342 contentItem: RowLayout {
343 spacing: Private.FormCardUnits.horizontalSpacing
345 KirigamiComponents.Avatar {
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();
361 Layout.rightMargin: Private.FormCardUnits.horizontalSpacing
365 Layout.fillWidth:
true
366 spacing: Private.FormCardUnits.verticalSpacing
369 Layout.fillWidth:
true
371 elide:
Text.ElideRight
375 id: internalDescriptionItem
376 Layout.fillWidth:
true
378 color:
Kirigami.Theme.disabledTextColor
380 elide:
Text.ElideRight
381 visible: text.length > 0
386 visible: typeof(modelData.ocsUsername) !==
"undefined" && modelData.ocsUsername.length > 0
387 icon.name:
"get-hot-new-stuff"
388 QQC2.ToolTip.delay:
Kirigami.Units.toolTipDelay
389 QQC2.ToolTip.visible: hovered
390 QQC2.ToolTip.text:
i18nd(
"kirigami-addons6",
"Visit %1's KDE Store page", modelData.name)
391 onClicked:
Qt.openUrlExternally("https:
395 visible: typeof(modelData.emailAddress) !==
"undefined" && modelData.emailAddress.length > 0
396 icon.name:
"mail-sent"
397 QQC2.ToolTip.delay:
Kirigami.Units.toolTipDelay
398 QQC2.ToolTip.visible: hovered
399 QQC2.ToolTip.text:
i18nd(
"kirigami-addons6",
"Send an email to %1", modelData.emailAddress)
400 onClicked:
Qt.openUrlExternally("mailto:%1".arg(modelData.emailAddress))
404 visible: typeof(modelData.webAddress) !==
"undefined" && modelData.webAddress.length > 0
406 QQC2.ToolTip.delay:
Kirigami.Units.toolTipDelay
407 QQC2.ToolTip.visible: hovered
408 QQC2.ToolTip.text: (typeof(modelData.webAddress) ===
"undefined" && modelData.webAddress.length > 0) ?
"" : modelData.webAddress
409 onClicked:
Qt.openUrlExternally(modelData.webAddress)
420 required property var modelData
422 Layout.fillWidth: true
424 contentItem: RowLayout {
428 Layout.fillWidth: true
432 Layout.fillWidth: true
433 text: delegate.modelData.
name +
' ' + delegate.modelData.
version
438 id: internalDescriptionItem
439 Layout.fillWidth: true
440 text: delegate.modelData.description
441 color:
Kirigami.Theme.disabledTextColor
444 visible: text.length > 0
450 visible: modelData.licenses !== 0
455 QQC2.
ToolTip.text: !visible ?
"" : delegate.modelData.licenses.
name
460 title: delegate.modelData.
name
462 parent: licenseButton.QQC2.Overlay.overlay
463 implicitWidth: Math.min(parent.width -
Kirigami.
Units.gridUnit * 2, implicitContentWidth)
470 header: QQC2.Control {
471 padding: licenseSheet.padding
475 contentItem: RowLayout {
479 text: licenseSheet.title
483 Layout.fillWidth: true
487 icon.
name: hovered ?
"window-close" :
"window-close-symbolic"
488 text:
i18nc(
"@action:button",
"Close")
489 display: QQC2.ToolButton.IconOnly
490 onClicked: licenseSheet.
close()
498 bottom: parent.bottom
506 text: delegate.modelData.licenses.text
514 onClicked: licenseSheet.
open()
518 visible: typeof(modelData.webAddress) !==
"undefined" && modelData.webAddress.length > 0
522 QQC2.
ToolTip.text: (typeof(modelData.webAddress) ===
"undefined" && modelData.webAddress.length > 0) ?
"" : modelData.webAddress
523 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 i18nc(const char *context, const char *text, const TYPE &arg...)
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...)
KDB_EXPORT KDbVersionInfo version()
QString name(GameStandardAction id)
QTextStream & left(QTextStream &stream)
QTextStream & right(QTextStream &stream)