import { Button, LineEdit, CheckBox, Spinner, GridBox, VerticalBox, HorizontalBox } from "std-widgets.slint"; export component MainWindow inherits Window { title: "Sane Vector Log Decoder"; preferred-width: 640px; preferred-height: 320px; in-out property dbc-path; in-out property asc-label; in-out property has-asc; in-out property output-dir; in-out property laps; in-out property busy; in-out property status; callback browse-dbc(); callback browse-asc(); callback browse-output(); callback decode(); VerticalBox { padding: 12px; spacing: 8px; GridBox { spacing: 8px; Row { Text { text: "DBC file:"; vertical-alignment: center; } LineEdit { read-only: true; text: root.dbc-path; } Button { text: "Browse..."; clicked => { root.browse-dbc(); } } } Row { Text { text: "ASC file(s):"; vertical-alignment: center; } LineEdit { read-only: true; text: root.asc-label; } Button { text: "Browse..."; clicked => { root.browse-asc(); } } } Row { Text { text: "Output dir:"; vertical-alignment: center; } LineEdit { read-only: true; text: root.output-dir; } Button { text: "Browse..."; clicked => { root.browse-output(); } } } } CheckBox { text: "Generate lap beacons"; checked <=> root.laps; } Rectangle { vertical-stretch: 1; } HorizontalBox { padding: 0px; spacing: 8px; if root.busy: Spinner { width: 20px; height: 20px; indeterminate: true; } Text { text: root.status; horizontal-stretch: 1; vertical-alignment: center; overflow: elide; } Button { text: "Decode!"; enabled: !root.busy && root.dbc-path != "" && root.has-asc && root.output-dir != ""; clicked => { root.decode(); } } } } }