Bitcoin
|
#include <rpcconsole.h>
Public Types | |
enum | MessageClass { MC_ERROR, MC_DEBUG, CMD_REQUEST, CMD_REPLY, CMD_ERROR } |
enum | TabTypes { TAB_INFO = 0, TAB_CONSOLE = 1, TAB_GRAPH = 2, TAB_PEERS = 3 } |
Public Slots | |
void | clear (bool clearHistory=true) |
void | fontBigger () |
void | fontSmaller () |
void | setFontSize (int newSize) |
void | message (int category, const QString &msg) |
void | message (int category, const QString &message, bool html) |
void | setNumConnections (int count) |
void | setNetworkActive (bool networkActive) |
void | setNumBlocks (int count, const QDateTime &blockDate, double nVerificationProgress, bool headers) |
void | setMempoolSize (long numberOfTxs, size_t dynUsage) |
void | browseHistory (int offset) |
void | scrollToEnd () |
void | peerSelected (const QItemSelection &selected, const QItemSelection &deselected) |
void | peerLayoutAboutToChange () |
void | peerLayoutChanged () |
void | disconnectSelectedNode () |
void | banSelectedNode (int bantime) |
void | unbanSelectedNode () |
void | setTabFocus (enum TabTypes tabType) |
Signals | |
void | cmdRequest (const QString &command, const WalletModel *wallet_model) |
Public Member Functions | |
RPCConsole (interfaces::Node &node, const PlatformStyle *platformStyle, QWidget *parent) | |
~RPCConsole () | |
void | setClientModel (ClientModel *model) |
void | addWallet (WalletModel *const walletModel) |
void | removeWallet (WalletModel *const walletModel) |
std::vector< TabTypes > | tabs () const |
TabTypes | tabFocus () const |
QString | tabTitle (TabTypes tab_type) const |
Static Public Member Functions | |
static bool | RPCParseCommandLine (interfaces::Node *node, std::string &strResult, const std::string &strCommand, bool fExecute, std::string *const pstrFilteredOut=nullptr, const WalletModel *wallet_model=nullptr) |
static bool | RPCExecuteCommandLine (interfaces::Node &node, std::string &strResult, const std::string &strCommand, std::string *const pstrFilteredOut=nullptr, const WalletModel *wallet_model=nullptr) |
Protected Member Functions | |
virtual bool | eventFilter (QObject *obj, QEvent *event) |
void | keyPressEvent (QKeyEvent *) |
Private Types | |
enum | ColumnWidths { ADDRESS_COLUMN_WIDTH = 200, SUBVERSION_COLUMN_WIDTH = 150, PING_COLUMN_WIDTH = 80, BANSUBNET_COLUMN_WIDTH = 200, BANTIME_COLUMN_WIDTH = 250 } |
Private Slots | |
void | on_lineEdit_returnPressed () |
void | on_tabWidget_currentChanged (int index) |
void | on_openDebugLogfileButton_clicked () |
void | on_sldGraphRange_valueChanged (int value) |
void | updateTrafficStats (quint64 totalBytesIn, quint64 totalBytesOut) |
void | resizeEvent (QResizeEvent *event) |
void | showEvent (QShowEvent *event) |
void | hideEvent (QHideEvent *event) |
void | showPeersTableContextMenu (const QPoint &point) |
void | showBanTableContextMenu (const QPoint &point) |
void | showOrHideBanTableIfRequired () |
void | clearSelectedNode () |
Private Member Functions | |
void | startExecutor () |
void | setTrafficGraphRange (int mins) |
void | updateNodeDetail (const CNodeCombinedStats *stats) |
void | updateNetworkState () |
Private Attributes | |
interfaces::Node & | m_node |
Ui::RPCConsole *const | ui |
ClientModel * | clientModel = nullptr |
QStringList | history |
int | historyPtr = 0 |
QString | cmdBeforeBrowsing |
QList< NodeId > | cachedNodeids |
const PlatformStyle *const | platformStyle |
RPCTimerInterface * | rpcTimerInterface = nullptr |
QMenu * | peersTableContextMenu = nullptr |
QMenu * | banTableContextMenu = nullptr |
int | consoleFontSize = 0 |
QCompleter * | autoCompleter = nullptr |
QThread | thread |
WalletModel * | m_last_wallet_model {nullptr} |
Local Bitcoin RPC console.
|
private |
enum RPCConsole::TabTypes |
|
explicit |
RPCConsole::~RPCConsole | ( | ) |
void RPCConsole::addWallet | ( | WalletModel *const | walletModel | ) |
|
slot |
Ban a selected node on the Peers tab
|
slot |
Go forward or back in history
|
slot |
|
privateslot |
clear the selected node
|
signal |
|
slot |
Disconnect a selected node on the Peers tab
|
protectedvirtual |
|
slot |
|
slot |
|
privateslot |
|
protected |
|
inlineslot |
Append the message to the message widget
|
slot |
|
privateslot |
|
privateslot |
open the debug.log from the current datadir
|
privateslot |
change the time range of the network traffic graph
|
privateslot |
|
slot |
Handle selection caching before update
|
slot |
Handle updated peer information
|
slot |
Handle selection of peer in peers list
void RPCConsole::removeWallet | ( | WalletModel *const | walletModel | ) |
|
privateslot |
|
inlinestatic |
|
static |
Split shell command line into a list of arguments and optionally execute the command(s). Aims to emulate bash
and friends.
\
is used as escape character" and backslashes before a \c "
or another backslash[in] | node | optional node to execute command on |
[out] | strResult | stringified result from the executed command(chain) |
[in] | strCommand | Command line to split |
[in] | fExecute | set true if you want the command to be executed |
[out] | pstrFilteredOut | Command line, filtered to remove any sensitive data |
|
slot |
Scroll console view to end
void RPCConsole::setClientModel | ( | ClientModel * | model | ) |
|
slot |
|
slot |
Set size (number of transactions and memory usage) of the mempool in the UI
|
slot |
Set network state shown in the UI
|
slot |
Set number of blocks and last block date shown in the UI
|
slot |
Set number of connections shown in the UI
|
slot |
set which tab has the focus (is visible)
|
private |
|
privateslot |
Show custom context menu on Bans tab
|
privateslot |
|
privateslot |
Hides ban table if no bans are present
|
privateslot |
Show custom context menu on Peers tab
|
private |
RPCConsole::TabTypes RPCConsole::tabFocus | ( | ) | const |
|
inline |
QString RPCConsole::tabTitle | ( | TabTypes | tab_type | ) | const |
|
slot |
Unban a selected node on the Bans tab
|
private |
Update UI with latest network info from model.
|
private |
show detailed information on ui about selected node
|
privateslot |
update traffic statistics
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |