1
Fork 0
tablet-simulator/ui/Main.qml

67 lines
1.7 KiB
QML
Raw Normal View History

2024-11-07 22:34:41 -05:00
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
import QtQuick
import QtQuick.Window
import org.kde.kirigami as Kirigami
import QtQuick.Controls as Controls
import QtQuick.Layouts
2025-04-12 16:33:47 -04:00
import com.redstrate.tabletsimulator
2024-11-07 22:34:41 -05:00
import org.kde.kirigamiaddons.formcard as FormCard
Kirigami.ApplicationWindow {
id: appWindow
width: 640
height: 480
visible: true
title: "InputFaker"
property DeviceManager deviceManager: DeviceManager {}
pageStack.initialPage: FormCard.FormCardPage {
id: page
title: "FAKE!"
FormCard.FormCard {
Layout.topMargin: Kirigami.Units.largeSpacing
Layout.fillWidth: true
FormCard.FormTextFieldDelegate {
label: "Device Name"
onTextChanged: deviceManager.name = text
}
FormCard.FormDelegateSeparator {}
FormCard.FormCheckDelegate {
text: "Direct"
onCheckedChanged: deviceManager.direct = checked
}
FormCard.FormDelegateSeparator {}
FormCard.FormCheckDelegate {
text: "Pad"
onCheckedChanged: deviceManager.pad = checked
}
FormCard.FormDelegateSeparator {}
FormCard.FormButtonDelegate {
text: "Apply & Re-create device"
onClicked: deviceManager.recreateDevice()
enabled: deviceManager.name.length > 0
}
FormCard.FormDelegateSeparator {}
FormCard.FormButtonDelegate {
text: "Test button"
onClicked: deviceManager.testButton()
}
}
}
}