Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

ui_interface.h
Go to the documentation of this file.
1 // Copyright (c) 2010 Satoshi Nakamoto
2 // Copyright (c) 2012-2015 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 BITCOIN_UI_INTERFACE_H
7 #define BITCOIN_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;
18 
21 {
25 };
26 
29 {
30 public:
33  {
35  ICON_WARNING = (1U << 0),
36  ICON_ERROR = (1U << 1),
42 
44  BTN_OK = 0x00000400U, // QMessageBox::Ok
45  BTN_YES = 0x00004000U, // QMessageBox::Yes
46  BTN_NO = 0x00010000U, // QMessageBox::No
47  BTN_ABORT = 0x00040000U, // QMessageBox::Abort
48  BTN_RETRY = 0x00080000U, // QMessageBox::Retry
49  BTN_IGNORE = 0x00100000U, // QMessageBox::Ignore
50  BTN_CLOSE = 0x00200000U, // QMessageBox::Close
51  BTN_CANCEL = 0x00400000U, // QMessageBox::Cancel
52  BTN_DISCARD = 0x00800000U, // QMessageBox::Discard
53  BTN_HELP = 0x01000000U, // QMessageBox::Help
54  BTN_APPLY = 0x02000000U, // QMessageBox::Apply
55  BTN_RESET = 0x04000000U, // QMessageBox::Reset
62 
64  MODAL = 0x10000000U,
65 
67  SECURE = 0x40000000U,
68 
73  };
74 
76  boost::signals2::signal<bool (const std::string& message, const std::string& caption, unsigned int style), boost::signals2::last_value<bool> > ThreadSafeMessageBox;
77 
79  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;
80 
82  boost::signals2::signal<void (const std::string &message)> InitMessage;
83 
85  boost::signals2::signal<void (int newNumConnections)> NotifyNumConnectionsChanged;
86 
88  boost::signals2::signal<void (bool networkActive)> NotifyNetworkActiveChanged;
89 
93  boost::signals2::signal<void ()> NotifyAlertChanged;
94 
96  boost::signals2::signal<void (CWallet* wallet)> LoadWallet;
97 
102  boost::signals2::signal<void (const std::string &title, int nProgress, bool resume_possible)> ShowProgress;
103 
105  boost::signals2::signal<void (bool, const CBlockIndex *)> NotifyBlockTip;
106 
108  boost::signals2::signal<void (bool, const CBlockIndex *)> NotifyHeaderTip;
109 
111  boost::signals2::signal<void (const CDeterministicMNList&)> NotifyMasternodeListChanged;
112 
114  boost::signals2::signal<void (double nSyncProgress)> NotifyAdditionalDataSyncProgressChanged;
115 
117  boost::signals2::signal<void (void)> BannedListChanged;
118 };
119 
121 void InitWarning(const std::string& str);
122 
124 bool InitError(const std::string& str);
125 
126 std::string AmountHighWarn(const std::string& optname);
127 
128 std::string AmountErrMsg(const char* const optname, const std::string& strValue);
129 
131 
132 #endif // BITCOIN_UI_INTERFACE_H
CClientUIInterface uiInterface
Definition: ui_interface.cpp:8
MessageBoxFlags
Flags for CClientUIInterface::ThreadSafeMessageBox.
Definition: ui_interface.h:32
Do not print contents of message to debug log.
Definition: ui_interface.h:67
boost::signals2::signal< void(bool networkActive)> NotifyNetworkActiveChanged
Network activity state changed.
Definition: ui_interface.h:88
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:96
Mask of all available buttons in CClientUIInterface::MessageBoxFlags This needs to be updated...
Definition: ui_interface.h:60
Signals for UI communication.
Definition: ui_interface.h:28
boost::signals2::signal< void(double nSyncProgress)> NotifyAdditionalDataSyncProgressChanged
Additional data sync progress changed.
Definition: ui_interface.h:114
Force blocking, modal message box dialog (not just OS notification)
Definition: ui_interface.h:64
boost::signals2::signal< void(void)> BannedListChanged
Banlist did change.
Definition: ui_interface.h:117
boost::signals2::signal< void(bool, const CBlockIndex *)> NotifyBlockTip
New block has been accepted.
Definition: ui_interface.h:105
boost::signals2::signal< void(bool, const CBlockIndex *)> NotifyHeaderTip
Best header has changed.
Definition: ui_interface.h:108
void InitWarning(const std::string &str)
Show warning message.
ChangeType
General change type (added, updated, removed).
Definition: ui_interface.h:20
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:79
boost::signals2::signal< void(const CDeterministicMNList &)> NotifyMasternodeListChanged
Masternode list has changed.
Definition: ui_interface.h:111
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:85
std::string AmountHighWarn(const std::string &optname)
These values are taken from qmessagebox.h "enum StandardButton" to be directly usable.
Definition: ui_interface.h:44
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: chain.h:170
boost::signals2::signal< void()> NotifyAlertChanged
Status bar alerts changed.
Definition: ui_interface.h:93
Mask of all available icons in CClientUIInterface::MessageBoxFlags This needs to be updated...
Definition: ui_interface.h:41
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
Definition: wallet.h:715
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:76
boost::signals2::signal< void(const std::string &title, int nProgress, bool resume_possible)> ShowProgress
Show progress e.g.
Definition: ui_interface.h:102
boost::signals2::signal< void(const std::string &message)> InitMessage
Progress message during initialization.
Definition: ui_interface.h:82
Predefined combinations for certain default usage cases.
Definition: ui_interface.h:70
Released under the MIT license