Bitcoin Core  22.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 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 addView(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  void message(const QString& title, const QString& message, unsigned int style);
52  void currentWalletSet();
53 
54 private:
55  QStackedWidget *walletStack;
57  QMap<WalletModel*, WalletView*> mapWalletViews;
58 
59  bool bOutOfSync;
60 
62 
63  const QSize m_size_hint;
64 
65 public:
68 
69 public Q_SLOTS:
71  void gotoOverviewPage();
73  void gotoHistoryPage();
75  void gotoReceiveCoinsPage();
77  void gotoSendCoinsPage(QString addr = "");
78 
80  void gotoSignMessageTab(QString addr = "");
82  void gotoVerifyMessageTab(QString addr = "");
83 
85  void gotoLoadPSBT(bool from_clipboard = false);
86 
88  void encryptWallet();
90  void backupWallet();
92  void changePassphrase();
94  void unlockWallet();
95 
97  void usedSendingAddresses();
100 };
101 
102 #endif // BITCOIN_QT_WALLETFRAME_H
WalletFrame
A container for embedding all wallet-related controls into BitcoinGUI.
Definition: walletframe.h:28
WalletFrame::currentWalletView
WalletView * currentWalletView() const
Definition: walletframe.cpp:272
WalletFrame::createWalletButtonClicked
void createWalletButtonClicked()
WalletFrame::gotoReceiveCoinsPage
void gotoReceiveCoinsPage()
Switch to receive coins page.
Definition: walletframe.cpp:164
WalletFrame::gotoSignMessageTab
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
Definition: walletframe.cpp:178
WalletFrame::unlockWallet
void unlockWallet()
Ask for passphrase to unlock wallet temporarily.
Definition: walletframe.cpp:251
WalletView
Definition: walletview.h:33
WalletModel
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:51
WalletFrame::encryptWallet
void encryptWallet()
Encrypt the wallet.
Definition: walletframe.cpp:230
WalletFrame::platformStyle
const PlatformStyle * platformStyle
Definition: walletframe.h:61
WalletFrame::currentWalletSet
void currentWalletSet()
WalletFrame::changePassphrase
void changePassphrase()
Change encrypted wallet passphrase.
Definition: walletframe.cpp:244
WalletFrame::WalletFrame
WalletFrame(const PlatformStyle *platformStyle, QWidget *parent)
Definition: walletframe.cpp:26
WalletFrame::message
void message(const QString &title, const QString &message, unsigned int style)
WalletFrame::sizeHint
QSize sizeHint() const override
Definition: walletframe.h:47
WalletFrame::backupWallet
void backupWallet()
Backup the wallet.
Definition: walletframe.cpp:237
WalletFrame::bOutOfSync
bool bOutOfSync
Definition: walletframe.h:59
SendCoinsRecipient
Definition: sendcoinsrecipient.h:19
WalletFrame::addView
bool addView(WalletView *walletView)
Definition: walletframe.cpp:68
WalletFrame::setCurrentWallet
void setCurrentWallet(WalletModel *wallet_model)
Definition: walletframe.cpp:90
WalletFrame::~WalletFrame
~WalletFrame()
Definition: walletframe.cpp:55
WalletFrame::usedReceivingAddresses
void usedReceivingAddresses()
Show used receiving addresses.
Definition: walletframe.cpp:265
WalletFrame::currentWalletModel
WalletModel * currentWalletModel() const
Definition: walletframe.cpp:277
WalletFrame::m_size_hint
const QSize m_size_hint
Definition: walletframe.h:63
WalletFrame::clientModel
ClientModel * clientModel
Definition: walletframe.h:56
WalletFrame::usedSendingAddresses
void usedSendingAddresses()
Show used sending addresses.
Definition: walletframe.cpp:258
WalletFrame::gotoSendCoinsPage
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
Definition: walletframe.cpp:171
WalletFrame::gotoLoadPSBT
void gotoLoadPSBT(bool from_clipboard=false)
Load Partially Signed Bitcoin Transaction.
Definition: walletframe.cpp:192
ClientModel
Model for Bitcoin network client.
Definition: clientmodel.h:47
WalletFrame::handlePaymentRequest
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
Definition: walletframe.cpp:133
WalletFrame::setClientModel
void setClientModel(ClientModel *clientModel)
Definition: walletframe.cpp:59
WalletFrame::gotoVerifyMessageTab
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
Definition: walletframe.cpp:185
WalletFrame::gotoOverviewPage
void gotoOverviewPage()
Switch to overview (home) page.
Definition: walletframe.cpp:150
WalletFrame::walletStack
QStackedWidget * walletStack
Definition: walletframe.h:55
WalletFrame::removeAllWallets
void removeAllWallets()
Definition: walletframe.cpp:125
WalletFrame::showOutOfSyncWarning
void showOutOfSyncWarning(bool fShow)
Definition: walletframe.cpp:142
PlatformStyle
Definition: platformstyle.h:13
WalletFrame::gotoHistoryPage
void gotoHistoryPage()
Switch to history (transactions) page.
Definition: walletframe.cpp:157
WalletFrame::mapWalletViews
QMap< WalletModel *, WalletView * > mapWalletViews
Definition: walletframe.h:57
WalletFrame::removeWallet
void removeWallet(WalletModel *wallet_model)
Definition: walletframe.cpp:116