/* * 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> sources_; std::shared_ptr> tags_; std::shared_ptr> days_; std::shared_ptr> calendar_; std::shared_ptr> unscheduledTasks_; slint::ComponentHandle mainWindow_ = ui::AppWindow::create(); slint::ComponentHandle settingsWindow_ = ui::SettingsWindow::create(); slint::ComponentHandle addSourceWindow_ = ui::AddSourceWindow::create(); slint::ComponentHandle editSourceWindow_ = ui::EditSourceWindow::create(); mirai::Mirai *miraiInstance_; mirai::View view_; };