Warning, /frameworks/knewstuff/tests/khotnewstuff_test-ui/main.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2018 Dan Leinir Turthra Jensen <admin@leinir.dk>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 import QtQuick 2.7
0008 import org.kde.kirigami 2.4 as Kirigami
0009 
0010 Kirigami.ApplicationWindow {
0011     id: root;
0012 
0013     globalDrawer: Kirigami.GlobalDrawer {
0014         title: "KNewStuff Test"
0015         titleIcon: "applications-development"
0016         drawerOpen: true;
0017         modal: false;
0018 
0019         actions: [
0020             Kirigami.Action {
0021                 text: "Run Engine test"
0022                 onTriggered: testObject.engineTest();
0023                 iconName: "run-build"
0024             },
0025             Kirigami.Action {
0026                 text: "Test entry download as well"
0027                 onTriggered: testObject.testAll = !testObject.testAll
0028                 iconName: typeof(testObject) !== "undefined" ? (testObject.testAll ? "checkmark" : "") : ""
0029             },
0030             Kirigami.Action {},
0031             Kirigami.Action {
0032                 text: "Run Entry test"
0033                 onTriggered: testObject.entryTest();
0034                 iconName: "run-build"
0035             },
0036             Kirigami.Action {
0037                 text: "Run Provider test"
0038                 onTriggered: testObject.providerTest();
0039                 iconName: "run-build"
0040             }
0041         ]
0042     }
0043     contextDrawer: Kirigami.ContextDrawer {
0044         id: contextDrawer
0045     }
0046 
0047     pageStack.initialPage: mainPageComponent
0048 
0049     Component {
0050         id: mainPageComponent
0051         Kirigami.ScrollablePage {
0052             title: "Welcome"
0053             ListView {
0054                 id: messageView;
0055                 model: testObject.messages();
0056                 onCountChanged: {
0057                     messageView.currentIndex = messageView.count - 1;
0058                 }
0059                 delegate:  Kirigami.BasicListItem {
0060                     id: listItem
0061 
0062                     reserveSpaceForIcon: true
0063                     label: model.display
0064                     icon: model.whatsThis
0065 
0066                     Accessible.role: Accessible.MenuItem
0067                     onClicked: {}
0068                     highlighted: focus && ListView.isCurrentItem
0069                 }
0070             }
0071         }
0072     }
0073 }