Feathercoin  0.5.0
P2P Digital Currency
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
walletstack.h
Go to the documentation of this file.
1 /*
2  * Qt4 bitcoin GUI.
3  *
4  * W.J. van der Laan 2011-2012
5  * The Bitcoin Developers 2011-2013
6  */
7 #ifndef WALLETSTACK_H
8 #define WALLETSTACK_H
9 
10 #include <QStackedWidget>
11 #include <QMap>
12 #include <boost/shared_ptr.hpp>
13 
14 class BitcoinGUI;
16 class ClientModel;
17 class WalletModel;
18 class WalletView;
19 class TransactionView;
20 class OverviewPage;
21 class AddressBookPage;
22 class SendCoinsDialog;
24 class Notificator;
25 class RPCConsole;
26 
27 class CWalletManager;
28 
29 QT_BEGIN_NAMESPACE
30 class QLabel;
31 class QModelIndex;
32 QT_END_NAMESPACE
33 
34 /*
35  WalletStack class. This class is a container for WalletView instances. It takes the place of centralWidget.
36  It was added to support multiple wallet functionality. It communicates with both the client and the
37  wallet models to give the user an up-to-date view of the current core state. It manages all the wallet views
38  it contains and updates them accordingly.
39  */
40 class WalletStack : public QStackedWidget
41 {
42  Q_OBJECT
43 
44 public:
45  explicit WalletStack(QWidget *parent = 0);
46  ~WalletStack();
47 
48  void setBitcoinGUI(BitcoinGUI *gui) { this->gui = gui; }
49 
50  void setClientModel(ClientModel *clientModel) { this->clientModel = clientModel; }
51 
52  bool addWallet(const QString& name, WalletModel *walletModel);
53  bool removeWallet(const QString& name);
54 
55  void removeAllWallets();
56 
57  bool handleURI(const QString &uri);
58 
59  void showOutOfSyncWarning(bool fShow);
60 
61 private:
64  QMap<QString, WalletView*> mapWalletViews;
65 
66  bool bOutOfSync;
67 
68 public slots:
69  void setCurrentWallet(const QString& name);
70 
72  void gotoOverviewPage();
74  void gotoHistoryPage();
76  void gotoAddressBookPage();
78  void gotoReceiveCoinsPage();
80  void gotoSendCoinsPage(QString addr = "");
81 
83  void gotoSignMessageTab(QString addr = "");
85  void gotoVerifyMessageTab(QString addr = "");
86 
88  void encryptWallet(bool status);
90  void backupWallet();
92  void changePassphrase();
94  void unlockWallet();
95 
100  void setEncryptionStatus();
101 };
102 
103 #endif // WALLETSTACK_H
bool handleURI(const QString &uri)
Definition: walletstack.cpp:62
void changePassphrase()
Change encrypted wallet passphrase.
Local Bitcoin RPC console.
Definition: rpcconsole.h:12
bool bOutOfSync
Definition: walletstack.h:66
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
void removeAllWallets()
Definition: walletstack.cpp:54
void backupWallet()
Backup the wallet.
void gotoOverviewPage()
Switch to overview (home) page.
Definition: walletstack.cpp:78
Bitcoin GUI main class.
Definition: bitcoingui.h:39
void unlockWallet()
Ask for passphrase to unlock wallet temporarily.
void gotoReceiveCoinsPage()
Switch to receive coins page.
Definition: walletstack.cpp:99
void setClientModel(ClientModel *clientModel)
Definition: walletstack.h:50
BitcoinGUI * gui
Definition: walletstack.h:62
void setBitcoinGUI(BitcoinGUI *gui)
Definition: walletstack.h:48
bool addWallet(const QString &name, WalletModel *walletModel)
Definition: walletstack.cpp:27
void showOutOfSyncWarning(bool fShow)
Definition: walletstack.cpp:70
void gotoAddressBookPage()
Switch to address book page.
Definition: walletstack.cpp:92
void gotoHistoryPage()
Switch to history (transactions) page.
Definition: walletstack.cpp:85
Widget showing the transaction list for a wallet, including a filter row.
bool removeWallet(const QString &name)
Definition: walletstack.cpp:46
Dialog for sending bitcoins.
ClientModel * clientModel
Definition: walletstack.h:63
Cross-platform desktop notification client.
Definition: notificator.h:15
Widget that shows a list of sending or receiving addresses.
UI model for the transaction table of a wallet.
Model for Bitcoin network client.
Definition: clientmodel.h:24
void encryptWallet(bool status)
Encrypt the wallet.
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:36
void setCurrentWallet(const QString &name)
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
void setEncryptionStatus()
Set the encryption status as shown in the UI.
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
Overview ("home") page widget.
Definition: overviewpage.h:19
QMap< QString, WalletView * > mapWalletViews
Definition: walletstack.h:64
const char * name
Definition: testharness.cc:18
WalletStack(QWidget *parent=0)
Definition: walletstack.cpp:14