9import QtQuick.Controls as QQC2
11import org.kde.kirigami as Kirigami
65 property var aboutData
72 property url getInvolvedUrl: aboutData.desktopFileName.startsWith("org.kde.") ?
"https://community.kde.org/Get_Involved" :
""
79 property url donateUrl: aboutData.desktopFileName.startsWith(
"org.kde.") ?
"https://kde.org/community/donations" :
""
82 property bool _usePageStack: false
88 property alias wideMode: form.wideMode
91 default property alias _content: form.data
95 readonly property bool __hasAvatars: aboutItem.aboutData.authors.some(__hasAvatar)
97 function __hasAvatar(person): bool {
98 return typeof person.avatarUrl !==
"undefined"
99 && person.avatarUrl.toString().length > 0;
109 property bool loadAvatars:
false
111 implicitHeight: form.implicitHeight
112 implicitWidth: form.implicitWidth
121 required
property var modelData
123 property bool hasAvatar: aboutItem.__hasAvatar(modelData)
125 Layout.fillWidth:
true
127 spacing: Kirigami.Units.smallSpacing * 2
132 implicitWidth: Kirigami.Units.iconSizes.medium
133 implicitHeight: implicitWidth
137 if (delegate.hasAvatar && aboutItem.loadAvatars) {
139 const url =
new URL(modelData.avatarUrl);
140 const params =
new URLSearchParams(url.search);
141 params.append(
"s", width);
142 url.search = params.toString();
148 visible:
status !== Kirigami.Icon.Loading
153 implicitWidth: Kirigami.Units.iconSizes.medium
154 implicitHeight: implicitWidth
156 visible: avatarIcon.status === Kirigami.Icon.Loading
161 Layout.fillWidth:
true
162 readonly
property bool withTask: typeof(modelData.task) !==
"undefined" && modelData.task.length > 0
163 text: withTask ? qsTr(
"%1 (%2)").arg(modelData.name).arg(modelData.task) : modelData.name
164 wrapMode: Text.WordWrap
168 visible: typeof(modelData.emailAddress) !==
"undefined" && modelData.emailAddress.length > 0
169 icon.name:
"mail-sent"
170 QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
171 QQC2.ToolTip.visible: hovered
172 QQC2.ToolTip.text: qsTr(
"Send an email to %1").arg(modelData.emailAddress)
173 onClicked:
Qt.openUrlExternally(
"mailto:%1".arg(modelData.emailAddress))
177 visible: typeof(modelData.webAddress) !==
"undefined" && modelData.webAddress.length > 0
179 QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
180 QQC2.ToolTip.visible: hovered
181 QQC2.ToolTip.text: (typeof(modelData.webAddress) ===
"undefined" && modelData.webAddress.length > 0) ?
"" : modelData.webAddress
182 onClicked:
Qt.openUrlExternally(modelData.webAddress)
187 Kirigami.FormLayout {
194 Layout.fillWidth:
true
198 Layout.preferredHeight: Kirigami.Units.iconSizes.huge
199 Layout.preferredWidth: height
200 Layout.maximumWidth: aboutItem.width / 3;
201 Layout.rightMargin: Kirigami.Units.largeSpacing
202 source: Kirigami.Settings.applicationWindowIcon || aboutItem.aboutData.programLogo || aboutItem.aboutData.programIconName || aboutItem.aboutData.componentName
206 Layout.fillWidth:
true
207 text: aboutItem.aboutData.displayName +
" " + aboutItem.aboutData.version
208 wrapMode: Text.WordWrap
212 Layout.fillWidth:
true
214 wrapMode: Text.WordWrap
215 text: aboutItem.aboutData.shortDescription
219 spacing: Kirigami.Units.largeSpacing * 2
222 text: qsTr(
"Get Involved")
223 url: aboutItem.getInvolvedUrl
224 visible: url.toString().length > 0
229 url: aboutItem.donateUrl
230 visible: url.toString().length > 0
234 readonly
property string theUrl: {
235 if (aboutItem.aboutData.bugAddress !==
"submit@bugs.kde.org") {
236 return aboutItem.aboutData.bugAddress
238 const elements = aboutItem.aboutData.productName.split(
'/');
240 if (elements.length === 2) {
241 url +=
"&component=" + elements[1];
245 text: qsTr(
"Report a Bug")
247 visible: theUrl.toString().length > 0
253 Layout.fillWidth:
true
257 Kirigami.FormData.isSection:
true
258 text: qsTr(
"Copyright")
262 Layout.leftMargin: Kirigami.Units.gridUnit
263 text: aboutItem.aboutData.otherText
264 visible: text.length > 0
265 wrapMode: Text.WordWrap
266 Layout.fillWidth:
true
270 Layout.leftMargin: Kirigami.Units.gridUnit
271 text: aboutItem.aboutData.copyrightStatement
272 visible: text.length > 0
273 wrapMode: Text.WordWrap
274 Layout.fillWidth:
true
278 Layout.leftMargin: Kirigami.Units.gridUnit
279 url: aboutItem.aboutData.homepage
280 visible: url.length > 0
281 wrapMode: Text.WordWrap
282 Layout.fillWidth:
true
287 property alias text: bodyLabel.text
291 text: licenseSheet.text
297 id: licenseLinkButton
300 Layout.leftMargin: Kirigami.Units.smallSpacing
302 QQC2.Label { text: qsTr(
"License:") }
305 Layout.fillWidth:
true
306 wrapMode: Text.WordWrap
308 onClicked: mouse => {
309 licenseSheet.text = modelData.text
310 licenseSheet.title = modelData.name
321 Layout.leftMargin: Kirigami.Units.smallSpacing
322 Layout.fillWidth:
true
323 wrapMode: Text.WordWrap
324 text: qsTr(
"License: %1").arg(modelData.name)
329 model: aboutItem.aboutData.licenses
330 delegate: _usePageStack ? licenseLinkButton : licenseTextItem
334 Kirigami.FormData.isSection: visible
335 text: qsTr(
"Libraries in use")
336 Layout.fillWidth: true
337 wrapMode: Text.WordWrap
338 visible: Kirigami.Settings.information
342 model: Kirigami.Settings.information
343 delegate: QQC2.Label {
344 Layout.leftMargin: Kirigami.Units.gridUnit
345 Layout.fillWidth:
true
346 wrapMode: Text.WordWrap
353 model: aboutItem.aboutData.components
354 delegate: QQC2.Label {
355 Layout.fillWidth:
true
356 wrapMode: Text.WordWrap
357 Layout.leftMargin: Kirigami.Units.gridUnit
358 text: modelData.name + (modelData.version.length === 0 ?
"" :
" %1".arg(modelData.version))
363 Layout.fillWidth:
true
364 Kirigami.FormData.isSection: visible
365 text: qsTr(
"Authors")
366 wrapMode: Text.WordWrap
367 visible: aboutItem.aboutData.authors.length > 0
372 visible: aboutItem.__hasAvatars
373 checked: aboutItem.loadAvatars
374 onToggled: aboutItem.loadAvatars = checked
375 text: qsTr(
"Show author photos")
380 model: aboutItem.aboutData.authors
381 delegate: personDelegate
385 Kirigami.FormData.isSection: visible
386 text: qsTr(
"Credits")
387 visible: repCredits.count > 0
392 model: aboutItem.aboutData.credits
393 delegate: personDelegate
397 Kirigami.FormData.isSection: visible
398 text: qsTr(
"Translators")
399 visible: repTranslators.count > 0
404 model: aboutItem.aboutData.translators
405 delegate: personDelegate
An overlay sheet that covers the current Page content.
This is a label which supports text selection.
Q_SCRIPTABLE CaptureState status()
QStringView level(QStringView ifopt)