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 icon.name:
"globe-symbolic"
223 text:
i18nd(
"kirigami-addons6",
"Homepage")
224 onClicked:
Qt.openUrlExternally(aboutData.homepage)
225 visible: aboutData.homepage.length > 0
229 above: getInvolvedDelegate
230 below: donateDelegate
231 visible: aboutData.homepage.length > 0
236 icon.name:
"donate-symbolic"
237 text:
i18nd(
"kirigami-addons6",
"Donate")
238 onClicked:
Qt.openUrlExternally(donateUrl + "?app=" + page.aboutData.componentName)
239 visible: donateUrl.toString().length > 0
243 above: donateDelegate
244 below: homepageDelegate
245 visible: donateUrl.toString().length > 0
250 icon.name:
"applications-development-symbolic"
251 text:
i18nd(
"kirigami-addons6",
"Get Involved")
252 onClicked:
Qt.openUrlExternally(page.getInvolvedUrl)
253 visible: page.getInvolvedUrl != ""
257 above: homepageDelegate
259 visible: page.getInvolvedUrl !=
""
264 readonly
property string theUrl: {
265 if (aboutData.bugAddress !==
"submit@bugs.kde.org") {
266 return aboutData.bugAddress
268 const elements = aboutData.productName.split(
'/');
270 if (elements.length === 2) {
271 url +=
"&component=" + elements[1];
276 icon.name:
"tools-report-bug-symbolic"
277 text:
i18nd(
"kirigami-addons6",
"Report a Bug")
278 onClicked:
Qt.openUrlExternally(theUrl)
279 visible: theUrl.length > 0
284 title:
i18nd(
"kirigami-addons6",
"Libraries in use")
287 text:
i18ndc(
"kirigami-addons6",
"@action:button",
"Copy to Clipboard")
288 icon.name: 'edit-copy-symbolic'
290 FormCardModule.AboutComponent.copyToClipboard();
291 root.QQC2.ApplicationWindow.window.showPassiveNotification(
i18ndc(
"kirigami-addons6",
"@info",
"System information copied to clipboard."),
'short');
298 model: FormCardModule.AboutComponent.components
299 delegate: libraryDelegate
304 title:
i18nd(
"kirigami-addons6",
"Authors")
305 visible: aboutData.authors !== undefined && aboutData.authors.length > 0
309 visible: aboutData.authors !== undefined && aboutData.authors.length > 0
313 model: aboutData.authors
314 delegate: personDelegate
319 title:
i18nd(
"kirigami-addons6",
"Credits")
320 visible: aboutData.credits !== undefined && aboutData.credits.length > 0
324 visible: aboutData.credits !== undefined && aboutData.credits.length > 0
328 model: aboutData.credits
329 delegate: personDelegate
334 title:
i18nd(
"kirigami-addons6",
"Translators")
335 visible: aboutData.translators !== undefined && aboutData.translators.length > 0
339 visible: aboutData.translators !== undefined && aboutData.translators.length > 0
343 model: aboutData.translators
344 delegate: personDelegate
353 Layout.fillWidth:
true
355 contentItem: RowLayout {
356 spacing: Private.FormCardUnits.horizontalSpacing
358 KirigamiComponents.Avatar {
361 implicitWidth:
Kirigami.Units.iconSizes.medium
362 implicitHeight: implicitWidth
364 source:
if (!!modelData.avatarUrl && modelData.avatarUrl.toString().startsWith(
'https://')) {
365 const url =
new URL(modelData.avatarUrl);
366 const params =
new URLSearchParams(url.search);
367 params.append(
"s", width);
368 url.search = params.toString();
374 Layout.rightMargin: Private.FormCardUnits.horizontalSpacing
378 Layout.fillWidth:
true
379 spacing: Private.FormCardUnits.verticalSpacing
382 Layout.fillWidth:
true
384 elide:
Text.ElideRight
388 id: internalDescriptionItem
389 Layout.fillWidth:
true
391 color:
Kirigami.Theme.disabledTextColor
393 elide:
Text.ElideRight
394 visible: text.length > 0
399 visible: typeof(modelData.ocsUsername) !==
"undefined" && modelData.ocsUsername.length > 0
400 icon.name:
"get-hot-new-stuff"
401 QQC2.ToolTip.delay:
Kirigami.Units.toolTipDelay
402 QQC2.ToolTip.visible: hovered
403 QQC2.ToolTip.text:
i18nd(
"kirigami-addons6",
"Visit %1's KDE Store page", modelData.name)
404 onClicked:
Qt.openUrlExternally("https:
408 visible: typeof(modelData.emailAddress) !==
"undefined" && modelData.emailAddress.length > 0
409 icon.name:
"mail-sent"
410 QQC2.ToolTip.delay:
Kirigami.Units.toolTipDelay
411 QQC2.ToolTip.visible: hovered
412 QQC2.ToolTip.text:
i18nd(
"kirigami-addons6",
"Send an email to %1", modelData.emailAddress)
413 onClicked:
Qt.openUrlExternally("mailto:%1".arg(modelData.emailAddress))
417 visible: typeof(modelData.webAddress) !==
"undefined" && modelData.webAddress.length > 0
419 QQC2.ToolTip.delay:
Kirigami.Units.toolTipDelay
420 QQC2.ToolTip.visible: hovered
421 QQC2.ToolTip.text: (typeof(modelData.webAddress) ===
"undefined" && modelData.webAddress.length > 0) ?
"" : modelData.webAddress
422 onClicked:
Qt.openUrlExternally(modelData.webAddress)
433 required property var modelData
435 Layout.fillWidth: true
437 contentItem: RowLayout {
441 Layout.fillWidth: true
445 Layout.fillWidth: true
446 text: delegate.modelData.
name +
' ' + delegate.modelData.
version
451 id: internalDescriptionItem
452 Layout.fillWidth: true
453 text: delegate.modelData.description
454 color:
Kirigami.Theme.disabledTextColor
457 visible: text.length > 0
463 visible: modelData.licenses !== 0
468 QQC2.
ToolTip.text: !visible ?
"" : delegate.modelData.licenses.
name
473 title: delegate.modelData.
name
475 parent: licenseButton.QQC2.Overlay.overlay
476 implicitWidth: Math.min(parent.width -
Kirigami.
Units.gridUnit * 2, implicitContentWidth)
483 header: QQC2.Control {
484 padding: licenseSheet.padding
488 contentItem: RowLayout {
492 text: licenseSheet.title
496 Layout.fillWidth: true
500 icon.
name: hovered ?
"window-close" :
"window-close-symbolic"
501 text:
i18nc(
"@action:button",
"Close")
502 display: QQC2.ToolButton.IconOnly
503 onClicked: licenseSheet.
close()
511 bottom: parent.bottom
519 text: delegate.modelData.licenses.text
527 onClicked: licenseSheet.
open()
531 visible: typeof(modelData.webAddress) !==
"undefined" && modelData.webAddress.length > 0
535 QQC2.
ToolTip.text: (typeof(modelData.webAddress) ===
"undefined" && modelData.webAddress.length > 0) ?
"" : modelData.webAddress
536 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 i18ndc(const char *domain, const char *context, const char *text, const TYPE &arg...)
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(StandardAction id)
const QList< QKeySequence > & close()
const QList< QKeySequence > & open()
QTextStream & left(QTextStream &stream)
QTextStream & right(QTextStream &stream)