KNewStuff

main.qml
1/*
2 SPDX-FileCopyrightText: 2019 Dan Leinir Turthra Jensen <admin@leinir.dk>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7import QtQuick
8import org.kde.kirigami as Kirigami
9import org.kde.newstuff as NewStuff
10import org.kde.newstuff.tools.dialog as Myself
11
12Kirigami.ApplicationWindow {
13 id: root;
14 title: "KNewStuff Dialog"
15
16 globalDrawer: Kirigami.GlobalDrawer {
17 id: globalDrawer
18 title: "KNewStuff Dialog"
19 titleIcon: "get-hot-new-stuff"
20 drawerOpen: true
21 modal: false
22
23 actions: []
24 Instantiator {
25 id: configsInstantiator
26 model: Myself.KNSRCModel {}
27 Kirigami.Action {
28 text: model.name
29 icon.name: "get-hot-new-stuff"
30 onTriggered: {
31 pageStack.clear();
32 pageStack.push(mainPageComponent, { configFile: model.filePath });
33 }
34 }
35 onObjectAdded: (idx, object) => globalDrawer.actions.push(object);
36 }
37 }
38 contextDrawer: Kirigami.ContextDrawer {
39 id: contextDrawer
40 }
41
42 pageStack.defaultColumnWidth: pageStack.width
43 Component {
44 id: mainPageComponent
45 NewStuff.Page { }
46 }
47 Component {
48 id: startPageComponent
49 Kirigami.AboutPage {
50 aboutData: {
51 "displayName": "KNewStuff Dialog",
52 "productName": "org.kde.knewstuff.tools.dialog",
53 "programLogo": "get-hot-new-stuff",
54 "componentName": "knewstuff-dialog",
55 "shortDescription": "Get All Your Hot New Stuff",
56 "homepage": "https://kde.org/",
57 "bugAddress": "https://bugs.kde.org/",
58 "version": "v1.0",
59 "otherText": "",
60 "authors": [
61 {
62 "name": "Dan Leinir Turthra Jensen\n",
63 "task": "Lead Developer",
64 "emailAddress": "admin@leinir.dk",
65 "webAddress": "https://leinir.dk/",
66 "ocsUsername": "leinir",
67 },
68 ],
69 "credits": [],
70 "translators": [],
71 "copyrightStatement": "© 2020 The KDE Community",
72 "desktopFileName": "org.kde.knewstuff.tools.dialog",
73 }
74 }
75 }
76 Component.onCompleted: {
77 pageStack.push(startPageComponent);
78 }
79}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:02:29 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.