Bitcoin Core  22.0.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 ClientModel;
12 class PlatformStyle;
13 class SendCoinsRecipient;
14 class WalletModel;
15 class WalletView;
16 
17 QT_BEGIN_NAMESPACE
18 class QStackedWidget;
19 QT_END_NAMESPACE
20 
28 class WalletFrame : public QFrame
29 {
30  Q_OBJECT
31 
32 public:
33  explicit WalletFrame(const PlatformStyle* platformStyle, QWidget* parent);
34  ~WalletFrame();
35 
37 
38  bool addWallet(WalletModel* walletModel, WalletView* walletView);
39  void setCurrentWallet(WalletModel* wallet_model);
40  void removeWallet(WalletModel* wallet_model);
41  void removeAllWallets();
42 
43  bool handlePaymentRequest(const SendCoinsRecipient& recipient);
44 
45  void showOutOfSyncWarning(bool fShow);
46 
47  QSize sizeHint() const override { return m_size_hint; }
48 
49 Q_SIGNALS:
51 
52 private:
53  QStackedWidget *walletStack;
55  QMap<WalletModel*, WalletView*> mapWalletViews;
56 
57  bool bOutOfSync;
58 
60 
61  const QSize m_size_hint;
62 
63 public:
66 
67 public Q_SLOTS:
69  void gotoOverviewPage();
71  void gotoHistoryPage();
73  void gotoReceiveCoinsPage();
75  void gotoSendCoinsPage(QString addr = "");
76 
78  void gotoSignMessageTab(QString addr = "");
80  void gotoVerifyMessageTab(QString addr = "");
81 
83  void gotoLoadPSBT(bool from_clipboard = false);
84 
86  void encryptWallet();
88  void backupWallet();
90  void changePassphrase();
92  void unlockWallet();
93 
95  void usedSendingAddresses();
98 };
99 
100 #endif // BITCOIN_QT_WALLETFRAME_H
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
WalletModel * currentWalletModel() const
void createWalletButtonClicked()
bool bOutOfSync
Definition: walletframe.h:57
ClientModel * clientModel
Definition: walletframe.h:54
void setCurrentWallet(WalletModel *wallet_model)
Definition: walletframe.cpp:84
QMap< WalletModel *, WalletView * > mapWalletViews
Definition: walletframe.h:55
void usedReceivingAddresses()
Show used receiving addresses.
QStackedWidget * walletStack
Definition: walletframe.h:53
QSize sizeHint() const override
Definition: walletframe.h:47
void removeAllWallets()
WalletFrame(const PlatformStyle *platformStyle, QWidget *parent)
Definition: walletframe.cpp:19
void showOutOfSyncWarning(bool fShow)
void gotoHistoryPage()
Switch to history (transactions) page.
void gotoOverviewPage()
Switch to overview (home) page.
void setClientModel(ClientModel *clientModel)
Definition: walletframe.cpp:52
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
WalletView * currentWalletView() const
void changePassphrase()
Change encrypted wallet passphrase.
Model for Bitcoin network client.
Definition: clientmodel.h:47
void unlockWallet()
Ask for passphrase to unlock wallet temporarily.
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
const PlatformStyle * platformStyle
Definition: walletframe.h:59
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
void encryptWallet()
Encrypt the wallet.
void gotoReceiveCoinsPage()
Switch to receive coins page.
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:51
bool addWallet(WalletModel *walletModel, WalletView *walletView)
Definition: walletframe.cpp:61
void backupWallet()
Backup the wallet.
void removeWallet(WalletModel *wallet_model)
void gotoLoadPSBT(bool from_clipboard=false)
Load Partially Signed Bitcoin Transaction.
const QSize m_size_hint
Definition: walletframe.h:61
A container for embedding all wallet-related controls into BitcoinGUI.
Definition: walletframe.h:28
void usedSendingAddresses()
Show used sending addresses.