Files
thehub/hub-qt/walletframe.h
T

98 lines
2.7 KiB
C++
Raw Permalink Normal View History

2017-11-09 19:34:51 +01:00
/*
* This file is part of the Flowee project
* Copyright (C) 2011-2015 The Bitcoin Core developers
*
* 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/>.
*/
2013-11-04 16:20:43 +01:00
2018-01-16 10:47:52 +00:00
#ifndef FLOWEE_QT_WALLETFRAME_H
#define FLOWEE_QT_WALLETFRAME_H
#include <QFrame>
2013-10-18 18:05:26 +02:00
#include <QMap>
class BitcoinGUI;
class ClientModel;
2015-07-28 15:20:14 +02:00
class PlatformStyle;
class SendCoinsRecipient;
class WalletModel;
2013-10-18 18:05:26 +02:00
class WalletView;
QT_BEGIN_NAMESPACE
class QStackedWidget;
QT_END_NAMESPACE
class WalletFrame : public QFrame
{
Q_OBJECT
2013-05-31 14:02:24 +02:00
public:
2015-07-28 15:20:14 +02:00
explicit WalletFrame(const PlatformStyle *platformStyle, BitcoinGUI *_gui = 0);
~WalletFrame();
void setClientModel(ClientModel *clientModel);
bool addWallet(const QString& name, WalletModel *walletModel);
bool setCurrentWallet(const QString& name);
2013-10-18 18:43:07 +02:00
bool removeWallet(const QString &name);
void removeAllWallets();
bool handlePaymentRequest(const SendCoinsRecipient& recipient);
void showOutOfSyncWarning(bool fShow);
private:
2013-10-18 18:05:26 +02:00
QStackedWidget *walletStack;
BitcoinGUI *gui;
ClientModel *clientModel;
QMap<QString, WalletView*> mapWalletViews;
bool bOutOfSync;
2015-07-28 15:20:14 +02:00
const PlatformStyle *platformStyle;
2013-11-12 14:54:43 +01:00
WalletView *currentWalletView();
2015-07-14 13:59:05 +02:00
public Q_SLOTS:
/** Switch to overview (home) page */
void gotoOverviewPage();
/** Switch to history (transactions) page */
void gotoHistoryPage();
/** Switch to receive coins page */
void gotoReceiveCoinsPage();
/** Switch to send coins page */
void gotoSendCoinsPage(QString addr = "");
/** Show Sign/Verify Message dialog and switch to sign message tab */
void gotoSignMessageTab(QString addr = "");
/** Show Sign/Verify Message dialog and switch to verify message tab */
void gotoVerifyMessageTab(QString addr = "");
/** Encrypt the wallet */
void encryptWallet(bool status);
/** Backup the wallet */
void backupWallet();
/** Change encrypted wallet passphrase */
void changePassphrase();
/** Ask for passphrase to unlock wallet temporarily */
void unlockWallet();
2013-10-16 15:14:26 +02:00
/** Show used sending addresses */
void usedSendingAddresses();
/** Show used receiving addresses */
void usedReceivingAddresses();
};
2018-01-16 10:47:52 +00:00
#endif