PIVX Core  5.6.99
P2P Digital Currency
guiinterface.h
Go to the documentation of this file.
1 // Copyright (c) 2010 Satoshi Nakamoto
2 // Copyright (c) 2012-2014 The Bitcoin developers
3 // Copyright (c) 2017-2021 The PIVX Core developers
4 // Distributed under the MIT/X11 software license, see the accompanying
5 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
6 
7 #ifndef PIVX_GUIINTERFACE_H
8 #define PIVX_GUIINTERFACE_H
9 
10 #include <stdint.h>
11 #include <string>
12 #include "optional.h"
13 
14 #include <boost/signals2/last_value.hpp>
15 #include <boost/signals2/signal.hpp>
16 
17 class CBasicKeyStore;
18 class CWallet;
19 class uint256;
20 class CBlockIndex;
22 
24 enum ChangeType {
28 };
29 
32 {
33 public:
37  ICON_WARNING = (1U << 0),
38  ICON_ERROR = (1U << 1),
44 
46  BTN_OK = 0x00000400U, // QMessageBox::Ok
47  BTN_YES = 0x00004000U, // QMessageBox::Yes
48  BTN_NO = 0x00010000U, // QMessageBox::No
49  BTN_ABORT = 0x00040000U, // QMessageBox::Abort
50  BTN_RETRY = 0x00080000U, // QMessageBox::Retry
51  BTN_IGNORE = 0x00100000U, // QMessageBox::Ignore
52  BTN_CLOSE = 0x00200000U, // QMessageBox::Close
53  BTN_CANCEL = 0x00400000U, // QMessageBox::Cancel
54  BTN_DISCARD = 0x00800000U, // QMessageBox::Discard
55  BTN_HELP = 0x01000000U, // QMessageBox::Help
56  BTN_APPLY = 0x02000000U, // QMessageBox::Apply
57  BTN_RESET = 0x04000000U, // QMessageBox::Reset
63  BTN_CLOSE |
64  BTN_CANCEL |
65  BTN_DISCARD |
66  BTN_HELP |
67  BTN_APPLY |
69 
71  MODAL = 0x10000000U,
72 
74  SECURE = 0x40000000U,
75 
80  MSG_INFORMATION_SNACK = 1U << 2
81  };
82 
84  boost::signals2::signal<bool(const std::string& message, const std::string& caption, unsigned int style), boost::signals2::last_value<bool> > ThreadSafeMessageBox;
85 
87  boost::signals2::signal<void(const std::string& message)> InitMessage;
88 
90  boost::signals2::signal<void(int newNumConnections)> NotifyNumConnectionsChanged;
91 
93  boost::signals2::signal<void (bool networkActive)> NotifyNetworkActiveChanged;
94 
96  boost::signals2::signal<void()> NotifyAlertChanged;
97 
99  boost::signals2::signal<void(CWallet* wallet)> LoadWallet;
100 
102  boost::signals2::signal<void(const std::string& title, int nProgress)> ShowProgress;
103 
105  boost::signals2::signal<void(bool fInitialDownload, const CBlockIndex* newTip)> NotifyBlockTip;
106 
108  boost::signals2::signal<void (void)> BannedListChanged;
109 
111  boost::signals2::signal<void (const CDeterministicMNList&)> NotifyMasternodeListChanged;
112 };
113 
115 
116 #endif // PIVX_GUIINTERFACE_H
Basic key store, that keeps keys in an address->secret map.
Definition: keystore.h:99
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: chain.h:139
Signals for UI communication.
Definition: guiinterface.h:32
boost::signals2::signal< void(const std::string &title, int nProgress)> ShowProgress
Show progress e.g.
Definition: guiinterface.h:102
MessageBoxFlags
Flags for CClientUIInterface::ThreadSafeMessageBox.
Definition: guiinterface.h:35
@ ICON_MASK
Mask of all available icons in CClientUIInterface::MessageBoxFlags This needs to be updated,...
Definition: guiinterface.h:43
@ BTN_MASK
Mask of all available buttons in CClientUIInterface::MessageBoxFlags This needs to be updated,...
Definition: guiinterface.h:62
@ BTN_OK
These values are taken from qmessagebox.h "enum StandardButton" to be directly usable.
Definition: guiinterface.h:46
@ MSG_INFORMATION
Predefined combinations for certain default usage cases.
Definition: guiinterface.h:77
@ MODAL
Force blocking, modal message box dialog (not just OS notification)
Definition: guiinterface.h:71
@ SECURE
Do not print contents of message to debug log.
Definition: guiinterface.h:74
boost::signals2::signal< void(const std::string &message)> InitMessage
Progress message during initialization.
Definition: guiinterface.h:87
boost::signals2::signal< void(int newNumConnections)> NotifyNumConnectionsChanged
Number of network connections changed.
Definition: guiinterface.h:90
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: guiinterface.h:84
boost::signals2::signal< void()> NotifyAlertChanged
New, updated or cancelled alert.
Definition: guiinterface.h:96
boost::signals2::signal< void(const CDeterministicMNList &)> NotifyMasternodeListChanged
Deterministic Masternode list has changed.
Definition: guiinterface.h:111
boost::signals2::signal< void(void)> BannedListChanged
Banlist did change.
Definition: guiinterface.h:108
boost::signals2::signal< void(CWallet *wallet)> LoadWallet
A wallet has been loaded.
Definition: guiinterface.h:99
boost::signals2::signal< void(bool fInitialDownload, const CBlockIndex *newTip)> NotifyBlockTip
New block has been accepted.
Definition: guiinterface.h:105
boost::signals2::signal< void(bool networkActive)> NotifyNetworkActiveChanged
Network activity state changed.
Definition: guiinterface.h:93
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,...
Definition: wallet.h:577
256-bit opaque blob.
Definition: uint256.h:138
ChangeType
General change type (added, updated, removed).
Definition: guiinterface.h:24
@ CT_UPDATED
Definition: guiinterface.h:26
@ CT_DELETED
Definition: guiinterface.h:27
@ CT_NEW
Definition: guiinterface.h:25
CClientUIInterface uiInterface
Definition: init.cpp:109