Bitcoin ABC  0.26.3
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
Bitcoin GUI main class.
Definition: bitcoingui.h:68
Model for Bitcoin network client.
Definition: clientmodel.h:39
A container for embedding all wallet-related controls into BitcoinGUI.
Definition: walletframe.h:29
void removeAllWallets()
bool addWallet(WalletModel *walletModel)
Definition: walletframe.cpp:74
void changePassphrase()
Change encrypted wallet passphrase.
void requestedSyncWarningInfo()
Notify that the user has requested more information about the out-of-sync warning.
WalletModel * currentWalletModel() const
void gotoHistoryPage()
Switch to history (transactions) page.
void unlockWallet()
Ask for passphrase to unlock wallet temporarily.
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
WalletView * currentWalletView() const
void gotoOverviewPage()
Switch to overview (home) page.
QMap< WalletModel *, WalletView * > mapWalletViews
Definition: walletframe.h:59
ClientModel * clientModel
Definition: walletframe.h:58
const PlatformStyle * platformStyle
Definition: walletframe.h:63
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
void removeWallet(WalletModel *wallet_model)
void setClientModel(ClientModel *clientModel)
Definition: walletframe.cpp:65
bool bOutOfSync
Definition: walletframe.h:61
void backupWallet()
Backup the wallet.
QStackedWidget * walletStack
Definition: walletframe.h:56
void usedSendingAddresses()
Show used sending addresses.
void encryptWallet()
Encrypt the wallet.
QSize sizeHint() const override
Definition: walletframe.h:48
void gotoLoadPSBT()
Load Partially Signed Bitcoin Transaction.
void usedReceivingAddresses()
Show used receiving addresses.
void outOfSyncWarningClicked()
Pass on signal over requested out-of-sync-warning information.
const QSize m_size_hint
Definition: walletframe.h:65
void setCurrentWallet(WalletModel *wallet_model)
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
WalletFrame(const PlatformStyle *platformStyle, BitcoinGUI *_gui=nullptr)
Definition: walletframe.cpp:26
BitcoinGUI * gui
Definition: walletframe.h:57
void showOutOfSyncWarning(bool fShow)
void gotoReceiveCoinsPage()
Switch to receive coins page.
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:47
WalletView class.
Definition: walletview.h:34