14 #include <QHBoxLayout> 16 #include <QPushButton> 17 #include <QVBoxLayout> 21 platformStyle(_platformStyle),
25 QHBoxLayout *walletFrameLayout =
new QHBoxLayout(
this);
26 setContentsMargins(0,0,0,0);
27 walletStack =
new QStackedWidget(
this);
28 walletFrameLayout->setContentsMargins(0,0,0,0);
29 walletFrameLayout->addWidget(walletStack);
32 QGroupBox* no_wallet_group =
new QGroupBox(walletStack);
33 QVBoxLayout* no_wallet_layout =
new QVBoxLayout(no_wallet_group);
35 QLabel *noWallet =
new QLabel(tr(
"No wallet has been loaded.\nGo to File > Open Wallet to load a wallet.\n- OR -"));
36 noWallet->setAlignment(Qt::AlignCenter);
37 no_wallet_layout->addWidget(noWallet, 0, Qt::AlignHCenter | Qt::AlignBottom);
40 QPushButton* create_wallet_button =
new QPushButton(tr(
"Create a new wallet"), walletStack);
42 no_wallet_layout->addWidget(create_wallet_button, 0, Qt::AlignHCenter | Qt::AlignTop);
43 no_wallet_group->setLayout(no_wallet_layout);
45 walletStack->addWidget(no_wallet_group);
57 i.value()->setClientModel(_clientModel);
72 if (current_wallet_view) {
73 walletView->setCurrentIndex(current_wallet_view->currentIndex());
90 if (view_about_to_hide) {
91 QSizePolicy sp = view_about_to_hide->sizePolicy();
92 sp.setHorizontalPolicy(QSizePolicy::Ignored);
93 view_about_to_hide->setSizePolicy(sp);
100 QSizePolicy sp = walletView->sizePolicy();
101 sp.setHorizontalPolicy(QSizePolicy::Preferred);
102 walletView->setSizePolicy(sp);
103 walletView->updateGeometry();
120 QMap<WalletModel*, WalletView*>::const_iterator i;
138 QMap<WalletModel*, WalletView*>::const_iterator i;
140 i.value()->showOutOfSyncWarning(fShow);
145 QMap<WalletModel*, WalletView*>::const_iterator i;
147 i.value()->gotoOverviewPage();
152 QMap<WalletModel*, WalletView*>::const_iterator i;
154 i.value()->gotoHistoryPage();
159 QMap<WalletModel*, WalletView*>::const_iterator i;
161 i.value()->gotoReceiveCoinsPage();
166 QMap<WalletModel*, WalletView*>::const_iterator i;
168 i.value()->gotoSendCoinsPage(addr);
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
WalletModel * currentWalletModel() const
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
void createWalletButtonClicked()
void usedSendingAddresses()
Show used sending addresses.
ClientModel * clientModel
void changePassphrase()
Change encrypted wallet passphrase.
void setCurrentWallet(WalletModel *wallet_model)
QMap< WalletModel *, WalletView * > mapWalletViews
void usedReceivingAddresses()
Show used receiving addresses.
QStackedWidget * walletStack
void updateEncryptionStatus()
Re-emit encryption status signal.
WalletFrame(const PlatformStyle *platformStyle, QWidget *parent)
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.
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
WalletView * currentWalletView() const
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 gotoOverviewPage()
Switch to overview (home) page.
const PlatformStyle * platformStyle
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
void encryptWallet()
Encrypt the wallet.
void gotoReceiveCoinsPage()
Switch to receive coins page.
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
Interface to Bitcoin wallet from Qt view code.
void gotoLoadPSBT(bool from_clipboard=false)
Load Partially Signed Bitcoin Transaction.
void setClientModel(ClientModel *clientModel)
Set the client model.
bool addWallet(WalletModel *walletModel, WalletView *walletView)
void encryptWallet()
Encrypt the wallet.
void backupWallet()
Backup the wallet.
void removeWallet(WalletModel *wallet_model)
void gotoLoadPSBT(bool from_clipboard=false)
Load Partially Signed Bitcoin Transaction.
Overview ("home") page widget.
void usedSendingAddresses()
Show used sending addresses.
void showOutOfSyncWarning(bool fShow)