Bitcoin Core  0.15.99
P2P Digital Currency
Public Slots | Signals | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
BitcoinGUI Class Reference

Bitcoin GUI main class. More...

#include <bitcoingui.h>

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

Public Slots

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, const QDateTime &blockDate, double nVerificationProgress, bool headers)
 Set number of blocks and last block date shown in the UI. More...
 
void message (const QString &title, const QString &message, unsigned int style, bool *ret=nullptr)
 Notify the user of an event from the core network or transaction handling code. More...
 

Signals

void receivedURI (const QString &uri)
 Signal raised when a URI was entered or dragged to the GUI. More...
 

Public Member Functions

 BitcoinGUI (interfaces::Node &node, const PlatformStyle *platformStyle, const NetworkStyle *networkStyle, QWidget *parent=0)
 
 ~BitcoinGUI ()
 
void setClientModel (ClientModel *clientModel)
 Set the client model. More...
 

Public Attributes

bool enableWallet = false
 

Static Public Attributes

static const std::string DEFAULT_UIPLATFORM
 

Protected Member Functions

void changeEvent (QEvent *e)
 
void closeEvent (QCloseEvent *event)
 
void showEvent (QShowEvent *event)
 
void dragEnterEvent (QDragEnterEvent *event)
 
void dropEvent (QDropEvent *event)
 
bool eventFilter (QObject *object, QEvent *event)
 

Private Slots

void optionsClicked ()
 Show configuration dialog. More...
 
void aboutClicked ()
 Show about dialog. More...
 
void showDebugWindow ()
 Show debug window. More...
 
void showDebugWindowActivateConsole ()
 Show debug window and set focus to the console. More...
 
void showHelpMessageClicked ()
 Show help message dialog. More...
 
void trayIconActivated (QSystemTrayIcon::ActivationReason reason)
 Handle tray icon clicked. More...
 
void showNormalIfMinimized (bool fToggleHidden=false)
 Show window if hidden, unminimize when minimized, rise when obscured or show if hidden and fToggleHidden is true. More...
 
void toggleHidden ()
 Simply calls showNormalIfMinimized(true) for use in SLOT() macro. More...
 
void detectShutdown ()
 called by a timer to check if ShutdownRequested() has been set More...
 
void showProgress (const QString &title, int nProgress)
 Show progress dialog e.g. More...
 
void setTrayIconVisible (bool)
 When hideTrayIcon setting is changed in OptionsModel hide or show the icon accordingly. More...
 
void toggleNetworkActive ()
 Toggle networking. More...
 
void showModalOverlay ()
 

Private Member Functions

void createActions ()
 Create the main UI actions. More...
 
void createMenuBar ()
 Create the menu bar and sub-menus. More...
 
void createToolBars ()
 Create the toolbars. More...
 
void createTrayIcon (const NetworkStyle *networkStyle)
 Create system tray icon and notification. More...
 
void createTrayIconMenu ()
 Create system tray menu (or setup the dock menu) More...
 
void setWalletActionsEnabled (bool enabled)
 Enable or disable all wallet-related actions. More...
 
void subscribeToCoreSignals ()
 Connect core signals to GUI client. More...
 
void unsubscribeFromCoreSignals ()
 Disconnect core signals from GUI client. More...
 
void updateNetworkState ()
 Update UI with latest network info from model. More...
 
void updateHeadersSyncProgressLabel ()
 
void updateProxyIcon ()
 Set the proxy-enabled icon as shown in the UI. More...
 

Private Attributes

interfaces::Nodem_node
 
std::unique_ptr< interfaces::Handlerm_handler_message_box
 
std::unique_ptr< interfaces::Handlerm_handler_question
 
ClientModelclientModel = nullptr
 
WalletFramewalletFrame = nullptr
 
UnitDisplayStatusBarControlunitDisplayControl = nullptr
 
QLabel * labelWalletEncryptionIcon = nullptr
 
QLabel * labelWalletHDStatusIcon = nullptr
 
QLabel * labelProxyIcon = nullptr
 
QLabel * connectionsControl = nullptr
 
QLabel * labelBlocksIcon = nullptr
 
QLabel * progressBarLabel = nullptr
 
QProgressBar * progressBar = nullptr
 
QProgressDialog * progressDialog = nullptr
 
QMenuBar * appMenuBar = nullptr
 
QToolBar * appToolBar = nullptr
 
QAction * overviewAction = nullptr
 
QAction * historyAction = nullptr
 
QAction * quitAction = nullptr
 
QAction * sendCoinsAction = nullptr
 
QAction * sendCoinsMenuAction = nullptr
 
QAction * usedSendingAddressesAction = nullptr
 
QAction * usedReceivingAddressesAction = nullptr
 
QAction * signMessageAction = nullptr
 
