Kirigami2

AboutPage.qml
1 /*
2  * SPDX-FileCopyrightText: 2018 Aleix Pol Gonzalez <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.0-or-later
5  */
6 
7 import QtQuick 2.1
8 import QtQuick.Controls 2.4 as QQC2
9 import QtQuick.Window 2.15
10 import QtQuick.Layouts 1.3
11 import org.kde.kirigami 2.19 as Kirigami
12 
13 //TODO KF6: move somewhere else? kirigami addons?
14 /**
15  * @brief An "About" page that is ready to integrate in a Kirigami app.
16  *
17  * Allows to have a page that will show the copyright notice of the application
18  * together with the contributors and some information of which platform it's
19  * running on.
20  *
21  * @since 5.52
22  * @since org.kde.kirigami 2.6
23  * @inherit org::kde::kirigami::ScrollablePage
24  */
25 Kirigami.ScrollablePage {
26  id: page
27 
28 //BEGIN properties
29  /**
30  * @brief This property holds an object with the same shape as KAboutData.
31  *
32  * For example:
33  * @code{json}
34  * aboutData: {
35  "displayName" : "KirigamiApp",
36  "productName" : "kirigami/app",
37  "componentName" : "kirigamiapp",
38  "shortDescription" : "A Kirigami example",
39  "homepage" : "",
40  "bugAddress" : "[email protected]",
41  "version" : "5.14.80",
42  "otherText" : "",
43  "authors" : [
44  {
45  "name" : "...",
46  "task" : "",
47  "emailAddress" : "[email protected]",
48  "webAddress" : "",
49  "ocsUsername" : ""
50  }
51  ],
52  "credits" : [],
53  "translators" : [],
54  "licenses" : [
55  {
56  "name" : "GPL v2",
57  "text" : "long, boring, license text",
58  "spdx" : "GPL-2.0"
59  }
60  ],
61  "copyrightStatement" : "© 2010-2018 Plasma Development Team",
62  "desktopFileName" : "org.kde.kirigamiapp"
63  }
64  @endcode
65  *
66  * @see KAboutData
67  * @see org::kde::kirigami::AboutItem::aboutData
68  * @property KAboutData aboutData
69  */
70  property alias aboutData: aboutItem.aboutData
71 
72  /**
73  * @brief This property holds a link to a "Get Involved" page.
74  *
75  * default: `"https://community.kde.org/Get_Involved" when your application id starts with "org.kde.", otherwise is empty`
76  *
77  * @property url getInvolvedUrl
78  */
79  property alias getInvolvedUrl: aboutItem.getInvolvedUrl
80 
81  /**
82  * @brief This property holds a link to a "Donate" page.
83  * @since 5.101
84  *
85  * default: `"https://kde.org/community/donations" when application id starts with "org.kde.", otherwise it is empty.`
86  */
87  property url donateUrl: aboutData.desktopFileName.startsWith("org.kde.") ? "https://kde.org/community/donations" : ""
88 
89  /** @internal */
90  default property alias _content: aboutItem._content
91 //END properties
92 
93  title: qsTr("About %1").arg(page.aboutData.displayName)
94 
95  Kirigami.AboutItem {
96  id: aboutItem
97  wideMode: page.width >= aboutItem.implicitWidth
98 
99  _usePageStack: applicationWindow().pageStack ? true : false
100  }
101 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Jan 29 2023 04:11:03 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.