PIVX Core  5.6.99
P2P Digital Currency
Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Types | Private Slots | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
RPCConsole Class Reference

Local Bitcoin RPC console. More...

#include <rpcconsole.h>

Inheritance diagram for RPCConsole:
[legend]
Collaboration diagram for RPCConsole:
[legend]

Public Slots

void clear ()
 
void walletSalvage ()
 Wallet repair options. More...
 
void walletRescan ()
 Restart wallet with "-rescan". More...
 
void walletZaptxes1 ()
 Restart wallet with "-zapwallettxes=1". More...
 
void walletZaptxes2 ()
 Restart wallet with "-zapwallettxes=2". More...
 
void walletUpgrade ()
 Restart wallet with "-upgradewallet". More...
 
void walletReindex ()
 Restart wallet with "-reindex". More...
 
void walletResync ()
 Restart wallet with "-resync". More...
 
void reject ()
 
void message (int category, const QString &msg)
 
void message (int category, const QString &message, bool html)
 
void setNumConnections (int count)
 Set number of connections shown in the UI. More...
 
void setNetworkActive (bool networkActive)
 Set network state shown in the UI. More...
 
void setNumBlocks (int count)
 Set number of blocks shown in the UI. More...
 
void setMasternodeCount (const QString &strMasternodes)
 Set number of masternodes shown in the UI. More...
 
void browseHistory (int offset)
 Go forward or back in history. More...
 
void scrollToEnd ()
 Scroll console view to end. More...
 
void showInfo ()
 Switch to info tab and show. More...
 
void showConsole ()
 Switch to console tab and show. More...
 
void showNetwork ()
 Switch to network tab and show. More...
 
void showPeers ()
 Switch to peers tab and show. More...
 
void showRepair ()
 Switch to wallet-repair tab and show. More...
 
void showConfEditor ()
 Open external (default) editor with pivx.conf. More...
 
void showMNConfEditor ()
 Open external (default) editor with masternode.conf. More...
 
void peerSelected (const QItemSelection &selected, const QItemSelection &deselected)
 Handle selection of peer in peers list. More...
 
void peerLayoutChanged ()
 Handle updated peer information. More...
 
void disconnectSelectedNode ()
 Disconnect a selected node on the Peers tab. More...
 
void banSelectedNode (int bantime)
 Ban a selected node on the Peers tab. More...
 
void unbanSelectedNode ()
 Unban a selected node on the Bans tab. More...
 
void showBackups ()
 Show folder with wallet backups in default browser. More...
 

Signals

void stopExecutor ()
 
void cmdRequest (const QString &command)
 
void handleRestart (QStringList args)
 Get restart command-line parameters and handle restart. More...
 

Public Member Functions

 RPCConsole (QWidget *parent)
 
 ~RPCConsole ()
 
void setClientModel (ClientModel *model)
 
void setWalletModel (WalletModel *model)
 

Protected Member Functions

virtual bool eventFilter (QObject *obj, QEvent *event)
 

Private Types

