Changeset View
Changeset View
Standalone View
Standalone View
src/qt/walletframe.h
// Copyright (c) 2011-2016 The Bitcoin Core developers | // Copyright (c) 2011-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_QT_WALLETFRAME_H | #ifndef BITCOIN_QT_WALLETFRAME_H | ||||
#define BITCOIN_QT_WALLETFRAME_H | #define BITCOIN_QT_WALLETFRAME_H | ||||
#include <QFrame> | #include <QFrame> | ||||
#include <QMap> | #include <QMap> | ||||
class BitcoinGUI; | class BitcoinGUI; | ||||
class ClientModel; | class ClientModel; | ||||
class PlatformStyle; | class PlatformStyle; | ||||
class SendCoinsRecipient; | class SendCoinsRecipient; | ||||
class WalletModel; | class WalletModel; | ||||
class WalletView; | class WalletView; | ||||
class Config; | |||||
QT_BEGIN_NAMESPACE | QT_BEGIN_NAMESPACE | ||||
class QStackedWidget; | class QStackedWidget; | ||||
QT_END_NAMESPACE | QT_END_NAMESPACE | ||||
/** | /** | ||||
* A container for embedding all wallet-related | * A container for embedding all wallet-related | ||||
* controls into BitcoinGUI. The purpose of this class is to allow future | * controls into BitcoinGUI. The purpose of this class is to allow future | ||||
* refinements of the wallet controls with minimal need for further | * refinements of the wallet controls with minimal need for further | ||||
* modifications to BitcoinGUI, thus greatly simplifying merges while | * modifications to BitcoinGUI, thus greatly simplifying merges while | ||||
* reducing the risk of breaking top-level stuff. | * reducing the risk of breaking top-level stuff. | ||||
*/ | */ | ||||
class WalletFrame : public QFrame { | class WalletFrame : public QFrame { | ||||
Q_OBJECT | Q_OBJECT | ||||
public: | public: | ||||
explicit WalletFrame(const PlatformStyle *platformStyle, | explicit WalletFrame(const PlatformStyle *platformStyle, | ||||
const Config *configIn, BitcoinGUI *_gui = 0); | BitcoinGUI *_gui = 0); | ||||
~WalletFrame(); | ~WalletFrame(); | ||||
void setClientModel(ClientModel *clientModel); | void setClientModel(ClientModel *clientModel); | ||||
bool addWallet(WalletModel *walletModel); | bool addWallet(WalletModel *walletModel); | ||||
bool setCurrentWallet(const QString &name); | bool setCurrentWallet(const QString &name); | ||||
bool removeWallet(const QString &name); | bool removeWallet(const QString &name); | ||||
void removeAllWallets(); | void removeAllWallets(); | ||||
Show All 11 Lines | private: | ||||
QStackedWidget *walletStack; | QStackedWidget *walletStack; | ||||
BitcoinGUI *gui; | BitcoinGUI *gui; | ||||
ClientModel *clientModel; | ClientModel *clientModel; | ||||
QMap<QString, WalletView *> mapWalletViews; | QMap<QString, WalletView *> mapWalletViews; | ||||
bool bOutOfSync; | bool bOutOfSync; | ||||
const PlatformStyle *platformStyle; | const PlatformStyle *platformStyle; | ||||
const Config *config; | |||||
public: | public: | ||||
WalletView *currentWalletView(); | WalletView *currentWalletView(); | ||||
public Q_SLOTS: | public Q_SLOTS: | ||||
/** Switch to overview (home) page */ | /** Switch to overview (home) page */ | ||||
void gotoOverviewPage(); | void gotoOverviewPage(); | ||||
/** Switch to history (transactions) page */ | /** Switch to history (transactions) page */ | ||||
Show All 29 Lines |