This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
add_subdirectory(core)
|
||||
add_subdirectory(views)
|
||||
@@ -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)
|
||||
@@ -0,0 +1 @@
|
||||
#include "core.hpp"
|
||||
@@ -0,0 +1,14 @@
|
||||
#ifndef CORE_HPP
|
||||
#define CORE_HPP
|
||||
|
||||
namespace core {
|
||||
|
||||
class Core {
|
||||
public:
|
||||
Core() = default;
|
||||
~Core() = default;
|
||||
};
|
||||
|
||||
} // namespace core
|
||||
|
||||
#endif
|
||||
@@ -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
|
||||
)
|
||||
@@ -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-EnviroStation‑01", "LR-EnviroStation‑02"] }
|
||||
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-EnviroStation‑01"; 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user