/* * This file is part of the Flowee project * Copyright (C) 2023 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 . */ #include "SendSweepModuleInfo.h" #include "QMLSweepHandler.h" #include // for the qmlRegisterType ModuleInfo * SendSweepModuleInfo::build() { qmlRegisterType("Flowee.org.pay.SendSweep", 1, 0, "SweepHandler"); return new SendSweepModuleInfo(); } SendSweepModuleInfo::SendSweepModuleInfo() : m_actionTabItem(new ModuleSection(ModuleSection::OtherSectionTypeDefault, this)) { setId("sendSweepModule"); setTitle(tr("Sweep & Send")); setDescription(tr("Allows sweeping a paper-wallet, moving the contents to your own wallet")); m_actionTabItem->setText(tr("Sweep Paper Wallet")); m_actionTabItem->setStartQMLFile("qrc:/send-sweep/StartScan.qml"); addSection(m_actionTabItem); // this one is used to have a full screen page at application start, // but we only enable this when the 'bch-wif' scheme was used to start Flowee Pay auto introScreenSection = new ModuleSection(ModuleSection::CustomSectionType, this); introScreenSection->setStartQMLFile("qrc:/send-sweep/SendPage.qml"); introScreenSection->setSectionId("main"); addSection(introScreenSection); } void SendSweepModuleInfo::setEnabled(bool on) { m_enabled = on; m_actionTabItem->setEnabled(on); emit enabledChanged(); }