Warning, /plasma/plasma-mobile/tests/ActionDrawerTest.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  *   SPDX-FileCopyrightText: 2022 Aleix Pol Gonzalez <aleixpol@kde.org>
0003  *   SPDX-FileCopyrightText: 2022 Devin LIn <devin@kde.org>
0004  *
0005  *   SPDX-License-Identifier: LGPL-2.0-or-later
0006  */
0007 
0008 import QtQuick 2.15
0009 import QtQuick.Controls 2.15
0010 
0011 import org.kde.plasma.components 3.0 as PC3
0012 import org.kde.plasma.core 2.0 as PlasmaCore
0013 import org.kde.plasma.private.mobileshell 1.0 as MobileShell
0014 import org.kde.notificationmanager 1.1 as Notifications
0015 
0016 import org.kde.notificationmanager 1.0 as NotificationManager
0017 
0018 // This is a test app to conveniently test the Quick Settings that are available
0019 // on the system without having to load a full Plasma Mobile shell.
0020 //
0021 // Do not expect changes in this file to change the plasma UX. Do not install.
0022 //
0023 // This can be executed by running `qmlscene QuickSettingsTest.qml`
0024 
0025 ApplicationWindow {
0026     width: 360
0027     height: 720
0028     visible: true
0029     
0030     Image {
0031         source: "assets/background.jpg"
0032         anchors.fill: parent
0033         fillMode: Image.PreserveAspectCrop
0034     }
0035     
0036     MobileShell.StatusBar {
0037         id: statusBar
0038         z: 1
0039         
0040         anchors.top: parent.top
0041         anchors.left: parent.left
0042         anchors.right: parent.right
0043         
0044         height: PlasmaCore.Units.gridUnit * 1.25
0045         
0046         colorGroup: PlasmaCore.Theme.ComplementaryColorGroup
0047         backgroundColor: "transparent"
0048         
0049         showSecondRow: false
0050         showDropShadow: true
0051         showTime: true
0052         disableSystemTray: true // prevent SIGABRT, since loading the system tray leads to bad... things
0053     }
0054     
0055     MobileShell.ActionDrawerOpenSurface {
0056         anchors.fill: statusBar
0057         actionDrawer: drawer
0058         z: 1
0059     }
0060     
0061     MobileShell.ActionDrawer {
0062         id: drawer
0063         z: 1
0064         anchors.fill: parent
0065         
0066         notificationSettings: NotificationManager.Settings {}
0067         notificationModelType: MobileShell.NotificationsModelType.WatchedNotificationsModel
0068         notificationModel: Notifications.WatchedNotificationsModel {}
0069     }
0070     
0071     PC3.Label {
0072         anchors.bottom: parent.bottom
0073         anchors.bottomMargin: PlasmaCore.Units.largeSpacing
0074         anchors.horizontalCenter: parent.horizontalCenter
0075         text: "Pull down the action drawer from the top."
0076         color: "white"
0077     }
0078 }