Add dummy ui
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s

This commit is contained in:
2026-05-02 08:45:02 -07:00
parent 1beefa7d11
commit 9842c1579b
10 changed files with 193 additions and 19 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.15...4.3) cmake_minimum_required(VERSION 3.15...4.3)
project( project(
EmbeddedLinuxSandbox LR-EnviroCommand
VERSION 0.1 VERSION 0.1.0
DESCRIPTION "LR-EnviroCommand" DESCRIPTION "LR-EnviroCommand"
LANGUAGES CXX LANGUAGES CXX
) )
@@ -36,7 +36,7 @@ endif ()
# Setup Qt QML # Setup Qt QML
find_package(Qt6 6.10 COMPONENTS Network Quick REQUIRED) find_package(Qt6 6.10 COMPONENTS Charts Network Quick REQUIRED)
qt_standard_project_setup(REQUIRES 6.10) qt_standard_project_setup(REQUIRES 6.10)
# FetchContent added in CMake 3.11, downloads during the configure step # FetchContent added in CMake 3.11, downloads during the configure step
+9 -2
View File
@@ -5,11 +5,18 @@ qt_add_executable(${target}
) )
qt_add_qml_module(${target} qt_add_qml_module(${target}
URI app URI "app"
VERSION 0.1.0
QML_FILES QML_FILES
main.qml main.qml
) )
target_compile_features(${target} PRIVATE cxx_std_23) target_compile_features(${target} PRIVATE cxx_std_23)
target_link_libraries(${target} PRIVATE Qt6::Quick) target_link_libraries(${target}
PRIVATE
Qt6::Charts
Qt6::Quick
project_core
project_viewsplugin
)
+32 -12
View File
@@ -1,21 +1,41 @@
import QtQuick import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts
import ProjectViews
ApplicationWindow { ApplicationWindow {
width: 400 id: app
height: 400 width: 1280
height: 720
visible: true visible: true
title: "LR-EnviroCommand"
Button { RowLayout {
id: button anchors.fill: parent
text: "A Special Button"
background: Rectangle { Rectangle {
implicitWidth: 100 width: 220
implicitHeight: 40 Layout.fillHeight: true
color: button.down ? "#d6d6d6" : "#f6f6f6"
border.color: "#26282a" Column {
border.width: 1 anchors.fill: parent
radius: 4 anchors.margins: 20
spacing: 16
Button { text: "Dashboard" }
Button { text: "Telemetry" }
Button { text: "Logs" }
Button { text: "Firmware" }
Button { text: "Remote Commands" }
Button { text: "Settings" }
}
}
StackView {
id: stackView
Layout.fillWidth: true
Layout.fillHeight: true
initialItem: Dashboard { }
} }
} }
} }
+2
View File
@@ -0,0 +1,2 @@
add_subdirectory(core)
add_subdirectory(views)
+10
View File
@@ -0,0 +1,10 @@
set(target project_core)
add_library(${target}
core.cpp
core.hpp
)
target_compile_features(${target} PRIVATE cxx_std_23)
# target_link_libraries(${target} PRIVATE)
+1
View File
@@ -0,0 +1 @@
#include "core.hpp"
+14
View File
@@ -0,0 +1,14 @@
#ifndef CORE_HPP
#define CORE_HPP
namespace core {
class Core {
public:
Core() = default;
~Core() = default;
};
} // namespace core
#endif
+10
View File
@@ -0,0 +1,10 @@
set(target project_views)
qt_add_library(project_views STATIC)
qt_add_qml_module(${target}
URI "ProjectViews"
VERSION 0.1.0
QML_FILES
Dashboard.qml
)
+109
View File
@@ -0,0 +1,109 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
Item {
Layout.fillWidth: true
Layout.fillHeight: true
ColumnLayout {
anchors.fill: parent
anchors.margins: 20
spacing: 16
RowLayout {
Layout.fillWidth: true
spacing: 20
ComboBox { model: ["LR-EnviroStation01", "LR-EnviroStation02"] }
Rectangle { width: 12; height: 12; radius: 6; color: "green" }
Label { text: "Online"; }
Item { Layout.fillWidth: true }
Button { text: "Restart Device" }
Button { text: "Sync Now" }
}
Rectangle {
Layout.fillWidth: true
height: 120
radius: 8
Column {
anchors.fill: parent
anchors.margins: 16
spacing: 6
Label { text: "LR-EnviroStation01"; font.bold: true }
Label { text: "Location: Tucson, AZ"; }
Label { text: "Last Seen: Just now"; }
}
}
GridLayout {
columns: 3
Layout.fillWidth: true
rowSpacing: 16
columnSpacing: 16
Rectangle {
width: 300; height: 120; radius: 8;
Column {
anchors.centerIn: parent
Label { text: "Temperature"; }
Label { text: "72°F ↑"; color: "#4da3ff"; font.pixelSize: 26 }
}
}
Rectangle {
width: 300; height: 120; radius: 8;
Column {
anchors.centerIn: parent
Label { text: "Humidity"; }
Label { text: "18% →"; color: "#4da3ff"; font.pixelSize: 26 }
}
}
Rectangle {
width: 300; height: 120; radius: 8;
Column {
anchors.centerIn: parent
Label { text: "Alerts"; }
Label { text: "2 Active"; color: "orange"; font.pixelSize: 26 }
}
}
}
Rectangle {
Layout.fillWidth: true
Layout.fillHeight: true
radius: 8
Column {
anchors.fill: parent
anchors.margins: 16
spacing: 8
Label { text: "Recent Activity"; font.bold: true }
ListView {
Layout.fillWidth: true
Layout.fillHeight: true
model: [
"Telemetry upload OK (12:01)",
"Wind sensor calibrated (11:58)",
"Firmware check complete (11:45)"
]
delegate: Label {
text: modelData
leftPadding: 4
rightPadding: 4
topPadding: 2
bottomPadding: 2
}
}
}
}
}
}
+2 -1
View File
@@ -1,5 +1,6 @@
{ {
"dependencies": [ "dependencies": [
"qtdeclarative" "qtdeclarative",
"qtcharts"
] ]
} }