PIVX Core  5.6.99
P2P Digital Currency
guiinterfaceutil.h
Go to the documentation of this file.
1 // Copyright (c) 2020-2021 The PIVX Core developers
2 // Distributed under the MIT/X11 software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef PIVX_GUIINTERFACEUTIL_H
6 #define PIVX_GUIINTERFACEUTIL_H
7 
8 #include "guiinterface.h"
9 #include "tinyformat.h"
10 #include "util/system.h"
11 
12 inline static bool UIError(const std::string &str)
13 {
15  return false;
16 }
17 
18 inline static bool UIWarning(const std::string &str)
19 {
21  return true;
22 }
23 
24 inline static std::string AmountErrMsg(const char * const optname, const std::string& strValue)
25 {
26  return strprintf(_("Invalid amount for -%s=<amount>: '%s'"), optname, strValue);
27 }
28 
29 #endif // PIVX_GUIINTERFACEUTIL_H
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
CClientUIInterface uiInterface
Definition: init.cpp:109
std::string _(const char *psz)
Translation function: Call Translate signal on UI interface, which returns a Optional result.
Definition: system.h:65
#define strprintf
Definition: tinyformat.h:1056