4 * W.J. van der Laan 2011-2012
5 * The Bitcoin Developers 2011-2013
7 #include "walletframe.h"
8 #include "bitcoingui.h"
9 #include "walletstack.h"
11 #include <QHBoxLayout>
12 #include <QMessageBox>
14 WalletFrame::WalletFrame(BitcoinGUI *_gui) :
17 // Leave HBox hook for adding a list view later
18 QHBoxLayout *walletFrameLayout = new QHBoxLayout(this);
19 setContentsMargins(0,0,0,0);
20 walletStack = new WalletStack(this);
21 walletStack->setBitcoinGUI(_gui);
22 walletFrameLayout->setContentsMargins(0,0,0,0);
23 walletFrameLayout->addWidget(walletStack);
26 WalletFrame::~WalletFrame()
30 void WalletFrame::setClientModel(ClientModel *clientModel)
33 walletStack->setClientModel(clientModel);
36 bool WalletFrame::addWallet(const QString& name, WalletModel *walletModel)
38 return walletStack->addWallet(name, walletModel);
41 bool WalletFrame::setCurrentWallet(const QString& name)
43 // TODO: Check if valid name
44 return walletStack->setCurrentWallet(name);
47 void WalletFrame::removeAllWallets()
49 walletStack->removeAllWallets();
52 bool WalletFrame::handlePaymentRequest(const SendCoinsRecipient &recipient)
54 return walletStack->handlePaymentRequest(recipient);
57 void WalletFrame::showOutOfSyncWarning(bool fShow)
62 walletStack->showOutOfSyncWarning(fShow);
65 void WalletFrame::gotoOverviewPage()
67 walletStack->gotoOverviewPage();
70 void WalletFrame::gotoHistoryPage()
72 walletStack->gotoHistoryPage();
75 void WalletFrame::gotoAddressBookPage()
77 walletStack->gotoAddressBookPage();
80 void WalletFrame::gotoReceiveCoinsPage()
82 walletStack->gotoReceiveCoinsPage();
85 void WalletFrame::gotoSendCoinsPage(QString addr)
87 walletStack->gotoSendCoinsPage(addr);
90 void WalletFrame::gotoSignMessageTab(QString addr)
92 walletStack->gotoSignMessageTab(addr);
95 void WalletFrame::gotoVerifyMessageTab(QString addr)
97 walletStack->gotoSignMessageTab(addr);
100 void WalletFrame::encryptWallet(bool status)
102 walletStack->encryptWallet(status);
105 void WalletFrame::backupWallet()
107 walletStack->backupWallet();
110 void WalletFrame::changePassphrase()
112 walletStack->changePassphrase();
115 void WalletFrame::unlockWallet()
117 walletStack->unlockWallet();
120 void WalletFrame::setEncryptionStatus()
122 walletStack->setEncryptionStatus();