enum  ColumnWidths {
  ADDRESS_COLUMN_WIDTH = 170 , SUBVERSION_COLUMN_WIDTH = 140 , 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 ()
 open the debug.log from the current datadir More...
 
void on_sldGraphRange_valueChanged (int value)
 change the time range of the network traffic graph More...
 
void updateTrafficStats (quint64 totalBytesIn, quint64 totalBytesOut)
 update traffic statistics More...
 
void resizeEvent (QResizeEvent *event)
 
void showEvent (QShowEvent *event)
 
void hideEvent (QHideEvent *event)
 
void showPeersTableContextMenu (const QPoint &point)
 Show custom context menu on Peers tab. More...
 
void showBanTableContextMenu (const QPoint &point)
 Show custom context menu on Bans tab. More...
 
void showOrHideBanTableIfRequired ()
 Hides ban table if no bans are present. More...
 
void clearSelectedNode ()
 clear the selected node More...
 

Private Member Functions

void startExecutor ()
 
void setTrafficGraphRange (int mins)
 
void buildParameterlist (QString arg)
 Build parameter list for restart. More...
 
void updateNodeDetail (const CNodeCombinedStats *stats)
 show detailed information on ui about selected node More...
 
void updateNetworkState (int num_connections)
 Update UI with latest network info from model. More...
 

Static Private Member Functions

static QString FormatBytes (quint64 bytes)
 

Private Attributes

Ui::RPCConsole * ui
 
ClientModelclientModel
 
WalletModelwalletModel
 
QStringList history
 
int historyPtr
 
NodeId cachedNodeid
 
QCompleter * autoCompleter
 
QMenu * peersTableContextMenu
 
QMenu * banTableContextMenu
 
RPCTimerInterfacerpcTimerInterface
 

Detailed Description

Local Bitcoin RPC console.

Definition at line 32 of file rpcconsole.h.

Member Enumeration Documentation

◆ ColumnWidths

Enumerator
ADDRESS_COLUMN_WIDTH 
SUBVERSION_COLUMN_WIDTH 
PING_COLUMN_WIDTH 
BANSUBNET_COLUMN_WIDTH 
BANTIME_COLUMN_WIDTH 

Definition at line 137 of file rpcconsole.h.

Constructor & Destructor Documentation

◆ RPCConsole()

RPCConsole::RPCConsole ( QWidget *  parent)
explicit

Definition at line 60 of file rpcconsole.cpp.

Here is the call graph for this function:

◆ ~RPCConsole()

RPCConsole::~RPCConsole ( )

Definition at line 114 of file rpcconsole.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ banSelectedNode

void RPCConsole::banSelectedNode ( int  bantime)
slot

Ban a selected node on the Peers tab.

Definition at line 806 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ browseHistory

void RPCConsole::browseHistory ( int  offset)
slot

Go forward or back in history.

Definition at line 510 of file rpcconsole.cpp.

Here is the caller graph for this function:

◆ buildParameterlist()

void RPCConsole::buildParameterlist ( QString  arg)
private

Build parameter list for restart.

Build command-line parameter list for restart.

Definition at line 356 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear

void RPCConsole::clear ( )
slot
Todo:
: Remove fixed font-size

Definition at line 377 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearSelectedNode

void RPCConsole::clearSelectedNode ( )
privateslot

clear the selected node

Definition at line 853 of file rpcconsole.cpp.

Here is the caller graph for this function:

◆ cmdRequest

void RPCConsole::cmdRequest ( const QString &  command)
signal
Here is the caller graph for this function:

◆ disconnectSelectedNode

void RPCConsole::disconnectSelectedNode ( )
slot

Disconnect a selected node on the Peers tab.

Definition at line 795 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ eventFilter()

bool RPCConsole::eventFilter ( QObject *  obj,
QEvent *  event 
)
protectedvirtual

Definition at line 123 of file rpcconsole.cpp.

Here is the call graph for this function:

◆ FormatBytes()

QString RPCConsole::FormatBytes ( quint64  bytes)
staticprivate

Definition at line 574 of file rpcconsole.cpp.

Here is the caller graph for this function:

◆ handleRestart

void RPCConsole::handleRestart ( QStringList  args)
signal

Get restart command-line parameters and handle restart.

Here is the caller graph for this function:

◆ hideEvent

void RPCConsole::hideEvent ( QHideEvent *  event)
privateslot

Definition at line 764 of file rpcconsole.cpp.

Here is the call graph for this function:

◆ message [1/2]

void RPCConsole::message ( int  category,
const QString &  message,
bool  html 
)
slot

Definition at line 427 of file rpcconsole.cpp.

Here is the call graph for this function:

◆ message [2/2]

void RPCConsole::message ( int  category,
const QString &  msg 
)
inlineslot

Definition at line 80 of file rpcconsole.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_lineEdit_returnPressed

void RPCConsole::on_lineEdit_returnPressed ( )
privateslot

Definition at line 488 of file rpcconsole.cpp.

Here is the call graph for this function:

◆ on_openDebugLogfileButton_clicked

void RPCConsole::on_openDebugLogfileButton_clicked ( )
privateslot

open the debug.log from the current datadir

Definition at line 556 of file rpcconsole.cpp.

Here is the call graph for this function:

◆ on_sldGraphRange_valueChanged

void RPCConsole::on_sldGraphRange_valueChanged ( int  value)
privateslot

change the time range of the network traffic graph

Definition at line 567 of file rpcconsole.cpp.

Here is the call graph for this function:

◆ on_tabWidget_currentChanged

void RPCConsole::on_tabWidget_currentChanged ( int  index)
privateslot

Definition at line 547 of file rpcconsole.cpp.

Here is the call graph for this function:

◆ peerLayoutChanged

void RPCConsole::peerLayoutChanged ( )
slot

Handle updated peer information.

Definition at line 650 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ peerSelected

void RPCConsole::peerSelected ( const QItemSelection &  selected,
const QItemSelection &  deselected 
)
slot

Handle selection of peer in peers list.

Definition at line 638 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reject

void RPCConsole::reject ( )
slot

Definition at line 420 of file rpcconsole.cpp.

◆ resizeEvent

void RPCConsole::resizeEvent ( QResizeEvent *  event)
privateslot

Definition at line 747 of file rpcconsole.cpp.

◆ scrollToEnd

void RPCConsole::scrollToEnd ( )
slot

Scroll console view to end.

Definition at line 561 of file rpcconsole.cpp.

Here is the caller graph for this function:

◆ setClientModel()

void RPCConsole::setClientModel ( ClientModel model)

Definition at line 173 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMasternodeCount

void RPCConsole::setMasternodeCount ( const QString &  strMasternodes)
slot

Set number of masternodes shown in the UI.

Definition at line 483 of file rpcconsole.cpp.

Here is the caller graph for this function:

◆ setNetworkActive

void RPCConsole::setNetworkActive ( bool  networkActive)
slot

Set network state shown in the UI.

Definition at line 468 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setNumBlocks

void RPCConsole::setNumBlocks ( int  count)
slot

Set number of blocks shown in the UI.

Definition at line 474 of file rpcconsole.cpp.

Here is the caller graph for this function:

◆ setNumConnections

void RPCConsole::setNumConnections ( int  count)
slot

Set number of connections shown in the UI.

Definition at line 460 of file rpcconsole.cpp.

Here is the caller graph for this function:

◆ setTrafficGraphRange()

void RPCConsole::setTrafficGraphRange ( int  mins)
private

Definition at line 586 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setWalletModel()

void RPCConsole::setWalletModel ( WalletModel model)

Definition at line 290 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ showBackups

void RPCConsole::showBackups ( )
slot

Show folder with wallet backups in default browser.

Definition at line 776 of file rpcconsole.cpp.

Here is the call graph for this function:

◆ showBanTableContextMenu

void RPCConsole::showBanTableContextMenu ( const QPoint &  point)
privateslot

Show custom context menu on Bans tab.

Definition at line 788 of file rpcconsole.cpp.

Here is the caller graph for this function:

◆ showConfEditor

void RPCConsole::showConfEditor ( )
slot

Open external (default) editor with pivx.conf.

Definition at line 628 of file rpcconsole.cpp.

Here is the call graph for this function:

◆ showConsole

void RPCConsole::showConsole ( )
slot

Switch to console tab and show.

Definition at line 604 of file rpcconsole.cpp.

◆ showEvent

void RPCConsole::showEvent ( QShowEvent *  event)
privateslot

Definition at line 752 of file rpcconsole.cpp.

Here is the call graph for this function:

◆ showInfo

void RPCConsole::showInfo ( )
slot

Switch to info tab and show.

Definition at line 598 of file rpcconsole.cpp.

◆ showMNConfEditor

void RPCConsole::showMNConfEditor ( )
slot

Open external (default) editor with masternode.conf.

Definition at line 633 of file rpcconsole.cpp.

Here is the call graph for this function:

◆ showNetwork

void RPCConsole::showNetwork ( )
slot

Switch to network tab and show.

Definition at line 610 of file rpcconsole.cpp.

Here is the caller graph for this function:

◆ showOrHideBanTableIfRequired

void RPCConsole::showOrHideBanTableIfRequired ( )
privateslot

Hides ban table if no bans are present.

Definition at line 861 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ showPeers

void RPCConsole::showPeers ( )
slot

Switch to peers tab and show.

Definition at line 616 of file rpcconsole.cpp.

◆ showPeersTableContextMenu

void RPCConsole::showPeersTableContextMenu ( const QPoint &  point)
privateslot

Show custom context menu on Peers tab.

Definition at line 781 of file rpcconsole.cpp.

Here is the caller graph for this function:

◆ showRepair

void RPCConsole::showRepair ( )
slot

Switch to wallet-repair tab and show.

Definition at line 622 of file rpcconsole.cpp.

◆ startExecutor()

void RPCConsole::startExecutor ( )
private

Definition at line 523 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stopExecutor

void RPCConsole::stopExecutor ( )
signal
Here is the caller graph for this function:

◆ unbanSelectedNode

void RPCConsole::unbanSelectedNode ( )
slot

Unban a selected node on the Bans tab.

Definition at line 836 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateNetworkState()

void RPCConsole::updateNetworkState ( int  num_connections)
private

Update UI with latest network info from model.

Definition at line 443 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateNodeDetail()

void RPCConsole::updateNodeDetail ( const CNodeCombinedStats stats)
private

show detailed information on ui about selected node

Definition at line 699 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateTrafficStats

void RPCConsole::updateTrafficStats ( quint64  totalBytesIn,
quint64  totalBytesOut 
)
privateslot

update traffic statistics

Definition at line 592 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ walletReindex

void RPCConsole::walletReindex ( )
slot

Restart wallet with "-reindex".

Definition at line 329 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ walletRescan

void RPCConsole::walletRescan ( )
slot

Restart wallet with "-rescan".

Definition at line 305 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ walletResync

void RPCConsole::walletResync ( )
slot

Restart wallet with "-resync".

Definition at line 335 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ walletSalvage

void RPCConsole::walletSalvage ( )
slot

Wallet repair options.

Restart wallet with "-salvagewallet".

Definition at line 299 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ walletUpgrade

void RPCConsole::walletUpgrade ( )
slot

Restart wallet with "-upgradewallet".

Definition at line 323 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ walletZaptxes1

void RPCConsole::walletZaptxes1 ( )
slot

Restart wallet with "-zapwallettxes=1".

Definition at line 311 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ walletZaptxes2

void RPCConsole::walletZaptxes2 ( )
slot

Restart wallet with "-zapwallettxes=2".

Definition at line 317 of file rpcconsole.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ autoCompleter

QCompleter* RPCConsole::autoCompleter
private

Definition at line 151 of file rpcconsole.h.

◆ banTableContextMenu

QMenu* RPCConsole::banTableContextMenu
private

Definition at line 153 of file rpcconsole.h.

◆ cachedNodeid

NodeId RPCConsole::cachedNodeid
private

Definition at line 150 of file rpcconsole.h.

◆ clientModel

ClientModel* RPCConsole::clientModel
private

Definition at line 146 of file rpcconsole.h.

◆ history

QStringList RPCConsole::history
private

Definition at line 148 of file rpcconsole.h.

◆ historyPtr

int RPCConsole::historyPtr
private

Definition at line 149 of file rpcconsole.h.

◆ peersTableContextMenu

QMenu* RPCConsole::peersTableContextMenu
private

Definition at line 152 of file rpcconsole.h.

◆ rpcTimerInterface

RPCTimerInterface* RPCConsole::rpcTimerInterface
private

Definition at line 154 of file rpcconsole.h.

◆ ui

Ui::RPCConsole* RPCConsole::ui
private

Definition at line 145 of file rpcconsole.h.

◆ walletModel

WalletModel* RPCConsole::walletModel
private

Definition at line 147 of file rpcconsole.h.


The documentation for this class was generated from the following files: