mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-05 03:03:20 +00:00
Update dependencies and adapt code
This commit is contained in:
parent
f11f4bf1c9
commit
a80515ff90
9 changed files with 72 additions and 29 deletions
38
src/AppWindowBackend.h
Normal file
38
src/AppWindowBackend.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Mirai. Copyright (C) 2024 Vyn
|
||||
* This file is licensed under version 3 of the GNU General Public License (GPL-3.0-only)
|
||||
* The license can be found in the LICENSE file or at https://www.gnu.org/licenses/gpl-3.0.txt
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "appwindow.h"
|
||||
#include "mirai-core/Mirai.h"
|
||||
#include "mirai-core/View.h"
|
||||
#include "slint.h"
|
||||
|
||||
class AppWindowBackend
|
||||
{
|
||||
|
||||
public:
|
||||
AppWindowBackend(mirai::Mirai *mirai);
|
||||
|
||||
void run();
|
||||
|
||||
void reloadSources();
|
||||
void reloadTasks();
|
||||
|
||||
private:
|
||||
void setupCallbacks();
|
||||
void setupUtilsCallbacks();
|
||||
|
||||
std::shared_ptr<slint::VectorModel<ui::Source>> sources_;
|
||||
std::shared_ptr<slint::VectorModel<slint::SharedString>> tags_;
|
||||
std::shared_ptr<slint::VectorModel<ui::Day>> days_;
|
||||
std::shared_ptr<slint::VectorModel<ui::TaskData>> unscheduledTasks_;
|
||||
|
||||
slint::ComponentHandle<ui::AppWindow> mainWindow_ = ui::AppWindow::create();
|
||||
|
||||
mirai::Mirai *miraiInstance_;
|
||||
mirai::View view_;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue