Skip to content

Commit

Permalink
#82 Basic Keyboard Functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Peyton-McKee committed Feb 27, 2024
1 parent f26bbdc commit 9c17732
Show file tree
Hide file tree
Showing 8 changed files with 592 additions and 10 deletions.
3 changes: 3 additions & 0 deletions NERODevelopment/content/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,7 @@ qt6_add_qml_module(content
images/pipe.png
images/flappy-bird.png
QML_FILES Configuration.qml
QML_FILES Keyboard.qml
QML_FILES KeyboardController.qml
QML_FILES KeyboardInput.qml
)
15 changes: 12 additions & 3 deletions NERODevelopment/content/Configuration.qml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import QtQuick 2.15
import QtQuick.Controls

Item {
id: configuration

anchors.fill: parent
property string title: "Configuration"
property string driverText: ""
property string locationText: ""
property string systemText: ""

ValueText {
anchors.top: parent.top
anchors.topMargin: 5
anchors.horizontalCenter: parent.horizontalCenter
id: title
text: qsTr("Configuration")
}
Expand All @@ -17,12 +21,17 @@ Item {
id: driverRow
anchors.top: title.bottom
anchors.topMargin: 5
anchors.horizontalCenter: parent.horizontalCenter

LabelText {
text: "Driver"
}

ValueText {
text: configuration.driverText
KeyboardInput {
label: "joe mama"
onAccepted: {
configuration.driverText = text
}
}
}

Expand Down
14 changes: 10 additions & 4 deletions NERODevelopment/content/DebugTable.qml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Item {
anchors.top: parent.top
anchors.bottom: parent.bottom
width: parent.width / 4
color: 'black'

HorizontalHeaderView {
id: topicsHeader
Expand Down Expand Up @@ -74,9 +75,11 @@ Item {
implicitWidth: topicsTableView.width
implicitHeight: debugTable.rowHeight
border.width: scrollingTopics
&& model.index === debugTable.selectedTopicIndex ? 5 : 1
&& model.index === debugTable.selectedTopicIndex ? 3 : 1
color: 'black'
border.color: 'white'

Text {
LabelText {
text: display
anchors.centerIn: parent
}
Expand All @@ -88,6 +91,7 @@ Item {
anchors.top: parent.top
anchors.bottom: parent.bottom
width: parent.width * 3 / 4
color: 'black'

HorizontalHeaderView {
id: valuesHeader
Expand Down Expand Up @@ -125,9 +129,11 @@ Item {
implicitWidth: parent.width / 3
implicitHeight: debugTable.rowHeight
border.width: !scrollingTopics
&& model.index === debugTable.selectedValueIndex ? 5 : 1
&& model.index === debugTable.selectedValueIndex ? 3 : 1
color: 'black'
border.color: 'white'

Text {
LabelText {
anchors.centerIn: parent
text: display
}
Expand Down
Loading

0 comments on commit 9c17732

Please sign in to comment.