17 #include <QHBoxLayout>
19 #include <QPushButton>
20 #include <QVBoxLayout>
25 platformStyle(_platformStyle),
26 m_size_hint(
OverviewPage{platformStyle, nullptr}.sizeHint())
29 QHBoxLayout *walletFrameLayout =
new QHBoxLayout(
this);
30 setContentsMargins(0,0,0,0);
32 walletFrameLayout->setContentsMargins(0,0,0,0);
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);
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) {
126 QMap<WalletModel*, WalletView*>::const_iterator i;
144 QMap<WalletModel*, WalletView*>::const_iterator i;
146 i.value()->showOutOfSyncWarning(fShow);
151 QMap<WalletModel*, WalletView*>::const_iterator i;
153 i.value()->gotoOverviewPage();
158 QMap<WalletModel*, WalletView*>::const_iterator i;
160 i.value()->gotoHistoryPage();
165 QMap<WalletModel*, WalletView*>::const_iterator i;
167 i.value()->gotoReceiveCoinsPage();
172 QMap<WalletModel*, WalletView*>::const_iterator i;
174 i.value()->gotoSendCoinsPage(addr);
243 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.
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(bool status)
Encrypt the wallet.
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)
QMap< WalletModel *, WalletView * > mapWalletViews
void gotoLoadPSBT(bool from_clipboard=false)
Load Partially Signed Bitcoin Transaction.
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.
void setWalletModel(WalletModel *walletModel)
Set the wallet model.
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
void encryptWallet(bool status)
Encrypt the wallet.
void changePassphrase()
Change encrypted wallet passphrase.
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 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 gotoLoadPSBT(bool from_clipboard=false)
Load Partially Signed Bitcoin Transaction.
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 unlockWallet()
Ask for passphrase to unlock wallet temporarily.
void gotoOverviewPage()
Switch to overview (home) page.
void usedReceivingAddresses()
Show used receiving addresses.
void transactionClicked()
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.
WalletModel * getWalletModel()