Anoncoin  0.9.4
P2P Digital Currency
walletframe.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2013 The Bitcoin developers
2 // Copyright (c) 2013-2014 The Anoncoin Core developers
3 // Distributed under the MIT/X11 software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef WALLETFRAME_H
7 #define WALLETFRAME_H
8 
9 #include <QFrame>
10 #include <QMap>
11 
12 class AnoncoinGUI;
13 class ClientModel;
14 class SendCoinsRecipient;
15 class WalletModel;
16 class WalletView;
17 
18 QT_BEGIN_NAMESPACE
19 class QStackedWidget;
20 QT_END_NAMESPACE
21 
22 class WalletFrame : public QFrame
23 {
24  Q_OBJECT
25 
26 public:
27  explicit WalletFrame(AnoncoinGUI *_gui = 0);
28  ~WalletFrame();
29 
31 
32  bool addWallet(const QString& name, WalletModel *walletModel);
33  bool setCurrentWallet(const QString& name);
34  bool removeWallet(const QString &name);
35  void removeAllWallets();
36 
37  bool handlePaymentRequest(const SendCoinsRecipient& recipient);
38 
39  void showOutOfSyncWarning(bool fShow);
40 
41 private:
42  QStackedWidget *walletStack;
45  QMap<QString, WalletView*> mapWalletViews;
46 
47  bool bOutOfSync;
48 
50 
51 public slots:
53  void gotoOverviewPage();
55  void gotoHistoryPage();
57  void gotoReceiveCoinsPage();
59  void gotoSendCoinsPage(QString addr = "");
60 
62  void gotoSignMessageTab(QString addr = "");
64  void gotoVerifyMessageTab(QString addr = "");
65 
67  void encryptWallet(bool status);
69  void backupWallet();
71  void changePassphrase();
73  void unlockWallet();
74 
76  void usedSendingAddresses();
79 };
80 
81 #endif // WALLETFRAME_H
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
Definition: walletframe.cpp:92
bool setCurrentWallet(const QString &name)
Definition: walletframe.cpp:63
bool bOutOfSync
Definition: walletframe.h:47
WalletView * currentWalletView()
ClientModel * clientModel
Definition: walletframe.h:44
void usedReceivingAddresses()
Show used receiving addresses.
QStackedWidget * walletStack
Definition: walletframe.h:42
Anoncoin GUI main class.
Definition: anoncoingui.h:47
void encryptWallet(bool status)
Encrypt the wallet.
QMap< QString, WalletView * > mapWalletViews
Definition: walletframe.h:45
void removeAllWallets()
Definition: walletframe.cpp:84
void showOutOfSyncWarning(bool fShow)
void gotoHistoryPage()
Switch to history (transactions) page.
void gotoOverviewPage()
Switch to overview (home) page.
void setClientModel(ClientModel *clientModel)
Definition: walletframe.cpp:36
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
bool addWallet(const QString &name, WalletModel *walletModel)
Definition: walletframe.cpp:41
AnoncoinGUI * gui
Definition: walletframe.h:43
void changePassphrase()
Change encrypted wallet passphrase.
Model for Anoncoin network client.
Definition: clientmodel.h:45
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 gotoSendCoinsPage(QString addr="")
Switch to send coins page.
void gotoReceiveCoinsPage()
Switch to receive coins page.
Interface to Anoncoin wallet from Qt view code.
Definition: walletmodel.h:97
bool removeWallet(const QString &name)
Definition: walletframe.cpp:74
void backupWallet()
Backup the wallet.
WalletFrame(AnoncoinGUI *_gui=0)
Definition: walletframe.cpp:16
void usedSendingAddresses()
Show used sending addresses.