 |
Bitcoin Core
21.99.0
P2P Digital Currency
|
Go to the documentation of this file.
17 #include <QHBoxLayout>
19 #include <QPushButton>
20 #include <QVBoxLayout>
25 platformStyle(_platformStyle),
29 QHBoxLayout *walletFrameLayout =
new QHBoxLayout(
this);
30 setContentsMargins(0,0,0,0);
31 walletStack =
new QStackedWidget(
this);
32 walletFrameLayout->setContentsMargins(0,0,0,0);
33 walletFrameLayout->addWidget(walletStack);
36 QGroupBox* no_wallet_group =
new QGroupBox(walletStack);
37 QVBoxLayout* no_wallet_layout =
new QVBoxLayout(no_wallet_group);
39 QLabel *noWallet =
new QLabel(tr(
"No wallet has been loaded.\nGo to File > Open Wallet to load a wallet.\n- OR -"));
40 noWallet->setAlignment(Qt::AlignCenter);
41 no_wallet_layout->addWidget(noWallet, 0, Qt::AlignHCenter | Qt::AlignBottom);
44 QPushButton* create_wallet_button =
new QPushButton(tr(
"Create a new wallet"), walletStack);
45 connect(create_wallet_button, &QPushButton::clicked, [
this] {
50 no_wallet_layout->addWidget(create_wallet_button, 0, Qt::AlignHCenter | Qt::AlignTop);
51 no_wallet_group->setLayout(no_wallet_layout);
53 walletStack->addWidget(no_wallet_group);
65 i.value()->setClientModel(_clientModel);
82 if (current_wallet_view) {
83 walletView->setCurrentIndex(current_wallet_view->currentIndex());
94 connect(walletView, &
WalletView::message, [
this](
const QString& title,
const QString& message,
unsigned int style) {
111 if (view_about_to_hide) {
112 QSizePolicy sp = view_about_to_hide->sizePolicy();
113 sp.setHorizontalPolicy(QSizePolicy::Ignored);
114 view_about_to_hide->setSizePolicy(sp);
121 QSizePolicy sp = walletView->sizePolicy();
122 sp.setHorizontalPolicy(QSizePolicy::Preferred);
123 walletView->setSizePolicy(sp);
124 walletView->updateGeometry();
141 QMap<WalletModel*, WalletView*>::const_iterator i;
159 QMap<WalletModel*, WalletView*>::const_iterator i;
161 i.value()->showOutOfSyncWarning(fShow);
166 QMap<WalletModel*, WalletView*>::const_iterator i;
168 i.value()->gotoOverviewPage();
173 QMap<WalletModel*, WalletView*>::const_iterator i;
175 i.value()->gotoHistoryPage();
180 QMap<WalletModel*, WalletView*>::const_iterator i;
182 i.value()->gotoReceiveCoinsPage();
187 QMap<WalletModel*, WalletView*>::const_iterator i;
189 i.value()->gotoSendCoinsPage(addr);
258 return qobject_cast<WalletView*>(
walletStack->currentWidget());
WalletView * currentWalletView() const
void gotoReceiveCoinsPage()
Switch to receive coins page.
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
void unlockWallet()
Ask for passphrase to unlock wallet temporarily.
void requestedSyncWarningInfo()
Notify that the user has requested more information about the out-of-sync warning.
Interface to Bitcoin wallet from Qt view code.
void showOutOfSyncWarning(bool fShow)
bool addWallet(WalletModel *walletModel)
WalletFrame(const PlatformStyle *platformStyle, BitcoinGUI *_gui=nullptr)
void outOfSyncWarningClicked()
Pass on signal over requested out-of-sync-warning information.
Overview ("home") page widget.
void encryptWallet()
Encrypt the wallet.
const PlatformStyle * platformStyle
void setPrivacy(bool privacy)
void changePassphrase()
Change encrypted wallet passphrase.
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
void message(const QString &title, QString message, unsigned int style, bool *ret=nullptr, const QString &detailed_message=QString())
Notify the user of an event from the core network or transaction handling code.
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
void encryptWallet()
Encrypt the wallet.
void incomingTransaction(const QString &date, int unit, const CAmount &amount, const QString &type, const QString &address, const QString &label, const QString &walletName)
Notify that a new transaction appeared.
void backupWallet()
Backup the wallet.
bool isPrivacyModeActivated() const
void hdEnabledStatusChanged()
HD-Enabled status of wallet changed (only possible during startup)
void setPrivacy(bool privacy)
WalletModel * getWalletModel()
void setClientModel(ClientModel *clientModel)
Set the client model.
void setCurrentWallet(WalletModel *wallet_model)
void usedReceivingAddresses()
Show used receiving addresses.
void updateEncryptionStatus()
Re-emit encryption status signal.
void message(const QString &title, const QString &message, unsigned int style)
Fired when a message should be reported to the user.
WalletModel * currentWalletModel() const
void encryptionStatusChanged()
Encryption status of wallet changed.
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
ClientModel * clientModel
void usedSendingAddresses()
Show used sending addresses.
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
void gotoLoadPSBT(bool from_clipboard=false)
Load Partially Signed Bitcoin Transaction.
Model for Bitcoin network client.
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
void outOfSyncWarningClicked()
Notify that the out of sync warning icon has been pressed.
void setClientModel(ClientModel *clientModel)
void gotoOverviewPage()
Switch to overview (home) page.
void setWalletModel(WalletModel *walletModel)
Set the wallet model.
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
void changePassphrase()
Change encrypted wallet passphrase.
void gotoOverviewPage()
Switch to overview (home) page.
QStackedWidget * walletStack
void unlockWallet()
Ask for passphrase to unlock wallet temporarily.
void gotoLoadPSBT(bool from_clipboard=false)
Load Partially Signed Bitcoin Transaction.
void backupWallet()
Backup the wallet.
void usedSendingAddresses()
Show used sending addresses.
void usedReceivingAddresses()
Show used receiving addresses.
void showOutOfSyncWarning(bool fShow)
void transactionClicked()
void gotoHistoryPage()
Switch to history (transactions) page.
QMap< WalletModel *, WalletView * > mapWalletViews
assert(std::addressof(::ChainstateActive().CoinsTip())==std::addressof(coins_cache))
void removeWallet(WalletModel *wallet_model)