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 (const PlatformStyle *platformStyle, const NetworkStyle *networkStyle, QWidget *parent=0)
 
 ~BitcoinGUI ()
 
void setClientModel (ClientModel *clientModel)
 Set the client model. More...
 

Public Attributes

bool enableWallet
 

Static Public Attributes

static const QString DEFAULT_WALLET = "~Default"
 Display name for default wallet name. More...
 
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 fRequestShutdown 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 ()
 

Private Attributes

ClientModelclientModel
 
WalletFramewalletFrame
 
UnitDisplayStatusBarControlunitDisplayControl
 
QLabel * labelWalletEncryptionIcon
 
QLabel * labelWalletHDStatusIcon
 
QLabel * connectionsControl
 
QLabel * labelBlocksIcon
 
QLabel * progressBarLabel
 
QProgressBar * progressBar
 
QProgressDialog * progressDialog
 
QMenuBar * appMenuBar
 
QAction * overviewAction
 
QAction * historyAction
 
QAction * quitAction
 
QAction * sendCoinsAction
 
QAction * sendCoinsMenuAction
 
QAction * usedSendingAddressesAction
 
QAction * usedReceivingAddressesAction
 
QAction * signMessageAction
 
QAction * verifyMessageAction
 
QAction * aboutAction
 
QAction * receiveCoinsAction
 
QAction * receiveCoinsMenuAction
 
QAction * optionsAction
 
QAction * toggleHideAction
 
QAction * encryptWalletAction
 
QAction * backupWalletAction
 
QAction * changePassphraseAction
 
QAction * aboutQtAction
 
QAction * openRPCConsoleAction
 
QAction * openAction
 
QAction * showHelpMessageAction
 
QSystemTrayIcon * trayIcon
 
QMenu * trayIconMenu
 
Notificatornotificator
 
RPCConsolerpcConsole
 
HelpMessageDialoghelpMessageDialog
 
ModalOverlaymodalOverlay
 
int prevBlocks
 Keep track of previous number of blocks, to detect progress. More...
 
int spinnerFrame
 
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 44 of file bitcoingui.h.

Constructor & Destructor Documentation

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

Definition at line 81 of file bitcoingui.cpp.

Here is the call graph for this function:

BitcoinGUI::~BitcoinGUI ( )

Definition at line 259 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 643 of file bitcoingui.cpp.

Here is the caller graph for this function:

void BitcoinGUI::changeEvent ( QEvent *  e)
protected

Definition at line 933 of file bitcoingui.cpp.

Here is the call graph for this function:

void BitcoinGUI::closeEvent ( QCloseEvent *  event)
protected

Definition at line 952 of file bitcoingui.cpp.

Here is the call graph for this function:

void BitcoinGUI::createActions ( )
private

Create the main UI actions.

Definition at line 275 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 407 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 452 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 573 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 586 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 fRequestShutdown has been set

Definition at line 1112 of file bitcoingui.cpp.

Here is the call graph for this function:

void BitcoinGUI::dragEnterEvent ( QDragEnterEvent *  event)
protected

Definition at line 999 of file bitcoingui.cpp.

void BitcoinGUI::dropEvent ( QDropEvent *  event)
protected

Definition at line 1006 of file bitcoingui.cpp.

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

Definition at line 1018 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 874 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 633 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 468 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 750 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 764 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 745 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 1145 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 555 of file bitcoingui.cpp.

Here is the caller graph for this function:

void BitcoinGUI::showDebugWindow ( )
privateslot

Show debug window.

Definition at line 652 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 660 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 975 of file bitcoingui.cpp.

Here is the call graph for this function:

void BitcoinGUI::showHelpMessageClicked ( )
privateslot

Show help message dialog.

Definition at line 666 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 1153 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 1082 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 1122 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 1176 of file bitcoingui.cpp.

Here is the caller graph for this function:

void BitcoinGUI::toggleHidden ( )
privateslot

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

Definition at line 1107 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 1190 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 623 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 1183 of file bitcoingui.cpp.

Here is the caller graph for this function:

void BitcoinGUI::updateHeadersSyncProgressLabel ( )
private

Definition at line 755 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 716 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
private

Definition at line 102 of file bitcoingui.h.

QAction* BitcoinGUI::aboutQtAction
private

Definition at line 110 of file bitcoingui.h.

QMenuBar* BitcoinGUI::appMenuBar
private

Definition at line 92 of file bitcoingui.h.

QAction* BitcoinGUI::backupWalletAction
private

Definition at line 108 of file bitcoingui.h.

