1
Fork 0
tisch/package/contents/ui/main.qml

65 lines
1.9 KiB
QML
Raw Normal View History

2024-10-30 22:37:28 -04:00
// SPDX-FileCopyrightText: 2024 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
import QtQuick
import QtQuick.Layouts
import org.kde.plasma.plasmoid
import org.kde.plasma.components as PlasmaComponents3
import org.kde.kirigami as Kirigami
PlasmoidItem {
fullRepresentation: StackLayout {
anchors.fill: parent
currentIndex: Plasmoid.state
// No desk discovered
Item {
Kirigami.PlaceholderMessage {
anchors.centerIn: parent
width: parent.width - (Kirigami.Units.largeSpacing * 4)
text: "No Desk Connected"
explanation: "Manually connect to the desk in the Bluetooth applet."
icon.name: "network-bluetooth-inactive-symbolic"
helpfulAction: Kirigami.Action {
icon.name: "view-refresh-symbolic"
text: "Refresh"
onTriggered: Plasmoid.connectToDesk()
}
}
}
// Searching for desk
Item {
Kirigami.LoadingPlaceholder {
anchors.centerIn: parent
width: parent.width - (Kirigami.Units.largeSpacing * 4)
}
}
// Normal
ColumnLayout {
Image {
source: "../desk.svg"
}
PlasmaComponents3.Label {
text: Plasmoid.height
}
PlasmaComponents3.Button {
text: "Up"
icon.name: "arrow-up-symbolic"
autoRepeat: true
onClicked: Plasmoid.up()
}
PlasmaComponents3.Button {
text: "Down"
icon.name: "arrow-down-symbolic"
autoRepeat: true
onClicked: Plasmoid.down()
}
}
}
}