mirror of
https://github.com/johndoe6345789/tustu.git
synced 2026-04-24 21:55:12 +00:00
- Updated Main.qml to improve UI layout and replace menu with a toolbar. - Created reusable QML components: DraggableGauge, StatusIndicator, and TopButton. - Implemented EngineSimulator class in main.py for real-time engine data simulation. - Simplified GaugeClusterView by utilizing new components and removing internal timers. - Added README.md for component documentation and usage examples. - Enhanced overall maintainability and performance of the application.
28 lines
560 B
QML
28 lines
560 B
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
|
|
// Status indicator component for engine states
|
|
Rectangle {
|
|
id: root
|
|
height: 22
|
|
width: labelText.width + 16
|
|
radius: 3
|
|
|
|
property string text: ""
|
|
property color bgColor: "#444"
|
|
property color textColor: "#fff"
|
|
|
|
color: bgColor
|
|
border.color: Qt.darker(bgColor, 1.2)
|
|
border.width: 1
|
|
|
|
Label {
|
|
id: labelText
|
|
anchors.centerIn: parent
|
|
text: root.text
|
|
color: root.textColor
|
|
font.pixelSize: 11
|
|
font.family: "monospace"
|
|
}
|
|
}
|