![]() |
Master Core
v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
|
Bitcoin GUI main class. More...
#include <bitcoingui.h>
Inheritance diagram for BitcoinGUI:
Collaboration diagram for BitcoinGUI:Public Slots | |
| 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 | message (const QString &title, const QString &message, unsigned int style, bool *ret=NULL) |
| 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 (bool fIsTestnet=false, QWidget *parent=0) | |
| ~BitcoinGUI () | |
| void | setClientModel (ClientModel *clientModel) |
| Set the client model. More... | |
Static Public Attributes | |
| static const QString | DEFAULT_WALLET = "~Default" |
Protected Member Functions | |
| void | changeEvent (QEvent *e) |
| void | closeEvent (QCloseEvent *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 | 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... | |
Private Member Functions | |
| void | createActions (bool fIsTestnet) |
| Create the main UI actions. More... | |
| void | createMenuBar () |
| Create the menu bar and sub-menus. More... | |
| void | createToolBars () |
| Create the toolbars. More... | |
| void | createTrayIcon (bool fIsTestnet) |
| 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... | |
Private Attributes | |
| ClientModel * | clientModel |
| WalletFrame * | walletFrame |
| QLabel * | labelEncryptionIcon |
| QLabel * | labelConnectionsIcon |
| QLabel * | labelBlocksIcon |
| QLabel * | progressBarLabel |
| QProgressBar * | progressBar |
| QMenuBar * | appMenuBar |
| QAction * | overviewAction |
| QAction * | balancesAction |
| QAction * | historyAction |
| QAction * | quitAction |
| QAction * | sendCoinsAction |
| QAction * | usedSendingAddressesAction |
| QAction * | usedReceivingAddressesAction |
| QAction * | signMessageAction |
| QAction * | verifyMessageAction |
| QAction * | aboutAction |
| QAction * | receiveCoinsAction |
| QAction * | optionsAction |
| QAction * | toggleHideAction |
| QAction * | encryptWalletAction |
| QAction * | backupWalletAction |
| QAction * | changePassphraseAction |
| QAction * | aboutQtAction |
| QAction * | openRPCConsoleAction |
| QAction * | openAction |
| QAction * | showHelpMessageAction |
| QSystemTrayIcon * | trayIcon |
| Notificator * | notificator |
| RPCConsole * | rpcConsole |
| int | prevBlocks |
| Keep track of previous number of blocks, to detect progress. More... | |
| int | spinnerFrame |
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 35 of file bitcoingui.h.
|
explicit |
Definition at line 60 of file bitcoingui.cpp.
References createActions(), createMenuBar(), createToolBars(), createTrayIcon(), GetBoolArg(), MacDockIconHandler::instance(), labelBlocksIcon, labelConnectionsIcon, labelEncryptionIcon, openRPCConsoleAction, progressBar, progressBarLabel, quitAction, GUIUtil::restoreWindowGeometry(), rpcConsole, MacDockIconHandler::setIcon(), setWalletActionsEnabled(), subscribeToCoreSignals(), and walletFrame.
Here is the call graph for this function:| BitcoinGUI::~BitcoinGUI | ( | ) |
Definition at line 204 of file bitcoingui.cpp.
References appMenuBar, MacDockIconHandler::instance(), GUIUtil::saveWindowGeometry(), MacDockIconHandler::setMainWindow(), trayIcon, and unsubscribeFromCoreSignals().
Here is the call graph for this function:
|
privateslot |
Show about dialog.
Definition at line 554 of file bitcoingui.cpp.
References clientModel, and AboutDialog::setModel().
Referenced by createActions().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 807 of file bitcoingui.cpp.
References clientModel, OptionsModel::getMinimizeToTray(), and ClientModel::getOptionsModel().
Here is the call graph for this function:
|
protected |
Definition at line 826 of file bitcoingui.cpp.
References clientModel, OptionsModel::getMinimizeOnClose(), OptionsModel::getMinimizeToTray(), and ClientModel::getOptionsModel().
Here is the call graph for this function:
|
private |
Create the main UI actions.
Definition at line 218 of file bitcoingui.cpp.
References aboutAction, aboutClicked(), aboutQtAction, backupWalletAction, balancesAction, changePassphraseAction, encryptWalletAction, historyAction, openAction, openRPCConsoleAction, optionsAction, optionsClicked(), overviewAction, quitAction, receiveCoinsAction, sendCoinsAction, showHelpMessageAction, showHelpMessageClicked(), showNormalIfMinimized(), signMessageAction, toggleHidden(), toggleHideAction, usedReceivingAddressesAction, usedSendingAddressesAction, verifyMessageAction, and walletFrame.
Referenced by BitcoinGUI().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Create the menu bar and sub-menus.
Definition at line 343 of file bitcoingui.cpp.
References aboutAction, aboutQtAction, appMenuBar, backupWalletAction, changePassphraseAction, encryptWalletAction, help(), openAction, openRPCConsoleAction, optionsAction, quitAction, showHelpMessageAction, signMessageAction, usedReceivingAddressesAction, usedSendingAddressesAction, verifyMessageAction, and walletFrame.
Referenced by BitcoinGUI().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Create the toolbars.
Definition at line 388 of file bitcoingui.cpp.
References balancesAction, historyAction, overviewAction, receiveCoinsAction, sendCoinsAction, and walletFrame.
Referenced by BitcoinGUI().
Here is the caller graph for this function:
|
private |
Create system tray icon and notification.
Definition at line 474 of file bitcoingui.cpp.
References notificator, and trayIcon.
Referenced by BitcoinGUI().
Here is the caller graph for this function:
|
private |
Create system tray menu (or setup the dock menu)
Definition at line 496 of file bitcoingui.cpp.
References MacDockIconHandler::dockMenu(), MacDockIconHandler::instance(), openRPCConsoleAction, optionsAction, quitAction, receiveCoinsAction, sendCoinsAction, MacDockIconHandler::setMainWindow(), signMessageAction, toggleHideAction, trayIcon, trayIconActivated(), and verifyMessageAction.
Referenced by setClientModel().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privateslot |
called by a timer to check if fRequestShutdown has been set
Definition at line 959 of file bitcoingui.cpp.
References rpcConsole, and ShutdownRequested().
Here is the call graph for this function:
|
protected |
Definition at line 857 of file bitcoingui.cpp.
|
protected |
Definition at line 864 of file bitcoingui.cpp.
References receivedURI().
|
protected |
Definition at line 876 of file bitcoingui.cpp.
References progressBar, and progressBarLabel.
|
slot |
Notify the user of an event from the core network or transaction handling code.
| [in] | title | the message box / notification title |
| [in] | message | the displayed text |
| [in] | style | modality and style definitions (icon and used buttons - buttons only for message boxes) |
| [in] | ret | pointer to a bool that will be modified to whether Ok was clicked (modal only) |
Definition at line 744 of file bitcoingui.cpp.
References CClientUIInterface::BTN_MASK, Notificator::Critical, CClientUIInterface::ICON_ERROR, CClientUIInterface::ICON_WARNING, Notificator::Information, CClientUIInterface::MODAL, CClientUIInterface::MSG_ERROR, CClientUIInterface::MSG_INFORMATION, CClientUIInterface::MSG_WARNING, CClientUIInterface::NOSHOWGUI, notificator, Notificator::notify(), showNormalIfMinimized(), and Notificator::Warning.
Referenced by setClientModel().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privateslot |
Show configuration dialog.
Definition at line 544 of file bitcoingui.cpp.
References clientModel, ClientModel::getOptionsModel(), and OptionsDialog::setModel().
Referenced by createActions().
Here is the call graph for this function:
Here is the caller graph for this function:
|
signal |
Signal raised when a URI was entered or dragged to the GUI.
Definition at line 168 of file moc_bitcoingui.cpp.
Referenced by dropEvent().
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 403 of file bitcoingui.cpp.
References clientModel, createTrayIconMenu(), ClientModel::getNumBlocks(), ClientModel::getNumConnections(), message(), rpcConsole, RPCConsole::setClientModel(), WalletFrame::setClientModel(), setNumBlocks(), setNumConnections(), and walletFrame.
Referenced by BitcoinApplication::initializeResult(), and BitcoinApplication::requestShutdown().
Here is the call graph for this function:
Here is the caller graph for this function:
|
slot |
Set number of blocks shown in the UI.
Definition at line 637 of file bitcoingui.cpp.
References BLOCK_SOURCE_DISK, BLOCK_SOURCE_NETWORK, BLOCK_SOURCE_NONE, BLOCK_SOURCE_REINDEX, clientModel, ClientModel::getBlockSource(), ClientModel::getLastBlockDate(), ClientModel::getVerificationProgress(), labelBlocksIcon, prevBlocks, progressBar, progressBarLabel, WalletFrame::showOutOfSyncWarning(), SPINNER_FRAMES, spinnerFrame, STATUSBAR_ICONSIZE, and walletFrame.
Referenced by setClientModel().
Here is the call graph for this function:
Here is the caller graph for this function:
|
slot |
Set number of connections shown in the UI.
Definition at line 622 of file bitcoingui.cpp.
References labelConnectionsIcon, and STATUSBAR_ICONSIZE.
Referenced by setClientModel().
Here is the caller graph for this function:
|
private |
Enable or disable all wallet-related actions.
Definition at line 457 of file bitcoingui.cpp.
References backupWalletAction, balancesAction, changePassphraseAction, encryptWalletAction, historyAction, openAction, overviewAction, receiveCoinsAction, sendCoinsAction, signMessageAction, usedReceivingAddressesAction, usedSendingAddressesAction, and verifyMessageAction.
Referenced by BitcoinGUI().
Here is the caller graph for this function:
|
privateslot |
Show help message dialog.
Definition at line 564 of file bitcoingui.cpp.
References help().
Referenced by createActions().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privateslot |
Show window if hidden, unminimize when minimized, rise when obscured or show if hidden and fToggleHidden is true.
Definition at line 932 of file bitcoingui.cpp.
References GUIUtil::isObscured().
Referenced by createActions(), message(), and toggleHidden().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Connect core signals to GUI client.
Definition at line 983 of file bitcoingui.cpp.
References CClientUIInterface::ThreadSafeMessageBox, ThreadSafeMessageBox(), and uiInterface.
Referenced by BitcoinGUI().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privateslot |
Simply calls showNormalIfMinimized(true) for use in SLOT() macro.
Definition at line 954 of file bitcoingui.cpp.
References showNormalIfMinimized().
Referenced by createActions().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privateslot |
Handle tray icon clicked.
Definition at line 534 of file bitcoingui.cpp.
References toggleHideAction.
Referenced by createTrayIconMenu().
Here is the caller graph for this function:
|
private |
Disconnect core signals from GUI client.
Definition at line 989 of file bitcoingui.cpp.
References CClientUIInterface::ThreadSafeMessageBox, ThreadSafeMessageBox(), and uiInterface.
Referenced by ~BitcoinGUI().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 87 of file bitcoingui.h.
Referenced by createActions(), and createMenuBar().
|
private |
Definition at line 94 of file bitcoingui.h.
Referenced by createActions(), and createMenuBar().
|
private |
Definition at line 77 of file bitcoingui.h.
Referenced by createMenuBar(), and ~BitcoinGUI().
|
private |
Definition at line 92 of file bitcoingui.h.
Referenced by createActions(), createMenuBar(), and setWalletActionsEnabled().
|
private |
Definition at line 79 of file bitcoingui.h.
Referenced by createActions(), createToolBars(), and setWalletActionsEnabled().
|
private |
Definition at line 93 of file bitcoingui.h.
Referenced by createActions(), createMenuBar(), and setWalletActionsEnabled().
|
private |
Definition at line 68 of file bitcoingui.h.
Referenced by aboutClicked(), changeEvent(), closeEvent(), optionsClicked(), setClientModel(), and setNumBlocks().
|
static |
Definition at line 40 of file bitcoingui.h.
|
private |
Definition at line 91 of file bitcoingui.h.
Referenced by createActions(), createMenuBar(), and setWalletActionsEnabled().
|
private |
Definition at line 80 of file bitcoingui.h.
Referenced by createActions(), createToolBars(), and setWalletActionsEnabled().
|
private |
Definition at line 73 of file bitcoingui.h.
Referenced by BitcoinGUI(), and setNumBlocks().
|
private |
Definition at line 72 of file bitcoingui.h.
Referenced by BitcoinGUI(), and setNumConnections().
|
private |
Definition at line 71 of file bitcoingui.h.
Referenced by BitcoinGUI().
|
private |
Definition at line 100 of file bitcoingui.h.
Referenced by createTrayIcon(), and message().
|
private |
Definition at line 96 of file bitcoingui.h.
Referenced by createActions(), createMenuBar(), and setWalletActionsEnabled().
|
private |
Definition at line 95 of file bitcoingui.h.
Referenced by BitcoinGUI(), createActions(), createMenuBar(), and createTrayIconMenu().
|
private |
Definition at line 89 of file bitcoingui.h.
Referenced by createActions(), createMenuBar(), and createTrayIconMenu().
|
private |
Definition at line 78 of file bitcoingui.h.
Referenced by createActions(), createToolBars(), and setWalletActionsEnabled().
|
private |
Keep track of previous number of blocks, to detect progress.
Definition at line 104 of file bitcoingui.h.
Referenced by setNumBlocks().
|
private |
Definition at line 75 of file bitcoingui.h.
Referenced by BitcoinGUI(), eventFilter(), and setNumBlocks().
|
private |
Definition at line 74 of file bitcoingui.h.
Referenced by BitcoinGUI(), eventFilter(), and setNumBlocks().
|
private |
Definition at line 81 of file bitcoingui.h.
Referenced by BitcoinGUI(), createActions(), createMenuBar(), and createTrayIconMenu().
|
private |
Definition at line 88 of file bitcoingui.h.
Referenced by createActions(), createToolBars(), createTrayIconMenu(), and setWalletActionsEnabled().
|
private |
Definition at line 101 of file bitcoingui.h.
Referenced by BitcoinGUI(), detectShutdown(), and setClientModel().
|
private |
Definition at line 82 of file bitcoingui.h.
Referenced by createActions(), createToolBars(), createTrayIconMenu(), and setWalletActionsEnabled().
|
private |
Definition at line 97 of file bitcoingui.h.
Referenced by createActions(), and createMenuBar().
|
private |
Definition at line 85 of file bitcoingui.h.
Referenced by createActions(), createMenuBar(), createTrayIconMenu(), and setWalletActionsEnabled().
|
private |
Definition at line 105 of file bitcoingui.h.
Referenced by setNumBlocks().
|
private |
Definition at line 90 of file bitcoingui.h.
Referenced by createActions(), createTrayIconMenu(), and trayIconActivated().
|
private |
Definition at line 99 of file bitcoingui.h.
Referenced by createTrayIcon(), createTrayIconMenu(), and ~BitcoinGUI().
|
private |
Definition at line 84 of file bitcoingui.h.
Referenced by createActions(), createMenuBar(), and setWalletActionsEnabled().
|
private |
Definition at line 83 of file bitcoingui.h.
Referenced by createActions(), createMenuBar(), and setWalletActionsEnabled().
|
private |
Definition at line 86 of file bitcoingui.h.
Referenced by createActions(), createMenuBar(), createTrayIconMenu(), and setWalletActionsEnabled().
|
private |
Definition at line 69 of file bitcoingui.h.
Referenced by BitcoinGUI(), createActions(), createMenuBar(), createToolBars(), setClientModel(), and setNumBlocks().
1.8.8