PIVX Core
5.6.99
P2P Digital Currency
src
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
{
14
uiInterface
.
ThreadSafeMessageBox
(str,
"Error"
,
CClientUIInterface::MSG_ERROR
);
15
return
false
;
16
}
17
18
inline
static
bool
UIWarning(
const
std::string &str)
19
{
20
uiInterface
.
ThreadSafeMessageBox
(str,
"Warning"
,
CClientUIInterface::MSG_WARNING
);
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
CClientUIInterface::MSG_ERROR
@ MSG_ERROR
Definition:
guiinterface.h:79
CClientUIInterface::MSG_WARNING
@ MSG_WARNING
Definition:
guiinterface.h:78
CClientUIInterface::ThreadSafeMessageBox
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
guiinterface.h
uiInterface
CClientUIInterface uiInterface
Definition:
init.cpp:109
system.h
_
std::string _(const char *psz)
Translation function: Call Translate signal on UI interface, which returns a Optional result.
Definition:
system.h:65
tinyformat.h
strprintf
#define strprintf
Definition:
tinyformat.h:1056
Generated on Wed Apr 2 2025 00:40:28 for PIVX Core by
1.9.1