KNewStuff

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

KDE's Doxygen guidelines are available online.