QAction * verifyMessageAction = nullptr
 
QAction * aboutAction = nullptr
 
QAction * receiveCoinsAction = nullptr
 
QAction * receiveCoinsMenuAction = nullptr
 
QAction * optionsAction = nullptr
 
QAction * toggleHideAction = nullptr
 
QAction * encryptWalletAction = nullptr
 
QAction * backupWalletAction = nullptr
 
QAction * changePassphraseAction = nullptr
 
QAction * aboutQtAction = nullptr
 
QAction * openRPCConsoleAction = nullptr
 
QAction * openAction = nullptr
 
QAction * showHelpMessageAction = nullptr
 
QAction * m_wallet_selector_label_action = nullptr
 
QAction * m_wallet_selector_action = nullptr
 
QLabel * m_wallet_selector_label = nullptr
 
QComboBox * m_wallet_selector = nullptr
 
QSystemTrayIcon * trayIcon = nullptr
 
QMenu * trayIconMenu = nullptr
 
Notificatornotificator = nullptr
 
RPCConsolerpcConsole = nullptr
 
HelpMessageDialoghelpMessageDialog = nullptr
 
ModalOverlaymodalOverlay = nullptr
 
int prevBlocks = 0
 Keep track of previous number of blocks, to detect progress. More...
 
int spinnerFrame = 0
 
const PlatformStyleplatformStyle
 

Detailed Description

Bitcoin GUI main class.

This class represents the main window of the Bitcoin UI. It communicates with both the client and wallet models to give the user an up-to-date view of the current core state.

Definition at line 52 of file bitcoingui.h.

Constructor & Destructor Documentation

BitcoinGUI::BitcoinGUI ( interfaces::Node node,
const PlatformStyle platformStyle,
const NetworkStyle networkStyle,
QWidget *  parent = 0 
)
explicit

Definition at line 70 of file bitcoingui.cpp.

Here is the call graph for this function:

BitcoinGUI::~BitcoinGUI ( )

Definition at line 208 of file bitcoingui.cpp.

Here is the call graph for this function:

Member Function Documentation

void BitcoinGUI::aboutClicked ( )
privateslot

Show about dialog.

Definition at line 646 of file bitcoingui.cpp.

Here is the caller graph for this function:

void BitcoinGUI::changeEvent ( QEvent *  e)
protected

Definition at line 937 of file bitcoingui.cpp.

Here is the call graph for this function:

void BitcoinGUI::closeEvent ( QCloseEvent *  event)
protected

Definition at line 961 of file bitcoingui.cpp.

Here is the call graph for this function:

void BitcoinGUI::createActions ( )
private

Create the main UI actions.

Definition at line 225 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::createMenuBar ( )
private

Create the menu bar and sub-menus.

Definition at line 357 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::createToolBars ( )
private

Create the toolbars.

Definition at line 402 of file bitcoingui.cpp.

Here is the caller graph for this function:

void BitcoinGUI::createTrayIcon ( const NetworkStyle networkStyle)
private

Create system tray icon and notification.

Definition at line 576 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::createTrayIconMenu ( )
private

Create system tray menu (or setup the dock menu)

Definition at line 589 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::detectShutdown ( )
privateslot

called by a timer to check if ShutdownRequested() has been set

Definition at line 1156 of file bitcoingui.cpp.

Here is the call graph for this function:

void BitcoinGUI::dragEnterEvent ( QDragEnterEvent *  event)
protected

Definition at line 1011 of file bitcoingui.cpp.

void BitcoinGUI::dropEvent ( QDropEvent *  event)
protected

Definition at line 1018 of file bitcoingui.cpp.

bool BitcoinGUI::eventFilter ( QObject *  object,
QEvent *  event 
)
protected

Definition at line 1030 of file bitcoingui.cpp.

Here is the call graph for this function:

void BitcoinGUI::message ( const QString &  title,
const QString &  message,
unsigned int  style,
bool *  ret = nullptr 
)
slot

Notify the user of an event from the core network or transaction handling code.

Parameters
[in]titlethe message box / notification title
[in]messagethe displayed text
[in]stylemodality and style definitions (icon and used buttons - buttons only for message boxes)
See also
CClientUIInterface::MessageBoxFlags
Parameters
[in]retpointer to a bool that will be modified to whether Ok was clicked (modal only)

Definition at line 877 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::optionsClicked ( )
privateslot

Show configuration dialog.

Definition at line 636 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::receivedURI ( const QString &  uri)
signal

Signal raised when a URI was entered or dragged to the GUI.

Here is the caller graph for this function:

void BitcoinGUI::setClientModel ( ClientModel clientModel)

Set the client model.

The client model represents the part of the core that communicates with the P2P network, and is wallet-agnostic.

