Warning, /frameworks/kirigami/examples/applicationitemapp/main.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  *  SPDX-FileCopyrightText: 2016 Marco Martin <mart@kde.org>
0003  *
0004  *  SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 
0007 import QtQuick 2.15
0008 import org.kde.kirigami 2.20 as Kirigami
0009 
0010 Kirigami.ApplicationItem {
0011     id: root
0012 
0013     globalDrawer: Kirigami.GlobalDrawer {
0014         title: "Hello App"
0015         titleIcon: "applications-graphics"
0016 
0017         actions: [
0018             Kirigami.Action {
0019                 text: "View"
0020                 icon.name: "view-list-icons"
0021                 Kirigami.Action {
0022                     text: "action 1"
0023                 }
0024                 Kirigami.Action {
0025                     text: "action 2"
0026                 }
0027                 Kirigami.Action {
0028                     text: "action 3"
0029                 }
0030             },
0031             Kirigami.Action {
0032                 text: "action 3"
0033             },
0034             Kirigami.Action {
0035                 text: "action 4"
0036             }
0037         ]
0038         handleVisible: true
0039     }
0040     contextDrawer: Kirigami.ContextDrawer {
0041         id: contextDrawer
0042     }
0043 
0044     pageStack.initialPage: mainPageComponent
0045 
0046     Component {
0047         id: mainPageComponent
0048         Kirigami.Page {
0049             title: "Hello"
0050             actions.contextualActions: [
0051                 Kirigami.Action {
0052                     text: "action 1"
0053                 },
0054                 Kirigami.Action {
0055                     text: "action 2"
0056                 }
0057             ]
0058             Rectangle {
0059                 color: "red"
0060                 anchors.fill: parent
0061             }
0062         }
0063     }
0064 }