/* * This file is part of the Flowee project * Copyright (C) 2025 Tom Zander * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef BACKUPSYNCMODULEINFO_H #define BACKUPSYNCMODULEINFO_H #include #include class WalletData; class BackupSyncModuleInfo : public ModuleInfo { Q_OBJECT Q_PROPERTY(bool nfcAvailable READ nfcAvailable NOTIFY nfcAvailableChanged FINAL) public: static BackupSyncModuleInfo *instance(); static ModuleInfo *build(); static const char *translationUnit() { return "module-backup-sync"; } void loadSettings(const Streaming::ConstBuffer &data) override; Streaming::ConstBuffer saveSettings(std::shared_ptr &pool) const override; void doRequestSave() { emit requestSaveSettings(); } void onTagRead(const std::shared_ptr &data); // our data on what we operate is made open to the BackupSyncDataProvider // in order to provide it to the UI. QList walletData() const; bool nfcAvailable() const; signals: void walletDataChanged(); void nfcAvailableChanged(); private: BackupSyncModuleInfo(); void setupWallets(); ModuleManager *mmanager() const; QList m_walletData; bool m_loaded = false; }; #endif