Definition at line 438 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::setNetworkActive ( bool  networkActive)
slot

Set network state shown in the UI.

Definition at line 753 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::setNumBlocks ( int  count,
const QDateTime &  blockDate,
double  nVerificationProgress,
bool  headers 
)
slot

Set number of blocks and last block date shown in the UI.

Definition at line 767 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::setNumConnections ( int  count)
slot

Set number of connections shown in the UI.

Definition at line 748 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::setTrayIconVisible ( bool  fHideTrayIcon)
privateslot

When hideTrayIcon setting is changed in OptionsModel hide or show the icon accordingly.

Definition at line 1189 of file bitcoingui.cpp.

Here is the caller graph for this function:

void BitcoinGUI::setWalletActionsEnabled ( bool  enabled)
private

Enable or disable all wallet-related actions.

Definition at line 558 of file bitcoingui.cpp.

Here is the caller graph for this function:

void BitcoinGUI::showDebugWindow ( )
privateslot

Show debug window.

Definition at line 655 of file bitcoingui.cpp.

Here is the caller graph for this function:

void BitcoinGUI::showDebugWindowActivateConsole ( )
privateslot

Show debug window and set focus to the console.

Definition at line 663 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::showEvent ( QShowEvent *  event)
protected

Definition at line 984 of file bitcoingui.cpp.

Here is the call graph for this function:

void BitcoinGUI::showHelpMessageClicked ( )
privateslot

Show help message dialog.

Definition at line 669 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::showModalOverlay ( )
privateslot

Definition at line 1197 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::showNormalIfMinimized ( bool  fToggleHidden = false)
privateslot

Show window if hidden, unminimize when minimized, rise when obscured or show if hidden and fToggleHidden is true.

Definition at line 1126 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::showProgress ( const QString &  title,
int  nProgress 
)
privateslot

Show progress dialog e.g.

for verifychain

Definition at line 1166 of file bitcoingui.cpp.

Here is the caller graph for this function:

void BitcoinGUI::subscribeToCoreSignals ( )
private

Connect core signals to GUI client.

Definition at line 1220 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::toggleHidden ( )
privateslot

Simply calls showNormalIfMinimized(true) for use in SLOT() macro.

Definition at line 1151 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::toggleNetworkActive ( )
privateslot

Toggle networking.

Definition at line 1234 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::trayIconActivated ( QSystemTrayIcon::ActivationReason  reason)
privateslot

Handle tray icon clicked.

Definition at line 626 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::unsubscribeFromCoreSignals ( )
private

Disconnect core signals from GUI client.

Definition at line 1227 of file bitcoingui.cpp.

Here is the caller graph for this function:

void BitcoinGUI::updateHeadersSyncProgressLabel ( )
private

Definition at line 758 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::updateNetworkState ( )
private

Update UI with latest network info from model.

Definition at line 719 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitcoinGUI::updateProxyIcon ( )
private

Set the proxy-enabled icon as shown in the UI.

Definition at line 1108 of file bitcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

QAction* BitcoinGUI::aboutAction = nullptr
private

Definition at line 114 of file bitcoingui.h.

QAction* BitcoinGUI::aboutQtAction = nullptr
private

Definition at line 122 of file bitcoingui.h.

QMenuBar* BitcoinGUI::appMenuBar = nullptr
private

Definition at line 103 of file bitcoingui.h.

QToolBar* BitcoinGUI::appToolBar = nullptr
private

Definition at line 104 of file bitcoingui.h.

QAction* BitcoinGUI::backupWalletAction = nullptr
private

Definition at line 120 of file bitcoingui.h.

QAction* BitcoinGUI::changePassphraseAction = nullptr
private

Definition at line 121 of file bitcoingui.h.

ClientModel* BitcoinGUI::clientModel = nullptr
private

Definition at line 90 of file bitcoingui.h.

QLabel* BitcoinGUI::connectionsControl = nullptr
private

Definition at line 97 of file bitcoingui.h.

const std::string BitcoinGUI::DEFAULT_UIPLATFORM
static
Initial value:
=
"other"

Definition at line 57 of file bitcoingui.h.

bool BitcoinGUI::enableWallet = false

Definition at line 76 of file bitcoingui.h.

QAction* BitcoinGUI::encryptWalletAction = nullptr
private

Definition at line 119 of file bitcoingui.h.

HelpMessageDialog* BitcoinGUI::helpMessageDialog = nullptr
private

Definition at line 136 of file bitcoingui.h.

QAction* BitcoinGUI::historyAction = nullptr
private

Definition at line 106 of file bitcoingui.h.

QLabel* BitcoinGUI::labelBlocksIcon = nullptr
private

Definition at line 98 of file bitcoingui.h.

QLabel* BitcoinGUI::labelProxyIcon = nullptr
private

