Bitcoin ABC  0.24.11
P2P Digital Currency
walletframe.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2019 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_QT_WALLETFRAME_H
6 #define BITCOIN_QT_WALLETFRAME_H
7 
8 #include <QFrame>
9 #include <QMap>
10 
11 class BitcoinGUI;
12 class ClientModel;
13 class PlatformStyle;
14 class SendCoinsRecipient;
15 class WalletModel;
16 class WalletView;
17 
18 QT_BEGIN_NAMESPACE
19 class QStackedWidget;
20 QT_END_NAMESPACE
21 
29 class WalletFrame : public QFrame {
30  Q_OBJECT
31 
32 public:
33  explicit WalletFrame(const PlatformStyle *platformStyle,
34  BitcoinGUI *_gui = nullptr);
35  ~WalletFrame();
36 
38 
39  bool addWallet(WalletModel *walletModel);
40  void setCurrentWallet(WalletModel *wallet_model);
41  void removeWallet(WalletModel *wallet_model);
42  void removeAllWallets();
43 
44  bool handlePaymentRequest(const SendCoinsRecipient &recipient);
45 
46  void showOutOfSyncWarning(bool fShow);
47 
48  QSize sizeHint() const override { return m_size_hint; }
49 
50 Q_SIGNALS:
54 
55 private:
56  QStackedWidget *walletStack;
59  QMap<WalletModel *, WalletView *> mapWalletViews;
60 
61  bool bOutOfSync;
62 
64 
65  const QSize m_size_hint;
66 
67 public:
70 
71 public Q_SLOTS:
73  void gotoOverviewPage();
75  void gotoHistoryPage();
77  void gotoReceiveCoinsPage();
79  void gotoSendCoinsPage(QString addr = "");
80 
82  void gotoSignMessageTab(QString addr = "");
84  void gotoVerifyMessageTab(QString addr = "");
85 
87  void gotoLoadPSBT();
88 
90  void encryptWallet();
92  void backupWallet();
94  void changePassphrase();
96  void unlockWallet();
97 
99  void usedSendingAddresses();
101  void usedReceivingAddresses();
104 };
105 
106 #endif // BITCOIN_QT_WALLETFRAME_H
WalletFrame
A container for embedding all wallet-related controls into BitcoinGUI.
Definition: walletframe.h:29
WalletFrame::currentWalletView
WalletView * currentWalletView() const
Definition: walletframe.cpp:252
WalletFrame::gotoReceiveCoinsPage
void gotoReceiveCoinsPage()
Switch to receive coins page.
Definition: walletframe.cpp:175
WalletFrame::gotoSignMessageTab
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
Definition: walletframe.cpp:189
WalletFrame::unlockWallet
void unlockWallet()
Ask for passphrase to unlock wallet temporarily.
Definition: walletframe.cpp:231
WalletView
WalletView class.
Definition: walletview.h:34
WalletFrame::requestedSyncWarningInfo
void requestedSyncWarningInfo()
Notify that the user has requested more information about the out-of-sync warning.
WalletModel
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:47
WalletFrame::addWallet
bool addWallet(WalletModel *walletModel)
Definition: walletframe.cpp:70
WalletFrame::WalletFrame
WalletFrame(const PlatformStyle *platformStyle, BitcoinGUI *_gui=nullptr)
Definition: walletframe.cpp:22
WalletFrame::outOfSyncWarningClicked
void outOfSyncWarningClicked()
Pass on signal over requested out-of-sync-warning information.
Definition: walletframe.cpp:261
WalletFrame::encryptWallet
void encryptWallet()
Encrypt the wallet.
Definition: walletframe.cpp:210
WalletFrame::platformStyle
const PlatformStyle * platformStyle
Definition: walletframe.h:63
WalletFrame::changePassphrase
void changePassphrase()
Change encrypted wallet passphrase.
Definition: walletframe.cpp:224
WalletFrame::mapWalletViews
QMap< WalletModel *, WalletView * > mapWalletViews
Definition: walletframe.h:59
WalletFrame::sizeHint
QSize sizeHint() const override
Definition: walletframe.h:48
WalletFrame::backupWallet
void backupWallet()
Backup the wallet.
Definition: walletframe.cpp:217
WalletFrame::bOutOfSync
bool bOutOfSync
Definition: walletframe.h:61
SendCoinsRecipient
Definition: sendcoinsrecipient.h:23
WalletFrame::setCurrentWallet
void setCurrentWallet(WalletModel *wallet_model)
Definition: walletframe.cpp:115
WalletFrame::~WalletFrame
~WalletFrame()
Definition: walletframe.cpp:59
WalletFrame::usedReceivingAddresses
void usedReceivingAddresses()
Show used receiving addresses.
Definition: walletframe.cpp:245
WalletFrame::currentWalletModel
WalletModel * currentWalletModel() const
Definition: walletframe.cpp:256
WalletFrame::gui
BitcoinGUI * gui
Definition: walletframe.h:57
WalletFrame::m_size_hint
const QSize m_size_hint
Definition: walletframe.h:65
WalletFrame::clientModel
ClientModel * clientModel
Definition: walletframe.h:58
WalletFrame::usedSendingAddresses
void usedSendingAddresses()
Show used sending addresses.
Definition: walletframe.cpp:238
WalletFrame::gotoSendCoinsPage
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
Definition: walletframe.cpp:182
ClientModel
Model for Bitcoin network client.
Definition: clientmodel.h:36
WalletFrame::handlePaymentRequest
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
Definition: walletframe.cpp:144
WalletFrame::setClientModel
void setClientModel(ClientModel *clientModel)
Definition: walletframe.cpp:61
WalletFrame::gotoVerifyMessageTab
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
Definition: walletframe.cpp:196
WalletFrame::gotoOverviewPage
void gotoOverviewPage()
Switch to overview (home) page.
Definition: walletframe.cpp:161
WalletFrame::walletStack
QStackedWidget * walletStack
Definition: walletframe.h:56
WalletFrame::removeAllWallets
void removeAllWallets()
Definition: walletframe.cpp:136
WalletFrame::showOutOfSyncWarning
void showOutOfSyncWarning(bool fShow)
Definition: walletframe.cpp:153
PlatformStyle
Definition: platformstyle.h:13
BitcoinGUI
Bitcoin GUI main class.
Definition: bitcoingui.h:68
WalletFrame::gotoHistoryPage
void gotoHistoryPage()
Switch to history (transactions) page.
Definition: walletframe.cpp:168
WalletFrame::gotoLoadPSBT
void gotoLoadPSBT()
Load Partially Signed Bitcoin Transaction.
Definition: walletframe.cpp:203
WalletFrame::removeWallet
void removeWallet(WalletModel *wallet_model)
Definition: walletframe.cpp:126