Fabcoin Core  0.16.2
P2P Digital Currency
ui_interface.h
Go to the documentation of this file.
1 // Copyright (c) 2010 Satoshi Nakamoto
2 // Copyright (c) 2012-2017 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef FABCOIN_UI_INTERFACE_H
7 #define FABCOIN_UI_INTERFACE_H
8 
9 #include <stdint.h>
10 #include <string>
11 
12 #include <boost/signals2/last_value.hpp>
13 #include <boost/signals2/signal.hpp>
14 
15 class CWallet;
16 class CBlockIndex;
17 
20 {
24 };
25 
28 {
29 public:
32  {
34  ICON_WARNING = (1U << 0),
35  ICON_ERROR = (1U << 1),
41 
43  BTN_OK = 0x00000400U, // QMessageBox::Ok
44  BTN_YES = 0x00004000U, // QMessageBox::Yes
45  BTN_NO = 0x00010000U, // QMessageBox::No
46  BTN_ABORT = 0x00040000U, // QMessageBox::Abort
47  BTN_RETRY = 0x00080000U, // QMessageBox::Retry
48  BTN_IGNORE = 0x00100000U, // QMessageBox::Ignore
49  BTN_CLOSE = 0x00200000U, // QMessageBox::Close
50  BTN_CANCEL = 0x00400000U, // QMessageBox::Cancel
51  BTN_DISCARD = 0x00800000U, // QMessageBox::Discard
52  BTN_HELP = 0x01000000U, // QMessageBox::Help
53  BTN_APPLY = 0x02000000U, // QMessageBox::Apply
54  BTN_RESET = 0x04000000U, // QMessageBox::Reset
61 
63  MODAL = 0x10000000U,
64 
66  SECURE = 0x40000000U,
67 
72  };
73 
75  boost::signals2::signal<bool (const std::string& message, const std::string& caption, unsigned int style), boost::signals2::last_value<bool> > ThreadSafeMessageBox;
76 
78  boost::signals2::signal<bool (const std::string& message, const std::string& noninteractive_message, const std::string& caption, unsigned int style), boost::signals2::last_value<bool> > ThreadSafeQuestion;
79 
81  boost::signals2::signal<void (const std::string &message)> InitMessage;
82 
84  boost::signals2::signal<void (int newNumConnections)> NotifyNumConnectionsChanged;
85 
87  boost::signals2::signal<void (bool networkActive)> NotifyNetworkActiveChanged;
88 
92  boost::signals2::signal<void ()> NotifyAlertChanged;
93 
95  boost::signals2::signal<void (CWallet* wallet)> LoadWallet;
96 
98  boost::signals2::signal<void (const std::string &title, int nProgress)> ShowProgress;
99 
101  boost::signals2::signal<void (std::function<void(void)> action)> SetProgressBreakAction;
102 
104  boost::signals2::signal<void (bool, const CBlockIndex *)> NotifyBlockTip;
105 
107  boost::signals2::signal<void (bool, const CBlockIndex *)> NotifyHeaderTip;
108 
110  boost::signals2::signal<void (void)> BannedListChanged;
111 };
112 
114 void InitWarning(const std::string& str);
115 
117 bool InitError(const std::string& str);
118 
119 std::string AmountHighWarn(const std::string& optname);
120 
121 std::string AmountErrMsg(const char* const optname, const std::string& strValue);
122 
124 
125 #endif // FABCOIN_UI_INTERFACE_H
CClientUIInterface uiInterface
Definition: ui_interface.cpp:8
MessageBoxFlags
Flags for CClientUIInterface::ThreadSafeMessageBox.
Definition: ui_interface.h:31
Do not print contents of message to debug log.
Definition: ui_interface.h:66
boost::signals2::signal< void(bool networkActive)> NotifyNetworkActiveChanged
Network activity state changed.
Definition: ui_interface.h:87
bool InitError(const std::string &str)
Show error message.
boost::signals2::signal< void(CWallet *wallet)> LoadWallet
A wallet has been loaded.
Definition: ui_interface.h:95
Mask of all available buttons in CClientUIInterface::MessageBoxFlags This needs to be updated...
Definition: ui_interface.h:59
Signals for UI communication.
Definition: ui_interface.h:27
Force blocking, modal message box dialog (not just OS notification)
Definition: ui_interface.h:63
boost::signals2::signal< void(void)> BannedListChanged
Banlist did change.
Definition: ui_interface.h:110
boost::signals2::signal< void(bool, const CBlockIndex *)> NotifyBlockTip
New block has been accepted.
Definition: ui_interface.h:104
boost::signals2::signal< void(bool, const CBlockIndex *)> NotifyHeaderTip
Best header has changed.
Definition: ui_interface.h:107
void InitWarning(const std::string &str)
Show warning message.
ChangeType
General change type (added, updated, removed).
Definition: ui_interface.h:19
boost::signals2::signal< bool(const std::string &message, const std::string &noninteractive_message, const std::string &caption, unsigned int style), boost::signals2::last_value< bool > > ThreadSafeQuestion
If possible, ask the user a question.
Definition: ui_interface.h:78
boost::signals2::signal< void(const std::string &title, int nProgress)> ShowProgress
Show progress e.g.
Definition: ui_interface.h:98
std::string AmountErrMsg(const char *const optname, const std::string &strValue)
boost::signals2::signal< void(int newNumConnections)> NotifyNumConnectionsChanged
Number of network connections changed.
Definition: ui_interface.h:84
std::string AmountHighWarn(const std::string &optname)
These values are taken from qmessagebox.h "enum StandardButton" to be directly usable.
Definition: ui_interface.h:43
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: chain.h:177
boost::signals2::signal< void()> NotifyAlertChanged
Status bar alerts changed.
Definition: ui_interface.h:92
boost::signals2::signal< void(std::function< void(void)> action)> SetProgressBreakAction
Set progress break action (possible "cancel button" triggers that action)
Definition: ui_interface.h:101
Mask of all available icons in CClientUIInterface::MessageBoxFlags This needs to be updated...
Definition: ui_interface.h:40
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
Definition: wallet.h:672
boost::signals2::signal< bool(const std::string &message, const std::string &caption, unsigned int style), boost::signals2::last_value< bool > > ThreadSafeMessageBox
Show message box.
Definition: ui_interface.h:75
boost::signals2::signal< void(const std::string &message)> InitMessage
Progress message during initialization.
Definition: ui_interface.h:81
Predefined combinations for certain default usage cases.
Definition: ui_interface.h:69