Definition at line 96 of file bitcoingui.h.

QLabel* BitcoinGUI::labelWalletEncryptionIcon = nullptr
private

Definition at line 94 of file bitcoingui.h.

QLabel* BitcoinGUI::labelWalletHDStatusIcon = nullptr
private

Definition at line 95 of file bitcoingui.h.

std::unique_ptr<interfaces::Handler> BitcoinGUI::m_handler_message_box
private

Definition at line 88 of file bitcoingui.h.

std::unique_ptr<interfaces::Handler> BitcoinGUI::m_handler_question
private

Definition at line 89 of file bitcoingui.h.

interfaces::Node& BitcoinGUI::m_node
private

Definition at line 87 of file bitcoingui.h.

QComboBox* BitcoinGUI::m_wallet_selector = nullptr
private

Definition at line 130 of file bitcoingui.h.

QAction* BitcoinGUI::m_wallet_selector_action = nullptr
private

Definition at line 127 of file bitcoingui.h.

QLabel* BitcoinGUI::m_wallet_selector_label = nullptr
private

Definition at line 129 of file bitcoingui.h.

QAction* BitcoinGUI::m_wallet_selector_label_action = nullptr
private

Definition at line 126 of file bitcoingui.h.

ModalOverlay* BitcoinGUI::modalOverlay = nullptr
private

Definition at line 137 of file bitcoingui.h.

Notificator* BitcoinGUI::notificator = nullptr
private

Definition at line 134 of file bitcoingui.h.

QAction* BitcoinGUI::openAction = nullptr
private

Definition at line 124 of file bitcoingui.h.

QAction* BitcoinGUI::openRPCConsoleAction = nullptr
private

Definition at line 123 of file bitcoingui.h.

QAction* BitcoinGUI::optionsAction = nullptr
private

Definition at line 117 of file bitcoingui.h.

QAction* BitcoinGUI::overviewAction = nullptr
private

Definition at line 105 of file bitcoingui.h.

const PlatformStyle* BitcoinGUI::platformStyle
private

Definition at line 143 of file bitcoingui.h.

int BitcoinGUI::prevBlocks = 0
private

Keep track of previous number of blocks, to detect progress.

Definition at line 140 of file bitcoingui.h.

QProgressBar* BitcoinGUI::progressBar = nullptr
private

Definition at line 100 of file bitcoingui.h.

QLabel* BitcoinGUI::progressBarLabel = nullptr
private

Definition at line 99 of file bitcoingui.h.

QProgressDialog* BitcoinGUI::progressDialog = nullptr
private

Definition at line 101 of file bitcoingui.h.

QAction* BitcoinGUI::quitAction = nullptr
private

Definition at line 107 of file bitcoingui.h.

QAction* BitcoinGUI::receiveCoinsAction = nullptr
private

Definition at line 115 of file bitcoingui.h.

QAction* BitcoinGUI::receiveCoinsMenuAction = nullptr
private

Definition at line 116 of file bitcoingui.h.

RPCConsole* BitcoinGUI::rpcConsole = nullptr
private

Definition at line 135 of file bitcoingui.h.

QAction* BitcoinGUI::sendCoinsAction = nullptr
private

Definition at line 108 of file bitcoingui.h.

QAction* BitcoinGUI::sendCoinsMenuAction = nullptr
private

Definition at line 109 of file bitcoingui.h.

QAction* BitcoinGUI::showHelpMessageAction = nullptr
private

Definition at line 125 of file bitcoingui.h.

QAction* BitcoinGUI::signMessageAction = nullptr
private

Definition at line 112 of file bitcoingui.h.

int BitcoinGUI::spinnerFrame = 0
private

Definition at line 141 of file bitcoingui.h.

QAction* BitcoinGUI::toggleHideAction = nullptr
private

Definition at line 118 of file bitcoingui.h.

QSystemTrayIcon* BitcoinGUI::trayIcon = nullptr
private

Definition at line 132 of file bitcoingui.h.

QMenu* BitcoinGUI::trayIconMenu = nullptr
private

Definition at line 133 of file bitcoingui.h.

UnitDisplayStatusBarControl* BitcoinGUI::unitDisplayControl = nullptr
private

Definition at line 93 of file bitcoingui.h.

QAction* BitcoinGUI::usedReceivingAddressesAction = nullptr
private

Definition at line 111 of file bitcoingui.h.

QAction* BitcoinGUI::usedSendingAddressesAction = nullptr
private

Definition at line 110 of file bitcoingui.h.

QAction* BitcoinGUI::verifyMessageAction = nullptr
private

Definition at line 113 of file bitcoingui.h.

WalletFrame* BitcoinGUI::walletFrame = nullptr
private

Definition at line 91 of file bitcoingui.h.


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