diff --git a/kcms/users/LICENSES/CC0-1.0.txt b/kcms/users/LICENSES/CC0-1.0.txt new file mode 100644 index 000000000..a343ccd43 --- /dev/null +++ b/kcms/users/LICENSES/CC0-1.0.txt @@ -0,0 +1,119 @@ +Creative Commons Legal Code + +CC0 1.0 Universal CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES +NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE +AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION +ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE +OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS +LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION +OR WORKS PROVIDED HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer exclusive +Copyright and Related Rights (defined below) upon the creator and subsequent +owner(s) (each and all, an "owner") of an original work of authorship and/or +a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later claims +of infringement build upon, modify, incorporate in other works, reuse and +redistribute as freely as possible in any form whatsoever and for any purposes, +including without limitation commercial purposes. These owners may contribute +to the Commons to promote the ideal of a free culture and the further production +of creative, cultural and scientific works, or to gain reputation or greater +distribution for their Work in part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with +a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or +her Copyright and Related Rights in the Work and the meaning and intended +legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be protected +by copyright and related or neighboring rights ("Copyright and Related Rights"). +Copyright and Related Rights include, but are not limited to, the following: + +i. the right to reproduce, adapt, distribute, perform, display, communicate, +and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + +iii. publicity and privacy rights pertaining to a person's image or likeness +depicted in a Work; + +iv. rights protecting against unfair competition in regards to a Work, subject +to the limitations in paragraph 4(a), below; + +v. rights protecting the extraction, dissemination, use and reuse of data +in a Work; + +vi. database rights (such as those arising under Directive 96/9/EC of the +European Parliament and of the Council of 11 March 1996 on the legal protection +of databases, and under any national implementation thereof, including any +amended or successor version of such directive); and + +vii. other similar, equivalent or corresponding rights throughout the world +based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time extensions), +(iii) in any current or future medium and for any number of copies, and (iv) +for any purpose whatsoever, including without limitation commercial, advertising +or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the +benefit of each member of the public at large and to the detriment of Affirmer's +heirs and successors, fully intending that such Waiver shall not be subject +to revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account Affirmer's +express Statement of Purpose. In addition, to the extent the Waiver is so +judged Affirmer hereby grants to each affected person a royalty-free, non +transferable, non sublicensable, non exclusive, irrevocable and unconditional +license to exercise Affirmer's Copyright and Related Rights in the Work (i) +in all territories worldwide, (ii) for the maximum duration provided by applicable +law or treaty (including future time extensions), (iii) in any current or +future medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional purposes +(the "License"). The License shall be deemed effective as of the date CC0 +was applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder of +the License, and in such case Affirmer hereby affirms that he or she will +not (i) exercise any of his or her remaining Copyright and Related Rights +in the Work or (ii) assert any associated claims and causes of action with +respect to the Work, in either case contrary to Affirmer's express Statement +of Purpose. + + 4. Limitations and Disclaimers. + +a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, +licensed or otherwise affected by this document. + +b. Affirmer offers the Work as-is and makes no representations or warranties +of any kind concerning the Work, express, implied, statutory or otherwise, +including without limitation warranties of title, merchantability, fitness +for a particular purpose, non infringement, or the absence of latent or other +defects, accuracy, or the present or absence of errors, whether or not discoverable, +all to the greatest extent permissible under applicable law. + +c. Affirmer disclaims responsibility for clearing rights of other persons +that may apply to the Work or any use thereof, including without limitation +any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims +responsibility for obtaining any necessary consents, permissions or other +rights required for any use of the Work. + +d. Affirmer understands and acknowledges that Creative Commons is not a party +to this document and has no duty or obligation with respect to this CC0 or +use of the Work. diff --git a/kcms/users/package/contents/img/photos/Air Balloon.png b/kcms/users/package/contents/img/photos/Air Balloon.png new file mode 100644 index 000000000..e1512ded6 Binary files /dev/null and b/kcms/users/package/contents/img/photos/Air Balloon.png differ diff --git a/kcms/users/package/contents/img/photos/Air Balloon.png.license b/kcms/users/package/contents/img/photos/Air Balloon.png.license new file mode 100644 index 000000000..91b492760 --- /dev/null +++ b/kcms/users/package/contents/img/photos/Air Balloon.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2016 Skitterphoto +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/yellow-blue-and-green-hot-air-balloon-flying-near-white-clouds-68806/ diff --git a/kcms/users/package/contents/img/photos/Astronaut.png b/kcms/users/package/contents/img/photos/Astronaut.png new file mode 100644 index 000000000..a15a73ef0 Binary files /dev/null and b/kcms/users/package/contents/img/photos/Astronaut.png differ diff --git a/kcms/users/package/contents/img/photos/Astronaut.png.license b/kcms/users/package/contents/img/photos/Astronaut.png.license new file mode 100644 index 000000000..ba43f7ca9 --- /dev/null +++ b/kcms/users/package/contents/img/photos/Astronaut.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2016 Pixabay +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/space-research-science-astronaut-41162/ diff --git a/kcms/users/package/contents/img/photos/Books.png b/kcms/users/package/contents/img/photos/Books.png new file mode 100644 index 000000000..5663940d9 Binary files /dev/null and b/kcms/users/package/contents/img/photos/Books.png differ diff --git a/kcms/users/package/contents/img/photos/Books.png.license b/kcms/users/package/contents/img/photos/Books.png.license new file mode 100644 index 000000000..64f0f6407 --- /dev/null +++ b/kcms/users/package/contents/img/photos/Books.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2017 Pixabay +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/bench-blur-books-color-459791/ diff --git a/kcms/users/package/contents/img/photos/Brushes.png b/kcms/users/package/contents/img/photos/Brushes.png new file mode 100644 index 000000000..3eda30252 Binary files /dev/null and b/kcms/users/package/contents/img/photos/Brushes.png differ diff --git a/kcms/users/package/contents/img/photos/Brushes.png.license b/kcms/users/package/contents/img/photos/Brushes.png.license new file mode 100644 index 000000000..67975e3a9 --- /dev/null +++ b/kcms/users/package/contents/img/photos/Brushes.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2016 Pixabay +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/abstract-art-artist-artistic-262034/ diff --git a/kcms/users/package/contents/img/photos/Bulb.png b/kcms/users/package/contents/img/photos/Bulb.png new file mode 100644 index 000000000..8b15d5fdf Binary files /dev/null and b/kcms/users/package/contents/img/photos/Bulb.png differ diff --git a/kcms/users/package/contents/img/photos/Bulb.png.license b/kcms/users/package/contents/img/photos/Bulb.png.license new file mode 100644 index 000000000..2773c0267 --- /dev/null +++ b/kcms/users/package/contents/img/photos/Bulb.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2017 Skitterphoto +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/brown-framed-light-bulb-745708/ diff --git a/kcms/users/package/contents/img/photos/Car.png b/kcms/users/package/contents/img/photos/Car.png new file mode 100644 index 000000000..497688a54 Binary files /dev/null and b/kcms/users/package/contents/img/photos/Car.png differ diff --git a/kcms/users/package/contents/img/photos/Car.png.license b/kcms/users/package/contents/img/photos/Car.png.license new file mode 100644 index 000000000..5d9b4d4c6 --- /dev/null +++ b/kcms/users/package/contents/img/photos/Car.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2016 Pixabay +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/action-asphalt-auto-racing-automobile-274974/ diff --git a/kcms/users/package/contents/img/photos/Cat.png b/kcms/users/package/contents/img/photos/Cat.png new file mode 100644 index 000000000..84e457387 Binary files /dev/null and b/kcms/users/package/contents/img/photos/Cat.png differ diff --git a/kcms/users/package/contents/img/photos/Cat.png.license b/kcms/users/package/contents/img/photos/Cat.png.license new file mode 100644 index 000000000..147ec97cc --- /dev/null +++ b/kcms/users/package/contents/img/photos/Cat.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2018 Skitterphoto +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/brown-tabby-cat-on-floor-1457595/ diff --git a/kcms/users/package/contents/img/photos/Chameleon.png b/kcms/users/package/contents/img/photos/Chameleon.png new file mode 100644 index 000000000..4457c3bde Binary files /dev/null and b/kcms/users/package/contents/img/photos/Chameleon.png differ diff --git a/kcms/users/package/contents/img/photos/Chamelon.png.license b/kcms/users/package/contents/img/photos/Chamelon.png.license new file mode 100644 index 000000000..7ea5c232e --- /dev/null +++ b/kcms/users/package/contents/img/photos/Chamelon.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2016 Pixabay +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/animal-green-reptile-female-62289/ diff --git a/kcms/users/package/contents/img/photos/Cocktail.png b/kcms/users/package/contents/img/photos/Cocktail.png new file mode 100644 index 000000000..d3a317bb4 Binary files /dev/null and b/kcms/users/package/contents/img/photos/Cocktail.png differ diff --git a/kcms/users/package/contents/img/photos/Cocktail.png.license b/kcms/users/package/contents/img/photos/Cocktail.png.license new file mode 100644 index 000000000..dc5ebe489 --- /dev/null +++ b/kcms/users/package/contents/img/photos/Cocktail.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2016 Public Domain Pictures <> +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/sea-sky-beach-holiday-68672/ diff --git a/kcms/users/package/contents/img/photos/Dog.png b/kcms/users/package/contents/img/photos/Dog.png new file mode 100644 index 000000000..e83b7d9c9 Binary files /dev/null and b/kcms/users/package/contents/img/photos/Dog.png differ diff --git a/kcms/users/package/contents/img/photos/Dog.png.license b/kcms/users/package/contents/img/photos/Dog.png.license new file mode 100644 index 000000000..846ff1662 --- /dev/null +++ b/kcms/users/package/contents/img/photos/Dog.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2015 Snapwire +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/animal-dog-pet-tongue-6877/ diff --git a/kcms/users/package/contents/img/photos/Fish.png b/kcms/users/package/contents/img/photos/Fish.png new file mode 100644 index 000000000..d72adc0e6 Binary files /dev/null and b/kcms/users/package/contents/img/photos/Fish.png differ diff --git a/kcms/users/package/contents/img/photos/Fish.png.license b/kcms/users/package/contents/img/photos/Fish.png.license new file mode 100644 index 000000000..87ed81834 --- /dev/null +++ b/kcms/users/package/contents/img/photos/Fish.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2018 Skitterphoto +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/orange-and-white-fish-886210/ diff --git a/kcms/users/package/contents/img/photos/Gamepad.png b/kcms/users/package/contents/img/photos/Gamepad.png new file mode 100644 index 000000000..3eb52fee9 Binary files /dev/null and b/kcms/users/package/contents/img/photos/Gamepad.png differ diff --git a/kcms/users/package/contents/img/photos/Gamepad.png.license b/kcms/users/package/contents/img/photos/Gamepad.png.license new file mode 100644 index 000000000..570b54cba --- /dev/null +++ b/kcms/users/package/contents/img/photos/Gamepad.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2016 Pixabay +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/accessory-buttons-console-control-275033/ diff --git a/kcms/users/package/contents/img/photos/Owl.png b/kcms/users/package/contents/img/photos/Owl.png new file mode 100755 index 000000000..23fdf160f Binary files /dev/null and b/kcms/users/package/contents/img/photos/Owl.png differ diff --git a/kcms/users/package/contents/img/photos/Owl.png.license b/kcms/users/package/contents/img/photos/Owl.png.license new file mode 100644 index 000000000..94ab6fd8f --- /dev/null +++ b/kcms/users/package/contents/img/photos/Owl.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2015 Pixabay +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/bird-animal-owl-3890/ diff --git a/kcms/users/package/contents/img/photos/Pancakes.png b/kcms/users/package/contents/img/photos/Pancakes.png new file mode 100644 index 000000000..a7b4b30e5 Binary files /dev/null and b/kcms/users/package/contents/img/photos/Pancakes.png differ diff --git a/kcms/users/package/contents/img/photos/Pancakes.png.license b/kcms/users/package/contents/img/photos/Pancakes.png.license new file mode 100644 index 000000000..9002a4f8b --- /dev/null +++ b/kcms/users/package/contents/img/photos/Pancakes.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2017 Skitterphoto +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/selective-focus-of-pile-of-pan-cakes-730922/ diff --git a/kcms/users/package/contents/img/photos/Parrot.png b/kcms/users/package/contents/img/photos/Parrot.png new file mode 100755 index 000000000..c4c2a61bb Binary files /dev/null and b/kcms/users/package/contents/img/photos/Parrot.png differ diff --git a/kcms/users/package/contents/img/photos/Parrot.png.license b/kcms/users/package/contents/img/photos/Parrot.png.license new file mode 100644 index 000000000..b379cf76c --- /dev/null +++ b/kcms/users/package/contents/img/photos/Parrot.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2018 Skitterphoto +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/red-blue-and-green-bird-on-tree-1331819/ diff --git a/kcms/users/package/contents/img/photos/Pencils.png b/kcms/users/package/contents/img/photos/Pencils.png new file mode 100644 index 000000000..4c24e183f Binary files /dev/null and b/kcms/users/package/contents/img/photos/Pencils.png differ diff --git a/kcms/users/package/contents/img/photos/Pencils.png.license b/kcms/users/package/contents/img/photos/Pencils.png.license new file mode 100644 index 000000000..968555c5d --- /dev/null +++ b/kcms/users/package/contents/img/photos/Pencils.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2016 Public Domain Pictures <> +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/colored-pencil-on-top-of-white-surface-42226/ diff --git a/kcms/users/package/contents/img/photos/Shuttle.png b/kcms/users/package/contents/img/photos/Shuttle.png new file mode 100644 index 000000000..a33ca66b1 Binary files /dev/null and b/kcms/users/package/contents/img/photos/Shuttle.png differ diff --git a/kcms/users/package/contents/img/photos/Shuttle.png.license b/kcms/users/package/contents/img/photos/Shuttle.png.license new file mode 100644 index 000000000..adf480b86 --- /dev/null +++ b/kcms/users/package/contents/img/photos/Shuttle.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2015 Pixabay +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/flight-sky-earth-space-2159/ diff --git a/kcms/users/package/contents/img/photos/Soccer.png b/kcms/users/package/contents/img/photos/Soccer.png new file mode 100644 index 000000000..d58a1fa95 Binary files /dev/null and b/kcms/users/package/contents/img/photos/Soccer.png differ diff --git a/kcms/users/package/contents/img/photos/Soccer.png.license b/kcms/users/package/contents/img/photos/Soccer.png.license new file mode 100644 index 000000000..d87dfcad5 --- /dev/null +++ b/kcms/users/package/contents/img/photos/Soccer.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2016 Pixabay +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/soccer-ball-on-grass-field-during-daytime-46798/ diff --git a/kcms/users/package/contents/img/photos/Sunflower.png b/kcms/users/package/contents/img/photos/Sunflower.png new file mode 100644 index 000000000..abb99534f Binary files /dev/null and b/kcms/users/package/contents/img/photos/Sunflower.png differ diff --git a/kcms/users/package/contents/img/photos/Sunflower.png.license b/kcms/users/package/contents/img/photos/Sunflower.png.license new file mode 100644 index 000000000..b9fff0f35 --- /dev/null +++ b/kcms/users/package/contents/img/photos/Sunflower.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2015 Snapwire +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/nature-garden-spring-flower-6695/ diff --git a/kcms/users/package/contents/img/photos/Sushi.png b/kcms/users/package/contents/img/photos/Sushi.png new file mode 100644 index 000000000..b8d0015ef Binary files /dev/null and b/kcms/users/package/contents/img/photos/Sushi.png differ diff --git a/kcms/users/package/contents/img/photos/Sushi.png.license b/kcms/users/package/contents/img/photos/Sushi.png.license new file mode 100644 index 000000000..342cc1476 --- /dev/null +++ b/kcms/users/package/contents/img/photos/Sushi.png.license @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2017 Skitterphoto +# +# SPDX-License-Identifier: CC0-1.0 +# +# https://www.pexels.com/photo/tilt-shift-photography-of-maki-681586/ diff --git a/kcms/users/package/contents/ui/UserDetailsPage.qml b/kcms/users/package/contents/ui/UserDetailsPage.qml index 245e6acea..3f13ec5bc 100644 --- a/kcms/users/package/contents/ui/UserDetailsPage.qml +++ b/kcms/users/package/contents/ui/UserDetailsPage.qml @@ -1,430 +1,450 @@ /* Copyright 2019 Nicolas Fella Copyright 2020 Carson Black This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) version 3, or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), which shall act as a proxy defined in Section 6 of version 3 of the license. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see . */ import QtQuick 2.6 import QtQuick.Layouts 1.3 import QtGraphicalEffects 1.12 import QtQuick.Controls 2.5 as QQC2 import QtQuick.Dialogs 1.3 import org.kde.kcm 1.2 import org.kde.kirigami 2.8 as Kirigami SimpleKCM { id: usersDetailPage title: user.realName property QtObject user property bool overrideImage: false property url oldImage Connections { target: kcm onApply: { usersDetailPage.user.realName = realNametextField.text usersDetailPage.user.email = emailTextField.text usersDetailPage.user.name = userNameField.text usersDetailPage.user.administrator = (usertypeBox.model[usertypeBox.currentIndex]["type"] == "administrator") user.apply() usersDetailPage.overrideImage = false usersDetailPage.oldImage = "" } onReset: { realNametextField.text = usersDetailPage.user.realName emailTextField.text = usersDetailPage.user.email userNameField.text = usersDetailPage.user.name usertypeBox.currentIndex = usersDetailPage.user.administrator ? 1 : 0 if (usersDetailPage.oldImage != "") { usersDetailPage.overrideImage = false usersDetailPage.user.face = usersDetailPage.oldImage } } } function resolvePending() { let pending = false let user = usersDetailPage.user pending = pending || user.realName != realNametextField.text pending = pending || user.email != emailTextField.text pending = pending || user.name != userNameField.text pending = pending || user.administrator != (usertypeBox.model[usertypeBox.currentIndex]["type"] == "administrator") pending = pending || usersDetailPage.overrideImage return pending } Component.onCompleted: { kcm.needsSave = Qt.binding(resolvePending) } FileDialog { id: fileDialog title: i18n("Choose a picture") folder: shortcuts.pictures onAccepted: { picturesSheet.close() usersDetailPage.oldImage = usersDetailPage.user.face usersDetailPage.user.face = fileDialog.fileUrl usersDetailPage.overrideImage = true } } ColumnLayout { RowLayout { Layout.alignment: Qt.AlignHCenter QQC2.RoundButton { id: userPfp readonly property int size: 6 * Kirigami.Units.gridUnit icon.name: usersDetailPage.user.faceValid || usersDetailPage.overrideImage ? "" : "user-identity" icon.width: size icon.height: size implicitWidth: size implicitHeight: size flat: true Image { source: usersDetailPage.user.face visible: usersDetailPage.user.faceValid || usersDetailPage.overrideImage sourceSize: Qt.size(parent.size*Screen.devicePixelRatio, parent.size*Screen.devicePixelRatio) cache: false anchors { fill: parent margins: Kirigami.Units.smallSpacing } layer.enabled: usersDetailPage.user.faceValid || usersDetailPage.overrideImage layer.effect: OpacityMask { maskSource: Rectangle { height: userPfp.size; width: height radius: height/2 } } } Layout.alignment: Qt.AlignHCenter Layout.maximumHeight: size + Kirigami.smallSpacing Layout.minimumHeight: size + Kirigami.smallSpacing Layout.maximumWidth: size + Kirigami.smallSpacing Layout.minimumWidth: size + Kirigami.smallSpacing onClicked: { picturesSheet.open() stackSwitcher.forceActiveFocus() } } QQC2.TextField { id: realNametextField focus: true text: user.realName placeholderText: i18nc("Example name", "John Doe") } } Kirigami.FormLayout { QQC2.TextField { id: userNameField focus: true text: user.name Kirigami.FormData.label: i18n("Username:") } QQC2.ComboBox { id: usertypeBox textRole: "label" model: [ { "type": "standard", "label": i18n("Standard") }, { "type": "administrator", "label": i18n("Administrator") }, ] Kirigami.FormData.label: i18n("Account type:") currentIndex: user.administrator ? 1 : 0 } QQC2.TextField { id: emailTextField focus: true text: user.email placeholderText: i18nc("Example email address", "john.doe@kde.org") Kirigami.FormData.label: i18n("Email address:") } QQC2.Button { text: i18n("Change Password") onClicked: { changePassword.account = user changePassword.openAndClear() } } Item { Layout.preferredHeight: deleteUser.height } QQC2.Button { id: deleteUser enabled: !usersDetailPage.user.loggedIn && (!kcm.userModel.rowCount() < 2) QQC2.Menu { id: deleteMenu modal: true QQC2.MenuItem { text: i18n("Delete files") icon.name: "edit-delete-shred" onClicked: { if (kcm.deleteUser(usersDetailPage.user.uid, true)) { kcm.pop() } } } QQC2.MenuItem { text: i18n("Keep files") icon.name: "document-multiple" onClicked: { if (kcm.deleteUser(usersDetailPage.user.uid, false)) { kcm.pop() } } } } text: i18n("Delete User...") icon.name: "edit-delete" onClicked: deleteMenu.open() } } } Kirigami.OverlaySheet { id: picturesSheet header: RowLayout { Kirigami.Heading { text: i18n("Change Avatar") } } StackLayout { id: stackSwitcher Layout.preferredWidth: usersDetailPage.width - (Kirigami.Units.largeSpacing*4) Keys.onEscapePressed: { picturesSheet.close() event.accepted = true } ColumnLayout { id: cols GridLayout { id: picturesColumn rowSpacing: Kirigami.Units.smallSpacing columnSpacing: Kirigami.Units.smallSpacing columns: { return Math.floor((stackSwitcher.width) / (Kirigami.Units.gridUnit * 6)) } Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter QQC2.Button { Layout.preferredHeight: Kirigami.Units.gridUnit * 6 Layout.preferredWidth: Layout.preferredHeight ColumnLayout { anchors.centerIn: parent Kirigami.Icon { width: Kirigami.Units.gridUnit * 4 height: Kirigami.Units.gridUnit * 4 source: "document-open" Layout.alignment: Qt.AlignHCenter } QQC2.Label { text: i18n("Choose File...") horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignBottom fontSizeMode: Text.HorizontalFit wrapMode: Text.Wrap Layout.fillWidth: true Layout.maximumWidth: Kirigami.Units.gridUnit * 5 } } onClicked: fileDialog.open() } QQC2.Button { Layout.preferredHeight: Kirigami.Units.gridUnit * 6 Layout.preferredWidth: Layout.preferredHeight Kirigami.Heading { anchors.centerIn: parent font.pixelSize: Kirigami.Units.gridUnit * 4 text: kcm.initializeString(user.realName) } onClicked: stackSwitcher.currentIndex = 1 // https://bugs.kde.org/show_bug.cgi?id=420439 visible: false } Repeater { model: [ "Artist Konqi.png", "Bookworm Konqi.png", "Boss Konqi.png", "Bug Catcher Konqi.png", "Card Shark Konqi.png", "Hacker Konqi.png", "Journalist Konqi.png", "Katie.png", "Konqi.png", "Mechanic Konqi.png", "Messenger Konqi.png", "Musician Konqi.png", "Office Worker Konqi.png", "PC Builder Konqi.png", "Scientist Konqi.png", "Teacher Konqi.png", - "Virtual Reality Konqi.png" + "Virtual Reality Konqi.png", + "photos/Air Balloon.png", + "photos/Astronaut.png", + "photos/Books.png", + "photos/Brushes.png", + "photos/Bulb.png", + "photos/Car.png", + "photos/Cat.png", + "photos/Chameleon.png", + "photos/Cocktail.png", + "photos/Dog.png", + "photos/Fish.png", + "photos/Gamepad.png", + "photos/Owl.png", + "photos/Pancakes.png", + "photos/Parrot.png", + "photos/Pencils.png", + "photos/Shuttle.png", + "photos/Soccer.png", + "photos/Sunflower.png", + "photos/Sushi.png" ] QQC2.Button { Layout.preferredHeight: Kirigami.Units.gridUnit * 6 Layout.preferredWidth: Layout.preferredHeight QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay QQC2.ToolTip.text: modelData Accessible.name: modelData Image { id: imgDelegate smooth: true mipmap: true anchors.fill: parent source: "../img/%1".arg(modelData) Accessible.ignored: true } onClicked: { picturesSheet.close() usersDetailPage.oldImage = usersDetailPage.user.face usersDetailPage.user.face = imgDelegate.source usersDetailPage.overrideImage = true } } } } } ColumnLayout { id: initialPictures GridLayout { id: initialsColumn rowSpacing: Kirigami.Units.smallSpacing columnSpacing: Kirigami.Units.smallSpacing columns: { return Math.floor((stackSwitcher.width) / (Kirigami.Units.gridUnit * 6)) } Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter QQC2.Button { Layout.preferredHeight: Kirigami.Units.gridUnit * 6 Layout.preferredWidth: Layout.preferredHeight ColumnLayout { anchors.centerIn: parent Kirigami.Icon { width: Kirigami.Units.gridUnit * 4 height: Kirigami.Units.gridUnit * 4 source: "go-previous" Layout.alignment: Qt.AlignHCenter } } onClicked: stackSwitcher.currentIndex = 0 } Repeater { model: [ {"name": i18n("Feisty Flamingo"), "color": "#E93A9A", "dark": true}, {"name": i18n("Dragon's Fruit"), "color": "#E93D58", "dark": true}, {"name": i18n("Sweet Potato"), "color": "#E9643A", "dark": true}, {"name": i18n("Ambient Amber"), "color": "#EF973C", "dark": false}, {"name": i18n("Sparkle Sunbeam"), "color": "#E8CB2D", "dark": false}, {"name": i18n("Lemon-Lime"), "color": "#B6E521", "dark": false}, {"name": i18n("Verdant Charm"), "color": "#3DD425", "dark": false}, {"name": i18n("Mellow Meadow"), "color": "#00D485", "dark": false}, {"name": i18n("Tepid Teal"), "color": "#00D3B8", "dark": false}, {"name": i18n("Plasma Blue"), "color": "#3DAEE9", "dark": true}, {"name": i18n("Pon Purple"), "color": "#B875DC", "dark": true}, {"name": i18n("Bajo Purple"), "color": "#926EE4", "dark": true}, {"name": i18n("Burnt Charcoal"), "color": "#232629", "dark": true}, {"name": i18n("Paper Perfection"), "color": "#EEF1F5", "dark": false}, {"name": i18n("Cafétera Brown"), "color": "#CB775A", "dark": false}, {"name": i18n("Rich Hardwood"), "color": "#6A250E", "dark": true} ] delegate: QQC2.Button { Layout.preferredHeight: Kirigami.Units.gridUnit * 6 Layout.preferredWidth: Layout.preferredHeight Rectangle { id: colourRectangle anchors.fill: parent anchors.margins: Kirigami.Units.smallSpacing color: modelData.color Kirigami.Heading { anchors.centerIn: parent color: modelData.dark ? "white" : "black" font.pixelSize: Kirigami.Units.gridUnit * 4 text: kcm.initializeString(user.realName) } } onClicked: { colourRectangle.grabToImage(function(result) { picturesSheet.close() let uri = kcm.plonkImageInTempfile(result.image) if (uri != "") { usersDetailPage.oldImage = usersDetailPage.user.face usersDetailPage.user.face = uri usersDetailPage.overrideImage = true } }) } } } } } } } ChangePassword { id: changePassword; account: user } }