5 #if defined(HAVE_CONFIG_H)
6 #include "config/bitcoin-config.h"
10 #include "ui_debugwindow.h"
24 #include <openssl/crypto.h>
34 #include <QMessageBox>
37 #include <QSignalMapper>
41 #include <QStringList>
43 #if QT_VERSION < 0x050000
60 {
"cmd-request",
":/icons/tx_input"},
61 {
"cmd-reply",
":/icons/tx_output"},
62 {
"cmd-error",
":/icons/tx_output"},
63 {
"misc",
":/icons/tx_inout"},
70 const QStringList historyFilter = QStringList()
73 <<
"signmessagewithprivkey"
74 <<
"signrawtransaction"
76 <<
"walletpassphrasechange"
88 void request(
const QString &command);
91 void reply(
int category,
const QString &command);
104 timer.setSingleShot(
true);
113 boost::function<void(
void)>
func;
120 const char *
Name() {
return "Qt"; }
128 #include "rpcconsole.moc"
151 std::vector< std::vector<std::string> > stack;
152 stack.push_back(std::vector<std::string>());
157 STATE_EATING_SPACES_IN_ARG,
158 STATE_EATING_SPACES_IN_BRACKETS,
163 STATE_ESCAPE_DOUBLEQUOTED,
164 STATE_COMMAND_EXECUTED,
165 STATE_COMMAND_EXECUTED_INNER
166 } state = STATE_EATING_SPACES;
169 unsigned nDepthInsideSensitive = 0;
170 size_t filter_begin_pos = 0, chpos;
171 std::vector<std::pair<size_t, size_t>> filter_ranges;
173 auto add_to_current_stack = [&](
const std::string& strArg) {
174 if (stack.back().empty() && (!nDepthInsideSensitive) && historyFilter.contains(QString::fromStdString(strArg), Qt::CaseInsensitive)) {
175 nDepthInsideSensitive = 1;
176 filter_begin_pos = chpos;
180 stack.
push_back(std::vector<std::string>());
182 stack.back().push_back(strArg);
185 auto close_out_params = [&]() {
186 if (nDepthInsideSensitive) {
187 if (!--nDepthInsideSensitive) {
188 assert(filter_begin_pos);
189 filter_ranges.push_back(std::make_pair(filter_begin_pos, chpos));
190 filter_begin_pos = 0;
196 std::string strCommandTerminated = strCommand;
197 if (strCommandTerminated.back() !=
'\n')
198 strCommandTerminated +=
"\n";
199 for (chpos = 0; chpos < strCommandTerminated.size(); ++chpos)
201 char ch = strCommandTerminated[chpos];
204 case STATE_COMMAND_EXECUTED_INNER:
205 case STATE_COMMAND_EXECUTED:
207 bool breakParsing =
true;
210 case '[': curarg.clear(); state = STATE_COMMAND_EXECUTED_INNER;
break;
212 if (state == STATE_COMMAND_EXECUTED_INNER)
220 if (curarg.size() && fExecute)
226 for(
char argch: curarg)
227 if (!std::isdigit(argch))
228 throw std::runtime_error(
"Invalid result query");
229 subelement = lastResult[
atoi(curarg.c_str())];
234 throw std::runtime_error(
"Invalid result query");
235 lastResult = subelement;
238 state = STATE_COMMAND_EXECUTED;
242 breakParsing =
false;
248 if (lastResult.
isStr())
251 curarg = lastResult.
write(2);
257 add_to_current_stack(curarg);
263 state = STATE_EATING_SPACES;
269 case STATE_EATING_SPACES_IN_ARG:
270 case STATE_EATING_SPACES_IN_BRACKETS:
271 case STATE_EATING_SPACES:
274 case '"': state = STATE_DOUBLEQUOTED;
break;
275 case '\'': state = STATE_SINGLEQUOTED;
break;
276 case '\\': state = STATE_ESCAPE_OUTER;
break;
277 case '(':
case ')':
case '\n':
278 if (state == STATE_EATING_SPACES_IN_ARG)
279 throw std::runtime_error(
"Invalid Syntax");
280 if (state == STATE_ARGUMENT)
282 if (ch ==
'(' && stack.size() && stack.back().size() > 0)
284 if (nDepthInsideSensitive) {
285 ++nDepthInsideSensitive;
287 stack.push_back(std::vector<std::string>());
292 throw std::runtime_error(
"Invalid Syntax");
294 add_to_current_stack(curarg);
296 state = STATE_EATING_SPACES_IN_BRACKETS;
298 if ((ch ==
')' || ch ==
'\n') && stack.size() > 0)
304 req.
params =
RPCConvertValues(stack.back()[0], std::vector<std::string>(stack.back().begin() + 1, stack.back().end()));
309 state = STATE_COMMAND_EXECUTED;
313 case ' ':
case ',':
case '\t':
314 if(state == STATE_EATING_SPACES_IN_ARG && curarg.empty() && ch ==
',')
315 throw std::runtime_error(
"Invalid Syntax");
317 else if(state == STATE_ARGUMENT)
319 add_to_current_stack(curarg);
322 if ((state == STATE_EATING_SPACES_IN_BRACKETS || state == STATE_ARGUMENT) && ch ==
',')
324 state = STATE_EATING_SPACES_IN_ARG;
327 state = STATE_EATING_SPACES;
329 default: curarg += ch; state = STATE_ARGUMENT;
332 case STATE_SINGLEQUOTED:
335 case '\'': state = STATE_ARGUMENT;
break;
336 default: curarg += ch;
339 case STATE_DOUBLEQUOTED:
342 case '"': state = STATE_ARGUMENT;
break;
343 case '\\': state = STATE_ESCAPE_DOUBLEQUOTED;
break;
344 default: curarg += ch;
347 case STATE_ESCAPE_OUTER:
348 curarg += ch; state = STATE_ARGUMENT;
350 case STATE_ESCAPE_DOUBLEQUOTED:
351 if(ch !=
'"' && ch !=
'\\') curarg +=
'\\';
352 curarg += ch; state = STATE_DOUBLEQUOTED;
356 if (pstrFilteredOut) {
357 if (STATE_COMMAND_EXECUTED == state) {
358 assert(!stack.empty());
361 *pstrFilteredOut = strCommand;
362 for (
auto i = filter_ranges.rbegin(); i != filter_ranges.rend(); ++i) {
363 pstrFilteredOut->replace(i->first, i->second - i->first,
"(…)");
368 case STATE_COMMAND_EXECUTED:
369 if (lastResult.
isStr())
370 strResult = lastResult.
get_str();
372 strResult = lastResult.
write(2);
374 case STATE_EATING_SPACES:
386 std::string executableCommand = command.toStdString() +
"\n";
402 catch (
const std::runtime_error&)
407 catch (
const std::exception& e)
418 platformStyle(_platformStyle),
419 peersTableContextMenu(0),
420 banTableContextMenu(0),
426 ui->openDebugLogfileButton->setToolTip(
ui->openDebugLogfileButton->toolTip().arg(tr(PACKAGE_NAME)));
436 ui->lineEdit->installEventFilter(
this);
437 ui->messagesWidget->installEventFilter(
this);
439 connect(
ui->clearButton, SIGNAL(clicked()),
this, SLOT(
clear()));
440 connect(
ui->fontBiggerButton, SIGNAL(clicked()),
this, SLOT(
fontBigger()));
441 connect(
ui->fontSmallerButton, SIGNAL(clicked()),
this, SLOT(
fontSmaller()));
442 connect(
ui->btnClearTrafficGraph, SIGNAL(clicked()),
ui->trafficGraph, SLOT(
clear()));
446 ui->berkeleyDBVersion->setText(DbEnv::version(0, 0, 0));
448 ui->label_berkeleyDBVersion->hide();
449 ui->berkeleyDBVersion->hide();
459 ui->detailWidget->hide();
460 ui->peerHeading->setText(tr(
"Select a peer to view detailed information."));
477 if(event->type() == QEvent::KeyPress)
479 QKeyEvent *keyevt =
static_cast<QKeyEvent*
>(event);
480 int key = keyevt->key();
481 Qt::KeyboardModifiers mod = keyevt->modifiers();
484 case Qt::Key_Up:
if(obj ==
ui->lineEdit) {
browseHistory(-1);
return true; }
break;
485 case Qt::Key_Down:
if(obj ==
ui->lineEdit) {
browseHistory(1);
return true; }
break;
487 case Qt::Key_PageDown:
488 if(obj ==
ui->lineEdit)
490 QApplication::postEvent(
ui->messagesWidget,
new QKeyEvent(*keyevt));
498 QApplication::postEvent(
ui->lineEdit,
new QKeyEvent(*keyevt));
505 if(obj ==
ui->messagesWidget && (
506 (!mod && !keyevt->text().isEmpty() && key != Qt::Key_Tab) ||
507 ((mod & Qt::ControlModifier) && key == Qt::Key_V) ||
508 ((mod & Qt::ShiftModifier) && key == Qt::Key_Insert)))
510 ui->lineEdit->setFocus();
511 QApplication::postEvent(
ui->lineEdit,
new QKeyEvent(*keyevt));
516 return QWidget::eventFilter(obj, event);
522 ui->trafficGraph->setClientModel(model);
526 connect(model, SIGNAL(numConnectionsChanged(
int)),
this, SLOT(
setNumConnections(
int)));
529 connect(model, SIGNAL(numBlocksChanged(
int,QDateTime,
double,
bool)),
this, SLOT(
setNumBlocks(
int,QDateTime,
double,
bool)));
532 connect(model, SIGNAL(networkActiveChanged(
bool)),
this, SLOT(
setNetworkActive(
bool)));
535 connect(model, SIGNAL(bytesChanged(quint64,quint64)),
this, SLOT(
updateTrafficStats(quint64, quint64)));
537 connect(model, SIGNAL(mempoolSizeChanged(
long,
size_t)),
this, SLOT(
setMempoolSize(
long,
size_t)));
541 ui->peerWidget->verticalHeader()->hide();
542 ui->peerWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
543 ui->peerWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
544 ui->peerWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
545 ui->peerWidget->setContextMenuPolicy(Qt::CustomContextMenu);
549 ui->peerWidget->horizontalHeader()->setStretchLastSection(
true);
552 QAction* disconnectAction =
new QAction(tr(
"&Disconnect"),
this);
553 QAction* banAction1h =
new QAction(tr(
"Ban for") +
" " + tr(
"1 &hour"),
this);
554 QAction* banAction24h =
new QAction(tr(
"Ban for") +
" " + tr(
"1 &day"),
this);
555 QAction* banAction7d =
new QAction(tr(
"Ban for") +
" " + tr(
"1 &week"),
this);
556 QAction* banAction365d =
new QAction(tr(
"Ban for") +
" " + tr(
"1 &year"),
this);
569 QSignalMapper* signalMapper =
new QSignalMapper(
this);
570 signalMapper->setMapping(banAction1h, 60*60);
571 signalMapper->setMapping(banAction24h, 60*60*24);
572 signalMapper->setMapping(banAction7d, 60*60*24*7);
573 signalMapper->setMapping(banAction365d, 60*60*24*365);
574 connect(banAction1h, SIGNAL(triggered()), signalMapper, SLOT(map()));
575 connect(banAction24h, SIGNAL(triggered()), signalMapper, SLOT(map()));
576 connect(banAction7d, SIGNAL(triggered()), signalMapper, SLOT(map()));
577 connect(banAction365d, SIGNAL(triggered()), signalMapper, SLOT(map()));
578 connect(signalMapper, SIGNAL(mapped(
int)),
this, SLOT(
banSelectedNode(
int)));
585 connect(
ui->peerWidget->selectionModel(), SIGNAL(selectionChanged(
const QItemSelection &,
const QItemSelection &)),
586 this, SLOT(
peerSelected(
const QItemSelection &,
const QItemSelection &)));
594 ui->banlistWidget->verticalHeader()->hide();
595 ui->banlistWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
596 ui->banlistWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
597 ui->banlistWidget->setSelectionMode(QAbstractItemView::SingleSelection);
598 ui->banlistWidget->setContextMenuPolicy(Qt::CustomContextMenu);
601 ui->banlistWidget->horizontalHeader()->setStretchLastSection(
true);
604 QAction* unbanAction =
new QAction(tr(
"&Unban"),
this);
611 connect(
ui->banlistWidget, SIGNAL(customContextMenuRequested(
const QPoint&)),
this, SLOT(
showBanTableContextMenu(
const QPoint&)));
615 connect(
ui->banlistWidget, SIGNAL(clicked(
const QModelIndex&)),
this, SLOT(
clearSelectedNode()));
625 ui->networkName->setText(QString::fromStdString(
Params().NetworkIDString()));
628 QStringList wordList;
630 for (
size_t i = 0; i < commandList.size(); ++i)
632 wordList << commandList[i].c_str();
649 static QString categoryClass(
int category)
656 default:
return "misc";
679 QString str =
ui->messagesWidget->toHtml();
682 str.replace(QString(
"font-size:%1pt").arg(
consoleFontSize), QString(
"font-size:%1pt").arg(newSize));
689 float oldPosFactor = 1.0 /
ui->messagesWidget->verticalScrollBar()->maximum() *
ui->messagesWidget->verticalScrollBar()->value();
691 ui->messagesWidget->setHtml(str);
692 ui->messagesWidget->verticalScrollBar()->setValue(oldPosFactor *
ui->messagesWidget->verticalScrollBar()->maximum());
697 ui->messagesWidget->clear();
703 ui->lineEdit->clear();
704 ui->lineEdit->setFocus();
710 ui->messagesWidget->document()->addResource(
711 QTextDocument::ImageResource,
718 ui->messagesWidget->document()->setDefaultStyleSheet(
721 "td.time { color: #808080; font-size: %2; padding-top: 3px; } "
722 "td.message { font-family: %1; font-size: %2; white-space:pre-wrap; } "
723 "td.cmd-request { color: #006060; } "
724 "td.cmd-error { color: red; } "
725 ".secwarning { color: red; }"
726 "b { color: #006060; } "
730 message(
CMD_REPLY, (tr(
"Welcome to the %1 RPC console.").arg(tr(PACKAGE_NAME)) +
"<br>" +
731 tr(
"Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.") +
"<br>" +
732 tr(
"Type <b>help</b> for an overview of available commands.")) +
733 "<br><span class=\"secwarning\">" +
734 tr(
"WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramification of a command.") +
741 if(windowType() != Qt::Widget && event->key() == Qt::Key_Escape)
749 QTime time = QTime::currentTime();
750 QString timeString = time.toString();
752 out +=
"<table><tr><td class=\"time\" width=\"65\">" + timeString +
"</td>";
753 out +=
"<td class=\"icon\" width=\"32\"><img src=\"" + categoryClass(category) +
"\"></td>";
754 out +=
"<td class=\"message " + categoryClass(category) +
"\" valign=\"middle\">";
759 out +=
"</td></tr></table>";
760 ui->messagesWidget->append(out);
770 connections +=
" (" + tr(
"Network activity disabled") +
")";
773 ui->numberOfConnections->setText(connections);
792 ui->numberOfBlocks->setText(QString::number(count));
793 ui->lastBlockTime->setText(blockDate.toString());
799 ui->mempoolNumberTxs->setText(QString::number(numberOfTxs));
801 if (dynUsage < 1000000)
802 ui->mempoolSize->setText(QString::number(dynUsage/1000.0,
'f', 2) +
" KB");
804 ui->mempoolSize->setText(QString::number(dynUsage/1000000.0,
'f', 2) +
" MB");
809 QString cmd =
ui->lineEdit->text();
813 std::string strFilteredCmd;
818 throw std::runtime_error(
"Invalid command line");
820 }
catch (
const std::exception& e) {
821 QMessageBox::critical(
this,
"Error", QString(
"Error: ") + QString::fromStdString(e.what()));
825 ui->lineEdit->clear();
832 cmd = QString::fromStdString(strFilteredCmd);
867 ui->lineEdit->setText(cmd);
873 executor->moveToThread(&
thread);
876 connect(executor, SIGNAL(reply(
int,QString)),
this, SLOT(
message(
int,QString)));
878 connect(
this, SIGNAL(
cmdRequest(QString)), executor, SLOT(request(QString)));
884 connect(&
thread, SIGNAL(finished()), executor, SLOT(deleteLater()), Qt::DirectConnection);
893 if (
ui->tabWidget->widget(index) ==
ui->tab_console)
894 ui->lineEdit->setFocus();
895 else if (
ui->tabWidget->widget(index) !=
ui->tab_peers)
906 QScrollBar *scrollbar =
ui->messagesWidget->verticalScrollBar();
907 scrollbar->setValue(scrollbar->maximum());
912 const int multiplier = 5;
913 int mins = value * multiplier;
920 return QString(tr(
"%1 B")).arg(bytes);
921 if(bytes < 1024 * 1024)
922 return QString(tr(
"%1 KB")).arg(bytes / 1024);
923 if(bytes < 1024 * 1024 * 1024)
924 return QString(tr(
"%1 MB")).arg(bytes / 1024 / 1024);
926 return QString(tr(
"%1 GB")).arg(bytes / 1024 / 1024 / 1024);
931 ui->trafficGraph->setGraphRangeMins(mins);
943 Q_UNUSED(deselected);
955 QModelIndexList selected =
ui->peerWidget->selectionModel()->selectedIndexes();
957 for(
int i = 0; i < selected.size(); i++)
970 bool fUnselect =
false;
971 bool fReselect =
false;
977 int selectedRow = -1;
978 QModelIndexList selectedModelIndex =
ui->peerWidget->selectionModel()->selectedIndexes();
979 if (!selectedModelIndex.isEmpty()) {
980 selectedRow = selectedModelIndex.first().row();
987 if (detailNodeRow < 0)
994 if (detailNodeRow != selectedRow)
1005 if (fUnselect && selectedRow >= 0) {
1024 QString peerAddrDetails(QString::fromStdString(stats->
nodeStats.
addrName) +
" ");
1025 peerAddrDetails += tr(
"(node id: %1)").arg(QString::number(stats->
nodeStats.
nodeid));
1027 peerAddrDetails +=
"<br />" + tr(
"via %1").arg(QString::fromStdString(stats->
nodeStats.
addrLocal));
1028 ui->peerHeading->setText(peerAddrDetails);
1055 ui->peerSyncHeight->setText(tr(
"Unknown"));
1061 ui->peerCommonHeight->setText(tr(
"Unknown"));
1064 ui->detailWidget->show();
1069 QWidget::resizeEvent(event);
1074 QWidget::showEvent(event);
1085 QWidget::hideEvent(event);
1096 QModelIndex index =
ui->peerWidget->indexAt(point);
1097 if (index.isValid())
1103 QModelIndex index =
ui->banlistWidget->indexAt(point);
1104 if (index.isValid())
1115 for(
int i = 0; i < nodes.count(); i++)
1118 NodeId id = nodes.at(i).data().toLongLong();
1132 for(
int i = 0; i < nodes.count(); i++)
1135 NodeId id = nodes.at(i).data().toLongLong();
1139 if(detailNodeRow < 0)
1159 for(
int i = 0; i < nodes.count(); i++)
1162 QString strNode = nodes.at(i).data().toString();
1165 LookupSubNet(strNode.toStdString().c_str(), possibleSubnet);
1176 ui->peerWidget->selectionModel()->clearSelection();
1178 ui->detailWidget->hide();
1179 ui->peerHeading->setText(tr(
"Select a peer to view detailed information."));
1188 ui->banlistWidget->setVisible(visible);
1189 ui->banHeading->setVisible(visible);
1194 ui->tabWidget->setCurrentIndex(tabType);
const CChainParams & Params()
Return the currently selected parameters.
std::vector< std::string > listCommands() const
Returns a list of registered commands.
UniValue execute(const JSONRPCRequest &request) const
Execute a method.
Model for Bitcoin network client.
quint64 getTotalBytesRecv() const
quint64 getTotalBytesSent() const
PeerTableModel * getPeerTableModel()
QDateTime getLastBlockDate() const
double getVerificationProgress(const CBlockIndex *tip) const
bool getNetworkActive() const
Return true if network activity in core is enabled.
QString formatClientStartupTime() const
int getNumConnections(unsigned int flags=CONNECTIONS_ALL) const
Return number of connections, default is in- and outbound (total)
BanTableModel * getBanTableModel()
QString formatFullVersion() const
QString formatSubVersion() const
const CNodeCombinedStats * getNodeStats(int idx)
int getRowByNodeId(NodeId nodeid)
Class for handling RPC timers (used for e.g.
boost::function< void(void)> func
QtRPCTimerBase(boost::function< void(void)> &_func, int64_t millis)
RPCTimerBase * NewTimer(boost::function< void(void)> &func, int64_t millis)
Factory function for timers.
const char * Name()
Implementation name.
Local Bitcoin RPC console.
QMenu * peersTableContextMenu
void updateNodeDetail(const CNodeCombinedStats *stats)
show detailed information on ui about selected node
void resizeEvent(QResizeEvent *event)
static bool RPCParseCommandLine(std::string &strResult, const std::string &strCommand, bool fExecute, std::string *const pstrFilteredOut=NULL)
Split shell command line into a list of arguments and optionally execute the command(s).
void browseHistory(int offset)
Go forward or back in history.
void peerSelected(const QItemSelection &selected, const QItemSelection &deselected)
Handle selection of peer in peers list.
RPCTimerInterface * rpcTimerInterface
void on_lineEdit_returnPressed()
void setClientModel(ClientModel *model)
void setFontSize(int newSize)
void updateTrafficStats(quint64 totalBytesIn, quint64 totalBytesOut)
update traffic statistics
void setTrafficGraphRange(int mins)
void cmdRequest(const QString &command)
void updateNetworkState()
Update UI with latest network info from model.
void disconnectSelectedNode()
Disconnect a selected node on the Peers tab.
@ SUBVERSION_COLUMN_WIDTH
QCompleter * autoCompleter
virtual bool eventFilter(QObject *obj, QEvent *event)
void setMempoolSize(long numberOfTxs, size_t dynUsage)
Set size (number of transactions and memory usage) of the mempool in the UI.
void setNumBlocks(int count, const QDateTime &blockDate, double nVerificationProgress, bool headers)
Set number of blocks and last block date shown in the UI.
static bool RPCExecuteCommandLine(std::string &strResult, const std::string &strCommand, std::string *const pstrFilteredOut=NULL)
void clear(bool clearHistory=true)
void keyPressEvent(QKeyEvent *)
RPCConsole(const PlatformStyle *platformStyle, QWidget *parent)
void showPeersTableContextMenu(const QPoint &point)
Show custom context menu on Peers tab.
QList< NodeId > cachedNodeids
void unbanSelectedNode()
Unban a selected node on the Bans tab.
void clearSelectedNode()
clear the selected node
void on_sldGraphRange_valueChanged(int value)
change the time range of the network traffic graph
const PlatformStyle * platformStyle
void setNumConnections(int count)
Set number of connections shown in the UI.
ClientModel * clientModel
void banSelectedNode(int bantime)
Ban a selected node on the Peers tab.
void scrollToEnd()
Scroll console view to end.
void hideEvent(QHideEvent *event)
void on_tabWidget_currentChanged(int index)
void setNetworkActive(bool networkActive)
Set network state shown in the UI.
QString cmdBeforeBrowsing
void message(int category, const QString &message, bool html=false)
Append the message to the message widget.
void on_openDebugLogfileButton_clicked()
open the debug.log from the current datadir
void showBanTableContextMenu(const QPoint &point)
Show custom context menu on Bans tab.
void peerLayoutAboutToChange()
Handle selection caching before update.
void setTabFocus(enum TabTypes tabType)
set which tab has the focus (is visible)
void showEvent(QShowEvent *event)
void showOrHideBanTableIfRequired()
Hides ban table if no bans are present.
QMenu * banTableContextMenu
void peerLayoutChanged()
Handle updated peer information.
static QString FormatBytes(quint64 bytes)
void reply(int category, const QString &command)
void request(const QString &command)
Opaque base class for timers returned by NewTimerFunc.
const std::string & get_str() const
std::string write(unsigned int prettyIndent=0, unsigned int indentLevel=0) const
bool push_back(const UniValue &val)
UniValue RPCConvertValues(const std::string &strMethod, const std::vector< std::string > &strParams)
Convert positional arguments to command-specific RPC representation.
std::unique_ptr< CConnman > g_connman
QString HtmlEscape(const QString &str, bool fMultiLine)
QString formatPingTime(double dPingTime)
void saveWindowGeometry(const QString &strSetting, QWidget *parent)
Save window size and position.
QList< QModelIndex > getEntryData(QAbstractItemView *view, int column)
Return a field of the currently selected entry as a QString.
void restoreWindowGeometry(const QString &strSetting, const QSize &defaultSize, QWidget *parent)
Restore window size and position.
QString formatDurationStr(int secs)
QString formatTimeOffset(int64_t nTimeOffset)
QString formatServicesStr(quint64 mask)
bool LookupSubNet(const char *pszName, CSubNet &ret)
const int INITIAL_TRAFFIC_GRAPH_MINS
const QSize FONT_RANGE(4, 40)
const struct @11 ICON_MAPPING[]
const int CONSOLE_HISTORY
const char fontSizeSettingsKey[]
void RPCSetTimerInterfaceIfUnset(RPCTimerInterface *iface)
Set the factory function for timer, but only, if unset.
void RPCUnsetTimerInterface(RPCTimerInterface *iface)
Unset factory function for timers.
CNodeStateStats nodeStateStats
bool fNodeStateStatsAvailable
const UniValue & find_value(const UniValue &obj, const std::string &name)
int atoi(const std::string &str)
int64_t GetSystemTimeInSeconds()