mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-02 17:23:20 +00:00
Refactor the whole structure, no more separation for C++ and Slint files
This commit is contained in:
parent
d6c781faa2
commit
893fcc11e3
35 changed files with 920 additions and 518 deletions
50
src/windows/AppWindow/Models.slint
Normal file
50
src/windows/AppWindow/Models.slint
Normal file
|
@ -0,0 +1,50 @@
|
|||
import { Date, Time } from "std-widgets.slint";
|
||||
import { CalendarDay } from "../../components/Calendar.slint";
|
||||
|
||||
export struct Source {
|
||||
id: int,
|
||||
name: string,
|
||||
selected: bool,
|
||||
path: string
|
||||
}
|
||||
|
||||
export struct TaskData {
|
||||
sourceId: int,
|
||||
eventId: int,
|
||||
id: int,
|
||||
title: string,
|
||||
date: Date,
|
||||
checked: bool,
|
||||
}
|
||||
|
||||
export struct Event {
|
||||
sourceId: int,
|
||||
id: int,
|
||||
title: string,
|
||||
startsAt: Time,
|
||||
endsAt: Time,
|
||||
tasks: [TaskData],
|
||||
}
|
||||
|
||||
export struct Day {
|
||||
sourceId: int,
|
||||
id: int,
|
||||
date: Date,
|
||||
events: [Event],
|
||||
tasks: [TaskData],
|
||||
isLate: bool,
|
||||
isToday: bool,
|
||||
relativeDaysDiff: int
|
||||
}
|
||||
|
||||
export global AppWindowModels {
|
||||
in-out property<[Source]> sources-selected;
|
||||
in-out property<int> default-source-index;
|
||||
in-out property<[string]> sources;
|
||||
in-out property<bool> no-source-selected;
|
||||
in-out property<[Day]> days;
|
||||
in-out property<[CalendarDay]> calendar;
|
||||
in-out property<[TaskData]> unscheduled-tasks;
|
||||
|
||||
callback get-source-id-from-name(string) -> int;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue