66 lines
1.7 KiB
QML
66 lines
1.7 KiB
QML
// 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
|
|
import com.redstrate.tabletsimulator
|
|
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()
|
|
}
|
|
}
|
|
}
|
|
}
|