Fabcoin Core  0.16.2
P2P Digital Currency
walletframe.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2017 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef FABCOIN_QT_WALLETFRAME_H
6 #define FABCOIN_QT_WALLETFRAME_H
7 
8 #include <QFrame>
9 #include <QMap>
10 
11 class FabcoinGUI;
12 class ClientModel;
13 class PlatformStyle;
14 class SendCoinsRecipient;
15 class WalletModel;
16 class WalletView;
17 
18 QT_BEGIN_NAMESPACE
19 class QStackedWidget;
20 QT_END_NAMESPACE
21 
29 class WalletFrame : public QFrame
30 {
31  Q_OBJECT
32 
33 public:
34  explicit WalletFrame(const PlatformStyle *platformStyle, FabcoinGUI *_gui = 0);
35  ~WalletFrame();
36 
38 
39  bool addWallet(const QString& name, WalletModel *walletModel);
40  bool setCurrentWallet(const QString& name);
41  bool removeWallet(const QString &name);
42  void removeAllWallets();
43 
44  bool handlePaymentRequest(const SendCoinsRecipient& recipient);
45 
46  void showOutOfSyncWarning(bool fShow);
47 
48 Q_SIGNALS:
51 
52 private:
53  QStackedWidget *walletStack;
56  QMap<QString, WalletView*> mapWalletViews;
57 
58  bool bOutOfSync;
59 
61 
63 
64 public Q_SLOTS:
66  void gotoOverviewPage();
68  void gotoHistoryPage();
70  void gotoReceiveCoinsPage();
72  void gotoSendCoinsPage(QString addr = "");
78  void gotoCallContractPage();
80  void gotoSendTokenPage();
82  void gotoReceiveTokenPage();
84  void gotoAddTokenPage();
85 
87  void gotoSignMessageTab(QString addr = "");
89  void gotoVerifyMessageTab(QString addr = "");
90 
92  void encryptWallet(bool status);
94  void backupWallet();
96  void restoreWallet();
98  void changePassphrase();
100  void unlockWallet();
102  void lockWallet();
103 
105  void usedSendingAddresses();
107  void usedReceivingAddresses();
110 
111  void pageChanged(int index);
112 };
113 
114 #endif // FABCOIN_QT_WALLETFRAME_H
void lockWallet()
Lock the wallet.
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
Definition: walletframe.cpp:98
bool setCurrentWallet(const QString &name)
Definition: walletframe.cpp:69
void gotoAddTokenPage()
Switch to Add Token page.
void restoreWallet()
Restore the wallet.
bool bOutOfSync
Definition: walletframe.h:58
WalletView * currentWalletView()
ClientModel * clientModel
Definition: walletframe.h:55
void gotoCreateContractPage()
Switch to create contract page.
void usedReceivingAddresses()
Show used receiving addresses.
QStackedWidget * walletStack
Definition: walletframe.h:53
Fabcoin GUI main class.
Definition: fabcoingui.h:51
void encryptWallet(bool status)
Encrypt the wallet.
void outOfSyncWarningClicked()
Pass on signal over requested out-of-sync-warning information.
QMap< QString, WalletView * > mapWalletViews
Definition: walletframe.h:56
void gotoSendTokenPage()
Switch to Send Token page.
void removeAllWallets()
Definition: walletframe.cpp:90
void gotoCallContractPage()
Switch to call contract page.
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:38
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
const char * name
Definition: rest.cpp:36
bool addWallet(const QString &name, WalletModel *walletModel)
Definition: walletframe.cpp:43
WalletFrame(const PlatformStyle *platformStyle, FabcoinGUI *_gui=0)
Definition: walletframe.cpp:17
void changePassphrase()
Change encrypted wallet passphrase.
Model for Fabcoin network client.
Definition: clientmodel.h:38
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 requestedSyncWarningInfo()
Notify that the user has requested more information about the out-of-sync warning.
void pageChanged(int index)
const PlatformStyle * platformStyle
Definition: walletframe.h:60
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
void gotoReceiveCoinsPage()
Switch to receive coins page.
Interface to Fabcoin wallet from Qt view code.
Definition: walletmodel.h:103
FabcoinGUI * gui
Definition: walletframe.h:54
bool removeWallet(const QString &name)
Definition: walletframe.cpp:80
void backupWallet()
Backup the wallet.
void gotoSendToContractPage()
Switch to send contract page.
A container for embedding all wallet-related controls into FabcoinGUI.
Definition: walletframe.h:29
void usedSendingAddresses()
Show used sending addresses.
void gotoReceiveTokenPage()
Switch to Receive Token page.