45c5645741
And add my NL translations as well as the auto (duplicates based) translations for other languages.
67 lines
1.9 KiB
C++
67 lines
1.9 KiB
C++
/*
|
|
* This file is part of the Flowee project
|
|
* Copyright (C) 2025 Tom Zander <tom@flowee.org>
|
|
*
|
|
* 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 <http://www.gnu.org/licenses/>.
|
|
*/
|
|
#ifndef BACKUPSYNCMODULEINFO_H
|
|
#define BACKUPSYNCMODULEINFO_H
|
|
|
|
#include <ModuleManager.h>
|
|
#include <NFCTagData.h>
|
|
|
|
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<Streaming::BufferPool> &pool) const override;
|
|
|
|
void doRequestSave() {
|
|
emit requestSaveSettings();
|
|
}
|
|
|
|
void onTagRead(const std::shared_ptr<NFCTagData> &data);
|
|
|
|
// our data on what we operate is made open to the BackupSyncDataProvider
|
|
// in order to provide it to the UI.
|
|
QList<WalletData *> walletData() const;
|
|
|
|
bool nfcAvailable() const;
|
|
|
|
signals:
|
|
void walletDataChanged();
|
|
void nfcAvailableChanged();
|
|
|
|
private:
|
|
BackupSyncModuleInfo();
|
|
void setupWallets();
|
|
ModuleManager *mmanager() const;
|
|
|
|
QList<WalletData*> m_walletData;
|
|
bool m_loaded = false;
|
|
};
|
|
|
|
#endif
|