]> Git Repo - VerusCoin.git/blob - src/qt/walletframe.cpp
Merge pull request #3008 from gavinandresen/CENTrule
[VerusCoin.git] / src / qt / walletframe.cpp
1 /*
2  * Qt4 bitcoin GUI.
3  *
4  * W.J. van der Laan 2011-2012
5  * The Bitcoin Developers 2011-2013
6  */
7 #include "walletframe.h"
8 #include "bitcoingui.h"
9 #include "walletstack.h"
10
11 #include <QHBoxLayout>
12 #include <QMessageBox>
13
14 WalletFrame::WalletFrame(BitcoinGUI *_gui) :
15     QFrame(_gui)
16 {
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);
24 }
25
26 WalletFrame::~WalletFrame()
27 {
28 }
29
30 void WalletFrame::setClientModel(ClientModel *clientModel)
31 {
32     if (clientModel)
33         walletStack->setClientModel(clientModel);
34 }
35
36 bool WalletFrame::addWallet(const QString& name, WalletModel *walletModel)
37 {
38     return walletStack->addWallet(name, walletModel);
39 }
40
41 bool WalletFrame::setCurrentWallet(const QString& name)
42 {
43     // TODO: Check if valid name
44     return walletStack->setCurrentWallet(name);
45 }
46
47 void WalletFrame::removeAllWallets()
48 {
49     walletStack->removeAllWallets();
50 }
51
52 bool WalletFrame::handlePaymentRequest(const SendCoinsRecipient &recipient)
53 {
54     return walletStack->handlePaymentRequest(recipient);
55 }
56
57 void WalletFrame::showOutOfSyncWarning(bool fShow)
58 {
59     if (!walletStack)
60         return;
61
62     walletStack->showOutOfSyncWarning(fShow);
63 }
64
65 void WalletFrame::gotoOverviewPage()
66 {
67     walletStack->gotoOverviewPage();
68 }
69
70 void WalletFrame::gotoHistoryPage()
71 {
72     walletStack->gotoHistoryPage();
73 }
74
75 void WalletFrame::gotoAddressBookPage()
76 {
77     walletStack->gotoAddressBookPage();
78 }
79
80 void WalletFrame::gotoReceiveCoinsPage()
81 {
82     walletStack->gotoReceiveCoinsPage();
83 }
84
85 void WalletFrame::gotoSendCoinsPage(QString addr)
86 {
87     walletStack->gotoSendCoinsPage(addr);
88 }
89
90 void WalletFrame::gotoSignMessageTab(QString addr)
91 {
92     walletStack->gotoSignMessageTab(addr);
93 }
94
95 void WalletFrame::gotoVerifyMessageTab(QString addr)
96 {
97     walletStack->gotoSignMessageTab(addr);
98 }
99
100 void WalletFrame::encryptWallet(bool status)
101 {
102     walletStack->encryptWallet(status);
103 }
104
105 void WalletFrame::backupWallet()
106 {
107     walletStack->backupWallet();
108 }
109
110 void WalletFrame::changePassphrase()
111 {
112     walletStack->changePassphrase();
113 }
114
115 void WalletFrame::unlockWallet()
116 {
117     walletStack->unlockWallet();
118 }
119
120 void WalletFrame::setEncryptionStatus()
121 {
122     walletStack->setEncryptionStatus();
123 }
This page took 0.030562 seconds and 4 git commands to generate.