Bitcoin Core  21.99.0
P2P Digital Currency
walletframe.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2020 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 {
31  Q_OBJECT
32 
33 public:
34  explicit WalletFrame(const PlatformStyle *platformStyle, 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:
53 
54 private:
55  QStackedWidget *walletStack;
58  QMap<WalletModel*, WalletView*> mapWalletViews;
59 
60  bool bOutOfSync;
61 
63 
64  const QSize m_size_hint;
65 
66 public:
69 
70 public Q_SLOTS:
72  void gotoOverviewPage();
74  void gotoHistoryPage();
76  void gotoReceiveCoinsPage();
78  void gotoSendCoinsPage(QString addr = "");
79 
81  void gotoSignMessageTab(QString addr = "");
83  void gotoVerifyMessageTab(QString addr = "");
84 
86  void gotoLoadPSBT(bool from_clipboard = false);
87 
89  void encryptWallet();
91  void backupWallet();
93  void changePassphrase();
95  void unlockWallet();
96 
98  void usedSendingAddresses();
100  void usedReceivingAddresses();
103 };
104 
105 #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:256
WalletFrame::gotoReceiveCoinsPage
void gotoReceiveCoinsPage()
Switch to receive coins page.
Definition: walletframe.cpp:178
WalletFrame::gotoSignMessageTab
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
Definition: walletframe.cpp:192
WalletFrame::unlockWallet
void unlockWallet()
Ask for passphrase to unlock wallet temporarily.
Definition: walletframe.cpp:235
WalletView
Definition: walletview.h:33
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:51
WalletFrame::addWallet
bool addWallet(WalletModel *walletModel)
Definition: walletframe.cpp:69
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:267
WalletFrame::encryptWallet
void encryptWallet()
Encrypt the wallet.
Definition: walletframe.cpp:214
WalletFrame::platformStyle
const PlatformStyle * platformStyle
Definition: walletframe.h:62
WalletFrame::changePassphrase
void changePassphrase()
Change encrypted wallet passphrase.
Definition: walletframe.cpp:228
WalletFrame::sizeHint
QSize sizeHint() const override
Definition: walletframe.h:48
WalletFrame::backupWallet
void backupWallet()
Backup the wallet.
Definition: walletframe.cpp:221
WalletFrame::bOutOfSync
bool bOutOfSync
Definition: walletframe.h:60
SendCoinsRecipient
Definition: sendcoinsrecipient.h:19
WalletFrame::setCurrentWallet
void setCurrentWallet(WalletModel *wallet_model)
Definition: walletframe.cpp:105
WalletFrame::~WalletFrame
~WalletFrame()
Definition: walletframe.cpp:56
WalletFrame::usedReceivingAddresses
void usedReceivingAddresses()
Show used receiving addresses.
Definition: walletframe.cpp:249
WalletFrame::currentWalletModel
WalletModel * currentWalletModel() const
Definition: walletframe.cpp:261
WalletFrame::gui
BitcoinGUI * gui
Definition: walletframe.h:56
WalletFrame::m_size_hint
const QSize m_size_hint
Definition: walletframe.h:64
WalletFrame::clientModel
ClientModel * clientModel
Definition: walletframe.h:57
WalletFrame::usedSendingAddresses
void usedSendingAddresses()
Show used sending addresses.
Definition: walletframe.cpp:242
WalletFrame::gotoSendCoinsPage
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
Definition: walletframe.cpp:185
WalletFrame::gotoLoadPSBT
void gotoLoadPSBT(bool from_clipboard=false)
Load Partially Signed Bitcoin Transaction.
Definition: walletframe.cpp:206
ClientModel
Model for Bitcoin network client.
Definition: clientmodel.h:46
WalletFrame::handlePaymentRequest
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
Definition: walletframe.cpp:147
WalletFrame::setClientModel
void setClientModel(ClientModel *clientModel)
Definition: walletframe.cpp:60
WalletFrame::gotoVerifyMessageTab
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
Definition: walletframe.cpp:199
WalletFrame::gotoOverviewPage
void gotoOverviewPage()
Switch to overview (home) page.
Definition: walletframe.cpp:164
WalletFrame::walletStack
QStackedWidget * walletStack
Definition: walletframe.h:55
WalletFrame::removeAllWallets
void removeAllWallets()
Definition: walletframe.cpp:139
WalletFrame::showOutOfSyncWarning
void showOutOfSyncWarning(bool fShow)
Definition: walletframe.cpp:156
PlatformStyle
Definition: platformstyle.h:13
BitcoinGUI
Bitcoin GUI main class.
Definition: bitcoingui.h:67
WalletFrame::gotoHistoryPage
void gotoHistoryPage()
Switch to history (transactions) page.
Definition: walletframe.cpp:171
WalletFrame::mapWalletViews
QMap< WalletModel *, WalletView * > mapWalletViews
Definition: walletframe.h:58
WalletFrame::removeWallet
void removeWallet(WalletModel *wallet_model)
Definition: walletframe.cpp:130