Master Core  v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | 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:
+ Collaboration diagram for RPCConsole:

Public Types

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

Public Slots

void clear ()
 
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 browseHistory (int offset)
 Go forward or back in history. More...
 
void scrollToEnd ()
 Scroll console view to end. More...
 

Signals

void stopExecutor ()
 
void cmdRequest (const QString &command)
 

Public Member Functions

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

Protected Member Functions

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

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

Private Member Functions

void setTrafficGraphRange (int mins)
 
void startExecutor ()
 

Static Private Member Functions

static QString FormatBytes (quint64 bytes)
 

Private Attributes

Ui::RPCConsoleui
 
ClientModelclientModel
 
QStringList history
 
int historyPtr
 

Detailed Description

Local Bitcoin RPC console.

Definition at line 17 of file rpcconsole.h.

Member Enumeration Documentation

Enumerator
MC_ERROR 
MC_DEBUG 
CMD_REQUEST 
CMD_REPLY 
CMD_ERROR 

Definition at line 27 of file rpcconsole.h.

Constructor & Destructor Documentation

RPCConsole::RPCConsole ( QWidget parent)
explicit
RPCConsole::~RPCConsole ( )

Definition at line 221 of file rpcconsole.cpp.

References GUIUtil::saveWindowGeometry(), stopExecutor(), and ui.

+ Here is the call graph for this function:

Member Function Documentation

void RPCConsole::browseHistory ( int  offset)
slot

Go forward or back in history.

Definition at line 399 of file rpcconsole.cpp.

References history, historyPtr, Ui_RPCConsole::lineEdit, and ui.

Referenced by eventFilter().

+ Here is the caller graph for this function:

void RPCConsole::clear ( )
slot

Definition at line 301 of file rpcconsole.cpp.

References CMD_REPLY, history, historyPtr, ICON_MAPPING, ICON_SIZE(), Ui_RPCConsole::lineEdit, message(), Ui_RPCConsole::messagesWidget, source, ui, and url.

Referenced by RPCConsole().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void RPCConsole::cmdRequest ( const QString &  command)
signal

Definition at line 140 of file moc_rpcconsole.cpp.

Referenced by on_lineEdit_returnPressed(), and startExecutor().

+ Here is the caller graph for this function:

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

Definition at line 228 of file rpcconsole.cpp.

References browseHistory(), Ui_RPCConsole::lineEdit, Ui_RPCConsole::messagesWidget, and ui.

+ Here is the call graph for this function:

QString RPCConsole::FormatBytes ( quint64  bytes)
staticprivate

Definition at line 462 of file rpcconsole.cpp.

Referenced by updateTrafficStats().

+ Here is the caller graph for this function:

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

Definition at line 341 of file rpcconsole.cpp.

References categoryClass(), GUIUtil::HtmlEscape(), Ui_RPCConsole::messagesWidget, and ui.

Referenced by clear(), on_lineEdit_returnPressed(), and startExecutor().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void RPCConsole::on_lineEdit_returnPressed ( )
privateslot

Definition at line 376 of file rpcconsole.cpp.

References CMD_REQUEST, cmdRequest(), CONSOLE_HISTORY, history, historyPtr, Ui_RPCConsole::lineEdit, message(), scrollToEnd(), and ui.

+ Here is the call graph for this function:

void RPCConsole::on_openDebugLogfileButton_clicked ( )
privateslot

open the debug.log from the current datadir

Definition at line 444 of file rpcconsole.cpp.

References GUIUtil::openDebugLogfile().

+ Here is the call graph for this function:

void RPCConsole::on_sldGraphRange_valueChanged ( int  value)
privateslot

change the time range of the network traffic graph

Definition at line 455 of file rpcconsole.cpp.

References setTrafficGraphRange().

+ Here is the call graph for this function:

void RPCConsole::on_tabWidget_currentChanged ( int  index)
privateslot
void RPCConsole::reject ( )
slot

Definition at line 334 of file rpcconsole.cpp.

void RPCConsole::scrollToEnd ( )
slot

Scroll console view to end.

Definition at line 449 of file rpcconsole.cpp.

References Ui_RPCConsole::messagesWidget, and ui.

Referenced by on_lineEdit_returnPressed().

+ Here is the caller graph for this function:

void RPCConsole::setClientModel ( ClientModel model)

Definition at line 264 of file rpcconsole.cpp.

References Ui_RPCConsole::buildDate, clientModel, Ui_RPCConsole::clientName, ClientModel::clientName(), Ui_RPCConsole::clientVersion, ClientModel::formatBuildDate(), ClientModel::formatClientStartupTime(), ClientModel::formatFullVersion(), ClientModel::getNetworkName(), ClientModel::getNumBlocks(), ClientModel::getNumConnections(), ClientModel::getTotalBytesRecv(), ClientModel::getTotalBytesSent(), Ui_RPCConsole::networkName, TrafficGraphWidget::setClientModel(), setNumBlocks(), setNumConnections(), Ui_RPCConsole::startupTime, Ui_RPCConsole::trafficGraph, ui, and updateTrafficStats().

Referenced by BitcoinGUI::setClientModel().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void RPCConsole::setNumBlocks ( int  count)
slot

Set number of blocks shown in the UI.

Definition at line 369 of file rpcconsole.cpp.

References clientModel, ClientModel::getLastBlockDate(), Ui_RPCConsole::lastBlockTime, Ui_RPCConsole::numberOfBlocks, and ui.

Referenced by setClientModel().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void RPCConsole::setNumConnections ( int  count)
slot

Set number of connections shown in the UI.

Definition at line 357 of file rpcconsole.cpp.

References clientModel, CONNECTIONS_IN, CONNECTIONS_OUT, ClientModel::getNumConnections(), Ui_RPCConsole::numberOfConnections, and ui.

Referenced by setClientModel().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void RPCConsole::setTrafficGraphRange ( int  mins)
private

Definition at line 474 of file rpcconsole.cpp.

References Ui_RPCConsole::lblGraphRange, TrafficGraphWidget::setGraphRangeMins(), Ui_RPCConsole::trafficGraph, and ui.

Referenced by on_sldGraphRange_valueChanged(), and RPCConsole().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void RPCConsole::startExecutor ( )
private

Definition at line 412 of file rpcconsole.cpp.

References cmdRequest(), message(), and stopExecutor().

Referenced by RPCConsole().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void RPCConsole::stopExecutor ( )
signal

Definition at line 134 of file moc_rpcconsole.cpp.

Referenced by startExecutor(), and ~RPCConsole().

+ Here is the caller graph for this function:

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

update traffic statistics

Definition at line 490 of file rpcconsole.cpp.

References FormatBytes(), Ui_RPCConsole::lblBytesIn, Ui_RPCConsole::lblBytesOut, and ui.

Referenced by setClientModel().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

ClientModel* RPCConsole::clientModel
private

Definition at line 71 of file rpcconsole.h.

Referenced by setClientModel(), setNumBlocks(), and setNumConnections().

QStringList RPCConsole::history
private

Definition at line 72 of file rpcconsole.h.

Referenced by browseHistory(), clear(), and on_lineEdit_returnPressed().

int RPCConsole::historyPtr
private

Definition at line 73 of file rpcconsole.h.

Referenced by browseHistory(), clear(), and on_lineEdit_returnPressed().

Ui::RPCConsole* RPCConsole::ui
private

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