Events starting and stopping

This commit is contained in:
Alexey 2025-09-08 15:40:28 +03:00
commit 3509263a06
3 changed files with 50 additions and 3 deletions

View file

@ -1,6 +1,7 @@
import { TabWidget } from "std-widgets.slint";
import { RecordWidget } from "record.slint";
import { ReviewWidget } from "review.slint";
import { TimelineEvent } from "timeline.slint";
export component AppWindow inherits Window {
callback update-record-visible-time <=> record.update-visible-time;
@ -12,12 +13,19 @@ export component AppWindow inherits Window {
record.offset = new-offset;
}
in-out property record-events <=> record.events;
in-out property record-offset <=> record.offset;
in-out property<int> record-visible-time <=> record.visible-time;
property<[string]> combo-spans: ["1 Hour", "4 Hours", "8 Hours", "24 Hours"];
title: "Aliveline";
TabWidget {
Tab {
title: "Record";
record := RecordWidget {}
record := RecordWidget {
combo-spans: combo-spans;
}
}
Tab {
title: "Review";

View file

@ -8,6 +8,8 @@ export component RecordWidget inherits VerticalBox {
in-out property visible-time <=> tl.visible-time;
in-out property updating <=> tl.updating;
in-out property offset <=> tl.offset;
in-out property events <=> tl.events;
in property<[string]> combo-spans: [];
property<bool> in-progress: false;
property<string> event-name <=> le.text;
@ -26,7 +28,7 @@ export component RecordWidget inherits VerticalBox {
row: 0;
}
Button {
text: updating ? "Stop" : "Start";
text: in-progress ? "Stop" : "Start";
colspan: 2;
row: 1;
clicked => {
@ -45,7 +47,7 @@ export component RecordWidget inherits VerticalBox {
horizontal-alignment: right;
}
ComboBox {
model: ["1 Hour", "4 Hours", "8 Hours", "24 Hours"];
model: combo-spans;
current-index: 0;
row: 2;
col: 1;