27 : QFrame(_gui), gui(_gui), platformStyle(_platformStyle),
28 m_size_hint(
OverviewPage{platformStyle, nullptr}.sizeHint()) {
30 QHBoxLayout *walletFrameLayout =
new QHBoxLayout(
this);
31 setContentsMargins(0, 0, 0, 0);
33 walletFrameLayout->setContentsMargins(0, 0, 0, 0);
37 QGroupBox *no_wallet_group =
new QGroupBox(
walletStack);
38 QVBoxLayout *no_wallet_layout =
new QVBoxLayout(no_wallet_group);
40 QLabel *noWallet =
new QLabel(tr(
"No wallet has been loaded.\nGo to File > "
41 "Open Wallet to load a wallet.\n- OR -"));
42 noWallet->setAlignment(Qt::AlignCenter);
43 no_wallet_layout->addWidget(noWallet, 0,
44 Qt::AlignHCenter | Qt::AlignBottom);
47 QPushButton *create_wallet_button =
48 new QPushButton(tr(
"Create a new wallet"),
walletStack);
49 connect(create_wallet_button, &QPushButton::clicked, [
this] {
53 &QObject::deleteLater);
56 no_wallet_layout->addWidget(create_wallet_button, 0,
57 Qt::AlignHCenter | Qt::AlignTop);
58 no_wallet_group->setLayout(no_wallet_layout);
70 i.value()->setClientModel(_clientModel);
89 if (current_wallet_view) {
90 walletView->setCurrentIndex(current_wallet_view->currentIndex());
101 &BitcoinGUI::gotoHistoryPage);
103 &BitcoinGUI::gotoHistoryPage);
106 [
this](
const QString &title,
const QString &message,
107 unsigned int style) {
gui->
message(title, message, style); });
109 &BitcoinGUI::updateWalletStatus);
111 &BitcoinGUI::incomingTransaction);
113 &BitcoinGUI::updateWalletStatus);
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);
257 return qobject_cast<WalletView *>(
walletStack->currentWidget());
void setPrivacy(bool privacy)
bool isPrivacyModeActivated() const
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.
Model for Bitcoin network client.
Overview ("home") page widget.
bool addWallet(WalletModel *walletModel)
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
ClientModel * clientModel
const PlatformStyle * platformStyle
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
void removeWallet(WalletModel *wallet_model)
void setClientModel(ClientModel *clientModel)
void backupWallet()
Backup the wallet.
QStackedWidget * walletStack
void usedSendingAddresses()
Show used sending addresses.
void encryptWallet()
Encrypt the wallet.
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.
void setCurrentWallet(WalletModel *wallet_model)
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
WalletFrame(const PlatformStyle *platformStyle, BitcoinGUI *_gui=nullptr)
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.
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
void incomingTransaction(const QString &date, int unit, const Amount amount, const QString &type, const QString &address, const QString &label, const QString &walletName)
Notify that a new transaction appeared.
void changePassphrase()
Change encrypted wallet passphrase.
void setClientModel(ClientModel *clientModel)
Set the client model.
void outOfSyncWarningClicked()
Notify that the out of sync warning icon has been pressed.
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
void usedSendingAddresses()
Show used sending addresses.
void encryptWallet()
Encrypt the wallet.
void message(const QString &title, const QString &message, unsigned int style)
Fired when a message should be reported to the user.
void backupWallet()
Backup the wallet.
void gotoLoadPSBT()
Load Partially Signed Bitcoin Transaction.
void unlockWallet()
Ask for passphrase to unlock wallet temporarily.
void gotoOverviewPage()
Switch to overview (home) page.
void usedReceivingAddresses()
Show used receiving addresses.
void transactionClicked()
WalletModel * getWalletModel()
void updateEncryptionStatus()
Re-emit encryption status signal.
void hdEnabledStatusChanged()
HD-Enabled status of wallet changed (only possible during startup)
void setPrivacy(bool privacy)
void showOutOfSyncWarning(bool fShow)
void encryptionStatusChanged()
Encryption status of wallet changed.