/* * 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 BACKUPACCOUNTINFO_H #define BACKUPACCOUNTINFO_H #include class WalletData; class BackupAccountInfo : public QObject { Q_OBJECT Q_PROPERTY(AccountInfo *account READ account WRITE setAccount NOTIFY accountChanged FINAL REQUIRED) Q_PROPERTY(QString lastSaved READ lastSaved NOTIFY lastSavedChanged FINAL) Q_PROPERTY(QString address READ address NOTIFY accountChanged FINAL) Q_PROPERTY(bool walletUploadScheduled READ walletUploadScheduled NOTIFY walletUploadScheduledChanged FINAL) public: explicit BackupAccountInfo(QObject *parent = nullptr); AccountInfo *account() const; void setAccount(AccountInfo *newAccount); QString lastSaved() const; QString address() const; Q_INVOKABLE void startBackup(); bool walletUploadScheduled() const; void setWalletUploadScheduled(bool newWalletUploadScheduled); signals: void accountChanged(); void lastSavedChanged(); void walletUploadScheduledChanged(); private: AccountInfo *m_account = nullptr; WalletData *m_walletData = nullptr; // true while the user started an upload, but the wallet is still // not at tip. bool m_walletUploadScheduled = false; }; #endif