mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-05 03:03: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
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
* 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::CalendarDay>> calendar_;
|
||||
std::shared_ptr<slint::VectorModel<ui::TaskData>> unscheduledTasks_;
|
||||
|
||||
slint::ComponentHandle<ui::AppWindow> mainWindow_ = ui::AppWindow::create();
|
||||
slint::ComponentHandle<ui::SettingsWindow> settingsWindow_ = ui::SettingsWindow::create();
|
||||
slint::ComponentHandle<ui::AddSourceWindow> addSourceWindow_ = ui::AddSourceWindow::create();
|
||||
slint::ComponentHandle<ui::EditSourceWindow> editSourceWindow_ = ui::EditSourceWindow::create();
|
||||
|
||||
mirai::Mirai *miraiInstance_;
|
||||
mirai::View view_;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue