Fabcoin Core  0.16.2
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
FabcoinGUI Class Reference

Fabcoin GUI main class. More...

#include <fabcoingui.h>

Inheritance diagram for FabcoinGUI:
[legend]
Collaboration diagram for FabcoinGUI:
[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...
 
void setTabBarInfo (QObject *into)
 

Signals

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

Public Member Functions

 FabcoinGUI (const PlatformStyle *platformStyle, const NetworkStyle *networkStyle, QWidget *parent=0)
 
 ~FabcoinGUI ()
 
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 updateStakingIcon ()
 Update staking icon. 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 ()
 
void showModalBackupOverlay ()
 

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 createTitleBars ()
 Create title bar. 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 addDockWindows (Qt::DockWidgetArea area, QWidget *widget)
 Add docking windows to the main windows. More...
 
void updateWeight (CWalletRef pwalletMain)
 Update the current weight of the wallet. More...
 

Private Attributes

ClientModelclientModel
 
WalletFramewalletFrame
 
UnitDisplayStatusBarControlunitDisplayControl
 
QLabel * labelWalletEncryptionIcon
 
QLabel * labelWalletHDStatusIcon
 
QLabel * connectionsControl
 
QLabel * labelBlocksIcon
 
QLabel * progressBarLabel
 
QLabel * labelStakingIcon
 
QProgressBar * progressBar
 
QProgressDialog * progressDialog
 
QMenuBar * appMenuBar
 
TitleBarappTitleBar
 
NavigationBarappNavigationBar
 
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 * restoreWalletAction
 
QAction * changePassphraseAction
 
QAction * unlockWalletAction
 
QAction * lockWalletAction
 
QAction * aboutQtAction
 
QAction * openRPCConsoleAction
 
QAction * openAction
 
QAction * showHelpMessageAction
 
QAction * smartContractAction
 
QAction * createContractAction
 
QAction * sendToContractAction
 
QAction * callContractAction
 
QAction * QRCTokenAction
 
QAction * sendTokenAction
 
QAction * receiveTokenAction
 
QAction * addTokenAction
 
QSystemTrayIcon * trayIcon
 
QMenu * trayIconMenu
 
Notificatornotificator
 
RPCConsolerpcConsole
 
HelpMessageDialoghelpMessageDialog
 
ModalOverlaymodalOverlay
 
FabcoinVersionCheckerfabcoinVersionChecker
 
ModalOverlaymodalBackupOverlay
 
int prevBlocks
 Keep track of previous number of blocks, to detect progress. More...
 
int spinnerFrame
 
const PlatformStyleplatformStyle
 
uint64_t nWeight
 Current weight of the wallet. More...
 

Detailed Description

Fabcoin GUI main class.

This class represents the main window of the Fabcoin 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 51 of file fabcoingui.h.

Constructor & Destructor Documentation

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

Definition at line 92 of file fabcoingui.cpp.

Here is the call graph for this function:

FabcoinGUI::~FabcoinGUI ( )

Definition at line 319 of file fabcoingui.cpp.

Here is the call graph for this function:

Member Function Documentation

void FabcoinGUI::aboutClicked ( )
privateslot

Show about dialog.

Definition at line 782 of file fabcoingui.cpp.

Here is the caller graph for this function:

void FabcoinGUI::addDockWindows ( Qt::DockWidgetArea  area,
QWidget *  widget 
)
private

Add docking windows to the main windows.

Definition at line 1501 of file fabcoingui.cpp.

Here is the caller graph for this function:

void FabcoinGUI::changeEvent ( QEvent *  e)
protected

Definition at line 1115 of file fabcoingui.cpp.

Here is the call graph for this function:

void FabcoinGUI::closeEvent ( QCloseEvent *  event)
protected

Definition at line 1134 of file fabcoingui.cpp.

Here is the call graph for this function:

void FabcoinGUI::createActions ( )
private

Create the main UI actions.

Definition at line 336 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::createMenuBar ( )
private

Create the menu bar and sub-menus.

Definition at line 512 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::createTitleBars ( )
private

Create title bar.

Definition at line 588 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::createToolBars ( )
private

Create the toolbars.

Definition at line 560 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::createTrayIcon ( const NetworkStyle networkStyle)
private

Create system tray icon and notification.

Definition at line 712 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::createTrayIconMenu ( )
private

Create system tray menu (or setup the dock menu)

Definition at line 725 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::detectShutdown ( )
privateslot

called by a timer to check if fRequestShutdown has been set

Definition at line 1402 of file fabcoingui.cpp.

Here is the call graph for this function:

void FabcoinGUI::dragEnterEvent ( QDragEnterEvent *  event)
protected

Definition at line 1194 of file fabcoingui.cpp.

void FabcoinGUI::dropEvent ( QDropEvent *  event)
protected

Definition at line 1201 of file fabcoingui.cpp.

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

Definition at line 1213 of file fabcoingui.cpp.

Here is the call graph for this function:

void FabcoinGUI::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 1056 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::optionsClicked ( )
privateslot

Show configuration dialog.

Definition at line 772 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Definition at line 344 of file moc_fabcoingui.cpp.

Here is the caller graph for this function:

void FabcoinGUI::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 599 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::setNetworkActive ( bool  networkActive)
slot

Set network state shown in the UI.

Definition at line 925 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::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 939 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::setNumConnections ( int  count)
slot

Set number of connections shown in the UI.

Definition at line 920 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::setTabBarInfo ( QObject *  into)
slot

Definition at line 1455 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::setTrayIconVisible ( bool  fHideTrayIcon)
privateslot

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

Definition at line 1435 of file fabcoingui.cpp.

Here is the caller graph for this function:

void FabcoinGUI::setWalletActionsEnabled ( bool  enabled)
private

Enable or disable all wallet-related actions.

Definition at line 693 of file fabcoingui.cpp.

Here is the caller graph for this function:

void FabcoinGUI::showDebugWindow ( )
privateslot

Show debug window.

Definition at line 791 of file fabcoingui.cpp.

Here is the caller graph for this function:

void FabcoinGUI::showDebugWindowActivateConsole ( )
privateslot

Show debug window and set focus to the console.

Definition at line 799 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::showEvent ( QShowEvent *  event)
protected

Definition at line 1157 of file fabcoingui.cpp.

Here is the call graph for this function:

void FabcoinGUI::showHelpMessageClicked ( )
privateslot

Show help message dialog.

Definition at line 805 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::showModalBackupOverlay ( )
privateslot

Definition at line 1449 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::showModalOverlay ( )
privateslot

Definition at line 1443 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::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 1291 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Show progress dialog e.g.

for verifychain

Definition at line 1412 of file fabcoingui.cpp.

Here is the caller graph for this function:

void FabcoinGUI::subscribeToCoreSignals ( )
private

Connect core signals to GUI client.

Definition at line 1480 of file fabcoingui.cpp.

Here is the caller graph for this function:

void FabcoinGUI::toggleHidden ( )
privateslot

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

Definition at line 1316 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::toggleNetworkActive ( )
privateslot

Toggle networking.

Definition at line 1494 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Handle tray icon clicked.

Definition at line 762 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::unsubscribeFromCoreSignals ( )
private

Disconnect core signals from GUI client.

Definition at line 1487 of file fabcoingui.cpp.

Here is the caller graph for this function:

void FabcoinGUI::updateHeadersSyncProgressLabel ( )
private

Definition at line 930 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::updateNetworkState ( )
private

Update UI with latest network info from model.

Definition at line 891 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::updateStakingIcon ( )
privateslot

Update staking icon.

Definition at line 1340 of file fabcoingui.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void FabcoinGUI::updateWeight ( CWalletRef  pwalletMain)
private

Update the current weight of the wallet.

Definition at line 1321 of file fabcoingui.cpp.

Here is the caller graph for this function:

Member Data Documentation

QAction* FabcoinGUI::aboutAction
private

Definition at line 112 of file fabcoingui.h.

QAction* FabcoinGUI::aboutQtAction
private

Definition at line 123 of file fabcoingui.h.

QAction* FabcoinGUI::addTokenAction
private

Definition at line 134 of file fabcoingui.h.

QMenuBar* FabcoinGUI::appMenuBar
private

Definition at line 100 of file fabcoingui.h.

NavigationBar* FabcoinGUI::appNavigationBar
private

Definition at line 102 of file fabcoingui.h.

TitleBar* FabcoinGUI::appTitleBar
private

Definition at line 101 of file fabcoingui.h.

QAction* FabcoinGUI::backupWalletAction
private

Definition at line 118 of file fabcoingui.h.

QAction* FabcoinGUI::callContractAction
private

Definition at line 130 of file fabcoingui.h.

QAction* FabcoinGUI::changePassphraseAction
private

Definition at line 120 of file fabcoingui.h.

ClientModel* FabcoinGUI::clientModel
private

Definition at line 87 of file fabcoingui.h.

QLabel* FabcoinGUI::connectionsControl
private

Definition at line 93 of file fabcoingui.h.

QAction* FabcoinGUI::createContractAction
private

Definition at line 128 of file fabcoingui.h.

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

Definition at line 57 of file fabcoingui.h.

const QString FabcoinGUI::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 56 of file fabcoingui.h.

bool FabcoinGUI::enableWallet

Definition at line 76 of file fabcoingui.h.

QAction* FabcoinGUI::encryptWalletAction
private

Definition at line 117 of file fabcoingui.h.

FabcoinVersionChecker* FabcoinGUI::fabcoinVersionChecker
private

Definition at line 142 of file fabcoingui.h.

HelpMessageDialog* FabcoinGUI::helpMessageDialog
private

Definition at line 140 of file fabcoingui.h.

QAction* FabcoinGUI::historyAction
private

Definition at line 104 of file fabcoingui.h.

QLabel* FabcoinGUI::labelBlocksIcon
private

Definition at line 94 of file fabcoingui.h.

QLabel* FabcoinGUI::labelStakingIcon
private

Definition at line 96 of file fabcoingui.h.

QLabel* FabcoinGUI::labelWalletEncryptionIcon
private

Definition at line 91 of file fabcoingui.h.

QLabel* FabcoinGUI::labelWalletHDStatusIcon
private

Definition at line 92 of file fabcoingui.h.

QAction* FabcoinGUI::lockWalletAction
private

Definition at line 122 of file fabcoingui.h.

ModalOverlay* FabcoinGUI::modalBackupOverlay
private

Definition at line 143 of file fabcoingui.h.

ModalOverlay* FabcoinGUI::modalOverlay
private

Definition at line 141 of file fabcoingui.h.

Notificator* FabcoinGUI::notificator
private

Definition at line 138 of file fabcoingui.h.

uint64_t FabcoinGUI::nWeight
private

Current weight of the wallet.

Definition at line 152 of file fabcoingui.h.

QAction* FabcoinGUI::openAction
private

Definition at line 125 of file fabcoingui.h.

QAction* FabcoinGUI::openRPCConsoleAction
private

Definition at line 124 of file fabcoingui.h.

QAction* FabcoinGUI::optionsAction
private

Definition at line 115 of file fabcoingui.h.

QAction* FabcoinGUI::overviewAction
private

Definition at line 103 of file fabcoingui.h.

const PlatformStyle* FabcoinGUI::platformStyle
private

Definition at line 149 of file fabcoingui.h.

int FabcoinGUI::prevBlocks
private

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

Definition at line 146 of file fabcoingui.h.

QProgressBar* FabcoinGUI::progressBar
private

Definition at line 97 of file fabcoingui.h.

QLabel* FabcoinGUI::progressBarLabel
private

Definition at line 95 of file fabcoingui.h.

QProgressDialog* FabcoinGUI::progressDialog
private

Definition at line 98 of file fabcoingui.h.

QAction* FabcoinGUI::QRCTokenAction
private

Definition at line 131 of file fabcoingui.h.

QAction* FabcoinGUI::quitAction
private

Definition at line 105 of file fabcoingui.h.

QAction* FabcoinGUI::receiveCoinsAction
private

Definition at line 113 of file fabcoingui.h.

QAction* FabcoinGUI::receiveCoinsMenuAction
private

Definition at line 114 of file fabcoingui.h.

QAction* FabcoinGUI::receiveTokenAction
private

Definition at line 133 of file fabcoingui.h.

QAction* FabcoinGUI::restoreWalletAction
private

Definition at line 119 of file fabcoingui.h.

RPCConsole* FabcoinGUI::rpcConsole
private

Definition at line 139 of file fabcoingui.h.

QAction* FabcoinGUI::sendCoinsAction
private

Definition at line 106 of file fabcoingui.h.

QAction* FabcoinGUI::sendCoinsMenuAction
private

Definition at line 107 of file fabcoingui.h.

QAction* FabcoinGUI::sendToContractAction
private

Definition at line 129 of file fabcoingui.h.

QAction* FabcoinGUI::sendTokenAction
private

Definition at line 132 of file fabcoingui.h.

QAction* FabcoinGUI::showHelpMessageAction
private

Definition at line 126 of file fabcoingui.h.

QAction* FabcoinGUI::signMessageAction
private

Definition at line 110 of file fabcoingui.h.

QAction* FabcoinGUI::smartContractAction
private

Definition at line 127 of file fabcoingui.h.

int FabcoinGUI::spinnerFrame
private

Definition at line 147 of file fabcoingui.h.

QAction* FabcoinGUI::toggleHideAction
private

Definition at line 116 of file fabcoingui.h.

QSystemTrayIcon* FabcoinGUI::trayIcon
private

Definition at line 136 of file fabcoingui.h.

QMenu* FabcoinGUI::trayIconMenu
private

Definition at line 137 of file fabcoingui.h.

UnitDisplayStatusBarControl* FabcoinGUI::unitDisplayControl
private

Definition at line 90 of file fabcoingui.h.

QAction* FabcoinGUI::unlockWalletAction
private

Definition at line 121 of file fabcoingui.h.

QAction* FabcoinGUI::usedReceivingAddressesAction
private

Definition at line 109 of file fabcoingui.h.

QAction* FabcoinGUI::usedSendingAddressesAction
private

Definition at line 108 of file fabcoingui.h.

QAction* FabcoinGUI::verifyMessageAction
private

Definition at line 111 of file fabcoingui.h.

WalletFrame* FabcoinGUI::walletFrame
private

Definition at line 88 of file fabcoingui.h.


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