PRCYCoin  2.0.0.7rc1
P2P Digital Currency
Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Types | Private Slots | 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 Types

enum  MessageClass {
  MC_ERROR, MC_DEBUG, CMD_REQUEST, CMD_REPLY,
  CMD_ERROR
}
 

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 &message, bool html=false)
 
void setNumConnections (int count)
 Set number of connections 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 prcycoin.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 showDataDir ()
 Show DataDir folder in default browser. More...
 
void showQtDir ()
 Show Qt Dir folder in default browser. 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)
 

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...
 

Private Attributes

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

Detailed Description

Local Bitcoin RPC console.

Definition at line 30 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 142 of file rpcconsole.h.

◆ MessageClass

Enumerator
MC_ERROR 
MC_DEBUG 
CMD_REQUEST 
CMD_REPLY 
CMD_ERROR 

Definition at line 40 of file rpcconsole.h.

Constructor & Destructor Documentation

◆ RPCConsole()

RPCConsole::RPCConsole ( QWidget *  parent)
explicit

Definition at line 258 of file rpcconsole.cpp.

Here is the call graph for this function:

◆ ~RPCConsole()

RPCConsole::~RPCConsole ( )

Definition at line 327 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 1024 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 719 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 585 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 606 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 1072 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 1003 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 338 of file rpcconsole.cpp.

Here is the call 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 962 of file rpcconsole.cpp.

Here is the call graph for this function:

◆ message

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

Definition at line 655 of file rpcconsole.cpp.

Here is the caller graph for this function:

◆ on_lineEdit_returnPressed

void RPCConsole::on_lineEdit_returnPressed ( )
privateslot

Definition at line 697 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 765 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 776 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 756 of file rpcconsole.cpp.

Here is the call graph for this function:

◆ peerLayoutChanged

void RPCConsole::peerLayoutChanged ( )
slot

Handle updated peer information.

Definition at line 847 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 835 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 648 of file rpcconsole.cpp.

◆ resizeEvent

void RPCConsole::resizeEvent ( QResizeEvent *  event)
privateslot

Definition at line 945 of file rpcconsole.cpp.

◆ scrollToEnd

void RPCConsole::scrollToEnd ( )
slot

Scroll console view to end.

Definition at line 770 of file rpcconsole.cpp.

Here is the caller graph for this function:

◆ setClientModel()

void RPCConsole::setClientModel ( ClientModel model)

Definition at line 388 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 692 of file rpcconsole.cpp.

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 683 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 671 of file rpcconsole.cpp.

Here is the caller graph for this function:

◆ setTrafficGraphRange()

void RPCConsole::setTrafficGraphRange ( int  mins)
private

Definition at line 783 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 984 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 996 of file rpcconsole.cpp.

Here is the caller graph for this function:

◆ showConfEditor

void RPCConsole::showConfEditor ( )
slot

Open external (default) editor with prcycoin.conf.

Definition at line 825 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 801 of file rpcconsole.cpp.

◆ showDataDir

void RPCConsole::showDataDir ( )
slot

Show DataDir folder in default browser.

Definition at line 974 of file rpcconsole.cpp.

Here is the call graph for this function:

◆ showEvent

void RPCConsole::showEvent ( QShowEvent *  event)
privateslot

Definition at line 950 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 795 of file rpcconsole.cpp.

◆ showMNConfEditor

void RPCConsole::showMNConfEditor ( )
slot

Open external (default) editor with masternode.conf.

Definition at line 830 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 807 of file rpcconsole.cpp.

◆ showOrHideBanTableIfRequired

void RPCConsole::showOrHideBanTableIfRequired ( )
privateslot

Hides ban table if no bans are present.

Definition at line 1080 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 813 of file rpcconsole.cpp.

◆ showPeersTableContextMenu

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

Show custom context menu on Peers tab.

Definition at line 989 of file rpcconsole.cpp.

Here is the caller graph for this function:

◆ showQtDir

void RPCConsole::showQtDir ( )
slot

Show Qt Dir folder in default browser.

Definition at line 979 of file rpcconsole.cpp.

Here is the call graph for this function:

◆ showRepair

void RPCConsole::showRepair ( )
slot

Switch to wallet-repair tab and show.

Definition at line 819 of file rpcconsole.cpp.

◆ startExecutor()

void RPCConsole::startExecutor ( )
private

Definition at line 732 of file rpcconsole.cpp.

Here is the call 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 1056 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 897 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 789 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 558 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 534 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 564 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 528 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 552 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 540 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 546 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 155 of file rpcconsole.h.

◆ banTableContextMenu

QMenu* RPCConsole::banTableContextMenu
private

Definition at line 157 of file rpcconsole.h.

◆ cachedNodeid

NodeId RPCConsole::cachedNodeid
private

Definition at line 154 of file rpcconsole.h.

◆ clientModel

ClientModel* RPCConsole::clientModel
private

Definition at line 151 of file rpcconsole.h.

◆ history

QStringList RPCConsole::history
private

Definition at line 152 of file rpcconsole.h.

◆ historyPtr

int RPCConsole::historyPtr
private

Definition at line 153 of file rpcconsole.h.

◆ peersTableContextMenu

QMenu* RPCConsole::peersTableContextMenu
private

Definition at line 156 of file rpcconsole.h.

◆ rpcTimerInterface

RPCTimerInterface* RPCConsole::rpcTimerInterface
private

Definition at line 158 of file rpcconsole.h.

◆ ui

Ui::RPCConsole* RPCConsole::ui
private

Definition at line 150 of file rpcconsole.h.


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