// SPDX-FileCopyrightText: 2023 Yury Gubich // SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include #include #include #include #include #include #include #include #include "models/magpie.h" #include "API/api.h" class Root : public QGuiApplication { Q_OBJECT public: Root(const QUrl& root, int& argc, char* argv[]); ~Root(); bool notify(QObject* receiver, QEvent* e) override; private slots: void onObjectCreated(QObject* obj, const QUrl& objUrl); void onAPIAddressChanged(const QUrl& url); void onStoreTokens(const QString& access, const QString& renew); private: QUrl root; QQmlApplicationEngine engine; QQmlContext* context; Models::Magpie magpie; std::shared_ptr api; };