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);
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
void usedSendingAddresses()
Show used sending addresses.
ClientModel * clientModel
void changePassphrase()
Change encrypted wallet passphrase.
void setCurrentWallet(WalletModel *wallet_model)
QMap< WalletModel *, WalletView * > mapWalletViews
void setPrivacy(bool privacy)
void usedReceivingAddresses()
Show used receiving addresses.
QStackedWidget * walletStack
WalletView * currentWalletView() const
void encryptWallet(bool status)
Encrypt the wallet.
void outOfSyncWarningClicked()
Notify that the out of sync warning icon has been pressed.
void outOfSyncWarningClicked()
Pass on signal over requested out-of-sync-warning information.
void updateEncryptionStatus()
Re-emit encryption status signal.
void showOutOfSyncWarning(bool fShow)
void gotoHistoryPage()
Switch to history (transactions) page.
WalletModel * getWalletModel()
void gotoOverviewPage()
Switch to overview (home) page.
void usedReceivingAddresses()
Show used receiving addresses.
void setClientModel(ClientModel *clientModel)
void setWalletModel(WalletModel *walletModel)
Set the wallet model.
WalletFrame(const PlatformStyle *platformStyle, BitcoinGUI *_gui=nullptr)
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
void message(const QString &title, const QString &message, unsigned int style)
Fired when a message should be reported to the user.
void unlockWallet()
Ask for passphrase to unlock wallet temporarily.
void changePassphrase()
Change encrypted wallet passphrase.
Model for Bitcoin network client.
void unlockWallet()
Ask for passphrase to unlock wallet temporarily.
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
void backupWallet()
Backup the wallet.
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 gotoOverviewPage()
Switch to overview (home) page.
void requestedSyncWarningInfo()
Notify that the user has requested more information about the out-of-sync warning.
void encryptionStatusChanged()
Encryption status of wallet changed.
const PlatformStyle * platformStyle
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
void gotoReceiveCoinsPage()
Switch to receive coins page.
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
void setPrivacy(bool privacy)
Interface to Bitcoin wallet from Qt view code.
bool isPrivacyModeActivated() const
void gotoLoadPSBT(bool from_clipboard=false)
Load Partially Signed Bitcoin Transaction.
void setClientModel(ClientModel *clientModel)
Set the client model.
bool addWallet(WalletModel *walletModel)
void hdEnabledStatusChanged()
HD-Enabled status of wallet changed (only possible during startup)
void backupWallet()
Backup the wallet.
void encryptWallet(bool status)
Encrypt the wallet.
void removeWallet(WalletModel *wallet_model)
void gotoLoadPSBT(bool from_clipboard=false)
Load Partially Signed Bitcoin Transaction.
WalletModel * currentWalletModel() const
void transactionClicked()
Overview ("home") page widget.
void usedSendingAddresses()
Show used sending addresses.
void showOutOfSyncWarning(bool fShow)
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.