QAction* BitcoinGUI::changePassphraseAction
private

Definition at line 109 of file bitcoingui.h.

ClientModel* BitcoinGUI::clientModel
private

Definition at line 80 of file bitcoingui.h.

QLabel* BitcoinGUI::connectionsControl
private

Definition at line 86 of file bitcoingui.h.

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

Definition at line 50 of file bitcoingui.h.

const QString BitcoinGUI::DEFAULT_WALLET = "~Default"
static

Display name for default wallet name.

Uses tilde to avoid name collisions in the future with additional wallets

Definition at line 49 of file bitcoingui.h.

bool BitcoinGUI::enableWallet

Definition at line 69 of file bitcoingui.h.

QAction* BitcoinGUI::encryptWalletAction
private

Definition at line 107 of file bitcoingui.h.

HelpMessageDialog* BitcoinGUI::helpMessageDialog
private

Definition at line 119 of file bitcoingui.h.

QAction* BitcoinGUI::historyAction
private

Definition at line 94 of file bitcoingui.h.

QLabel* BitcoinGUI::labelBlocksIcon
private

Definition at line 87 of file bitcoingui.h.

QLabel* BitcoinGUI::labelWalletEncryptionIcon
private

Definition at line 84 of file bitcoingui.h.

QLabel* BitcoinGUI::labelWalletHDStatusIcon
private

Definition at line 85 of file bitcoingui.h.

ModalOverlay* BitcoinGUI::modalOverlay
private

Definition at line 120 of file bitcoingui.h.

Notificator* BitcoinGUI::notificator
private

Definition at line 117 of file bitcoingui.h.

QAction* BitcoinGUI::openAction
private

Definition at line 112 of file bitcoingui.h.

QAction* BitcoinGUI::openRPCConsoleAction
private

Definition at line 111 of file bitcoingui.h.

QAction* BitcoinGUI::optionsAction
private

Definition at line 105 of file bitcoingui.h.

QAction* BitcoinGUI::overviewAction
private

Definition at line 93 of file bitcoingui.h.

const PlatformStyle* BitcoinGUI::platformStyle
private

Definition at line 126 of file bitcoingui.h.

int BitcoinGUI::prevBlocks
private

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

Definition at line 123 of file bitcoingui.h.

QProgressBar* BitcoinGUI::progressBar
private

Definition at line 89 of file bitcoingui.h.

QLabel* BitcoinGUI::progressBarLabel
private

Definition at line 88 of file bitcoingui.h.

QProgressDialog* BitcoinGUI::progressDialog
private

Definition at line 90 of file bitcoingui.h.

QAction* BitcoinGUI::quitAction
private

Definition at line 95 of file bitcoingui.h.

QAction* BitcoinGUI::receiveCoinsAction
private

Definition at line 103 of file bitcoingui.h.

QAction* BitcoinGUI::receiveCoinsMenuAction
private

Definition at line 104 of file bitcoingui.h.

RPCConsole* BitcoinGUI::rpcConsole
private

Definition at line 118 of file bitcoingui.h.

QAction* BitcoinGUI::sendCoinsAction
private

Definition at line 96 of file bitcoingui.h.

QAction* BitcoinGUI::sendCoinsMenuAction
private

Definition at line 97 of file bitcoingui.h.

QAction* BitcoinGUI::showHelpMessageAction
private

Definition at line 113 of file bitcoingui.h.

QAction* BitcoinGUI::signMessageAction
private

Definition at line 100 of file bitcoingui.h.

int BitcoinGUI::spinnerFrame
private

Definition at line 124 of file bitcoingui.h.

QAction* BitcoinGUI::toggleHideAction
private

Definition at line 106 of file bitcoingui.h.

QSystemTrayIcon* BitcoinGUI::trayIcon
private

Definition at line 115 of file bitcoingui.h.

QMenu* BitcoinGUI::trayIconMenu
private

Definition at line 116 of file bitcoingui.h.

UnitDisplayStatusBarControl* BitcoinGUI::unitDisplayControl
private

Definition at line 83 of file bitcoingui.h.

QAction* BitcoinGUI::usedReceivingAddressesAction
private

Definition at line 99 of file bitcoingui.h.

QAction* BitcoinGUI::usedSendingAddressesAction
private

Definition at line 98 of file bitcoingui.h.

QAction* BitcoinGUI::verifyMessageAction
private

Definition at line 101 of file bitcoingui.h.

WalletFrame* BitcoinGUI::walletFrame
private

Definition at line 81 of file bitcoingui.h.


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