Raven Core  3.0.0
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
RavenGUI Class Reference

Raven GUI main class. More...

#include <ravengui.h>

Inheritance diagram for RavenGUI:
[legend]
Collaboration diagram for RavenGUI:
[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 handleRestart (QStringList args)
 Get restart command-line parameters and request restart. 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 getPriceInfo ()
 

Signals

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

Public Member Functions

 RavenGUI (const PlatformStyle *platformStyle, const NetworkStyle *networkStyle, QWidget *parent=0)
 
 ~RavenGUI ()
 
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 showWalletRepair ()
 Show debug window and set focus to the wallet repair tab. 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 loadFonts ()
 Load the custome open sans fonts into the font database. More...
 
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 * openWalletRepairAction
 
QAction * openAction
 
QAction * showHelpMessageAction
 
QAction * transferAssetAction
 RVN START. More...
 
QAction * createAssetAction
 
QAction * manageAssetAction
 
QAction * messagingAction
 
QAction * votingAction
 
QWidget * headerWidget
 
QLabel * labelCurrentMarket
 
QLabel * labelCurrentPrice
 
QTimer * pricingTimer
 
QNetworkAccessManager * networkManager
 
QNetworkRequest * request
 
QSystemTrayIcon * trayIcon
 RVN END. More...
 
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

Raven GUI main class.

This class represents the main window of the Raven 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 47 of file ravengui.h.

Constructor & Destructor Documentation

◆ RavenGUI()

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

RVN START

RVN END

Definition at line 96 of file ravengui.cpp.

Here is the call graph for this function:

◆ ~RavenGUI()

RavenGUI::~RavenGUI ( )

Definition at line 310 of file ravengui.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ aboutClicked

void RavenGUI::aboutClicked ( )
privateslot

Show about dialog.

Definition at line 973 of file ravengui.cpp.

Here is the caller graph for this function:

◆ changeEvent()

void RavenGUI::changeEvent ( QEvent *  e)
protected

Definition at line 1290 of file ravengui.cpp.

Here is the call graph for this function:

◆ closeEvent()

void RavenGUI::closeEvent ( QCloseEvent *  event)
protected

Definition at line 1309 of file ravengui.cpp.

Here is the call graph for this function:

◆ createActions()

void RavenGUI::createActions ( )
private

Create the main UI actions.

RVN START

RVN END

Definition at line 342 of file ravengui.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createMenuBar()

void RavenGUI::createMenuBar ( )
private

Create the menu bar and sub-menus.

Definition at line 543 of file ravengui.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createToolBars()

void RavenGUI::createToolBars ( )
private

Create the toolbars.

RVN START

RVN END

RVN START

Create the shadow effects for the main wallet frame. Make it so it puts a shadow on the tool bar

RVN END

Definition at line 589 of file ravengui.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createTrayIcon()

void RavenGUI::createTrayIcon ( const NetworkStyle networkStyle)
private

Create system tray icon and notification.

Definition at line 903 of file ravengui.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createTrayIconMenu()

void RavenGUI::createTrayIconMenu ( )
private

Create system tray menu (or setup the dock menu)

Definition at line 916 of file ravengui.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ detectShutdown

void RavenGUI::detectShutdown ( )
privateslot

called by a timer to check if fRequestShutdown has been set

Definition at line 1493 of file ravengui.cpp.

Here is the call graph for this function:

◆ dragEnterEvent()

void RavenGUI::dragEnterEvent ( QDragEnterEvent *  event)
protected

Definition at line 1380 of file ravengui.cpp.

◆ dropEvent()

void RavenGUI::dropEvent ( QDropEvent *  event)
protected

Definition at line 1387 of file ravengui.cpp.

◆ eventFilter()

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

Definition at line 1399 of file ravengui.cpp.

Here is the call graph for this function:

◆ getPriceInfo

void RavenGUI::getPriceInfo ( )
slot

Definition at line 1660 of file ravengui.cpp.

Here is the caller graph for this function:

◆ handleRestart

void RavenGUI::handleRestart ( QStringList  args)
slot

Get restart command-line parameters and request restart.

Definition at line 1579 of file ravengui.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadFonts()

void RavenGUI::loadFonts ( )
private

Load the custome open sans fonts into the font database.

Definition at line 327 of file ravengui.cpp.

Here is the caller graph for this function:

◆ message

void RavenGUI::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 1231 of file ravengui.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ optionsClicked

void RavenGUI::optionsClicked ( )
privateslot

Show configuration dialog.

Definition at line 963 of file ravengui.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ receivedURI

void RavenGUI::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:

◆ requestedRestart

void RavenGUI::requestedRestart ( QStringList  args)
signal

Restart handling.

Here is the caller graph for this function:

◆ setClientModel()

void RavenGUI::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 790 of file ravengui.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setNetworkActive

void RavenGUI::setNetworkActive ( bool  networkActive)
slot

Set network state shown in the UI.

Definition at line 1106 of file ravengui.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setNumBlocks

void RavenGUI::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 1120 of file ravengui.cpp.

Here is the caller graph for this function:

◆ setNumConnections

void RavenGUI::setNumConnections ( int  count)
slot

Set number of connections shown in the UI.

Definition at line 1101 of file ravengui.cpp.

Here is the caller graph for this function:

◆ setTrayIconVisible

void RavenGUI::setTrayIconVisible ( bool  fHideTrayIcon)
privateslot

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

Definition at line 1526 of file ravengui.cpp.

Here is the caller graph for this function:

◆ setWalletActionsEnabled()

void RavenGUI::setWalletActionsEnabled ( bool  enabled)
private

Enable or disable all wallet-related actions.

RVN START

RVN END

Definition at line 877 of file ravengui.cpp.

Here is the caller graph for this function:

◆ showDebugWindow

void RavenGUI::showDebugWindow ( )
privateslot

Show debug window.

Definition at line 982 of file ravengui.cpp.

Here is the caller graph for this function:

◆ showDebugWindowActivateConsole

void RavenGUI::showDebugWindowActivateConsole ( )
privateslot

Show debug window and set focus to the console.

Definition at line 990 of file ravengui.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ showEvent()

void RavenGUI::showEvent ( QShowEvent *  event)
protected

Definition at line 1332 of file ravengui.cpp.

Here is the call graph for this function:

◆ showHelpMessageClicked

void RavenGUI::showHelpMessageClicked ( )
privateslot

Show help message dialog.

Definition at line 1002 of file ravengui.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ showModalOverlay

void RavenGUI::showModalOverlay ( )
privateslot

Definition at line 1534 of file ravengui.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ showNormalIfMinimized

void RavenGUI::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 1463 of file ravengui.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ showProgress

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

Show progress dialog e.g.

for verifychain

Definition at line 1503 of file ravengui.cpp.

Here is the caller graph for this function:

◆ showWalletRepair

void RavenGUI::showWalletRepair ( )
privateslot

Show debug window and set focus to the wallet repair tab.

Definition at line 996 of file ravengui.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ subscribeToCoreSignals()

void RavenGUI::subscribeToCoreSignals ( )
private

Connect core signals to GUI client.

Definition at line 1557 of file ravengui.cpp.

Here is the caller graph for this function:

◆ toggleHidden

void RavenGUI::toggleHidden ( )
privateslot

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

Definition at line 1488 of file ravengui.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toggleNetworkActive

void RavenGUI::toggleNetworkActive ( )
privateslot

Toggle networking.

Definition at line 1571 of file ravengui.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ trayIconActivated

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

Handle tray icon clicked.

Definition at line 953 of file ravengui.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unsubscribeFromCoreSignals()

void RavenGUI::unsubscribeFromCoreSignals ( )
private

Disconnect core signals from GUI client.

Definition at line 1564 of file ravengui.cpp.

Here is the caller graph for this function:

◆ updateHeadersSyncProgressLabel()

void RavenGUI::updateHeadersSyncProgressLabel ( )
private

Definition at line 1111 of file ravengui.cpp.

Here is the call graph for this function:

◆ updateNetworkState()

void RavenGUI::updateNetworkState ( )
private

Update UI with latest network info from model.

Definition at line 1072 of file ravengui.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ aboutAction

QAction* RavenGUI::aboutAction
private

Definition at line 105 of file ravengui.h.

◆ aboutQtAction

QAction* RavenGUI::aboutQtAction
private

Definition at line 113 of file ravengui.h.

◆ appMenuBar

QMenuBar* RavenGUI::appMenuBar
private

Definition at line 95 of file ravengui.h.

◆ backupWalletAction

QAction* RavenGUI::backupWalletAction
private

Definition at line 111 of file ravengui.h.

◆ changePassphraseAction

QAction* RavenGUI::changePassphraseAction
private

Definition at line 112 of file ravengui.h.

◆ clientModel

ClientModel* RavenGUI::clientModel
private

Definition at line 83 of file ravengui.h.

◆ connectionsControl

QLabel* RavenGUI::connectionsControl
private

Definition at line 89 of file ravengui.h.

◆ createAssetAction

QAction* RavenGUI::createAssetAction
private

Definition at line 121 of file ravengui.h.

◆ DEFAULT_UIPLATFORM

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

Definition at line 53 of file ravengui.h.

◆ DEFAULT_WALLET

const QString RavenGUI::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 52 of file ravengui.h.

◆ enableWallet

bool RavenGUI::enableWallet

Definition at line 72 of file ravengui.h.

◆ encryptWalletAction

QAction* RavenGUI::encryptWalletAction
private

Definition at line 110 of file ravengui.h.

◆ headerWidget

QWidget* RavenGUI::headerWidget
private

Definition at line 125 of file ravengui.h.

◆ helpMessageDialog

HelpMessageDialog* RavenGUI::helpMessageDialog
private

Definition at line 137 of file ravengui.h.

◆ historyAction

QAction* RavenGUI::historyAction
private

Definition at line 97 of file ravengui.h.

◆ labelBlocksIcon

QLabel* RavenGUI::labelBlocksIcon
private

Definition at line 90 of file ravengui.h.

◆ labelCurrentMarket

QLabel* RavenGUI::labelCurrentMarket
private

Definition at line 126 of file ravengui.h.

◆ labelCurrentPrice

QLabel* RavenGUI::labelCurrentPrice
private

Definition at line 127 of file ravengui.h.

◆ labelWalletEncryptionIcon

QLabel* RavenGUI::labelWalletEncryptionIcon
private

Definition at line 87 of file ravengui.h.

◆ labelWalletHDStatusIcon

QLabel* RavenGUI::labelWalletHDStatusIcon
private

Definition at line 88 of file ravengui.h.

◆ manageAssetAction

QAction* RavenGUI::manageAssetAction
private

Definition at line 122 of file ravengui.h.

◆ messagingAction

QAction* RavenGUI::messagingAction
private

Definition at line 123 of file ravengui.h.

◆ modalOverlay

ModalOverlay* RavenGUI::modalOverlay
private

Definition at line 138 of file ravengui.h.

◆ networkManager

QNetworkAccessManager* RavenGUI::networkManager
private

Definition at line 129 of file ravengui.h.

◆ notificator

Notificator* RavenGUI::notificator
private

Definition at line 135 of file ravengui.h.

◆ openAction

QAction* RavenGUI::openAction
private

Definition at line 116 of file ravengui.h.

◆ openRPCConsoleAction

QAction* RavenGUI::openRPCConsoleAction
private

Definition at line 114 of file ravengui.h.

◆ openWalletRepairAction

QAction* RavenGUI::openWalletRepairAction
private

Definition at line 115 of file ravengui.h.

◆ optionsAction

QAction* RavenGUI::optionsAction
private

Definition at line 108 of file ravengui.h.

◆ overviewAction

QAction* RavenGUI::overviewAction
private

Definition at line 96 of file ravengui.h.

◆ platformStyle

const PlatformStyle* RavenGUI::platformStyle
private

Definition at line 144 of file ravengui.h.

◆ prevBlocks

int RavenGUI::prevBlocks
private

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

Definition at line 141 of file ravengui.h.

◆ pricingTimer

QTimer* RavenGUI::pricingTimer
private

Definition at line 128 of file ravengui.h.

◆ progressBar

QProgressBar* RavenGUI::progressBar
private

Definition at line 92 of file ravengui.h.

◆ progressBarLabel

QLabel* RavenGUI::progressBarLabel
private

Definition at line 91 of file ravengui.h.

◆ progressDialog

QProgressDialog* RavenGUI::progressDialog
private

Definition at line 93 of file ravengui.h.

◆ quitAction

QAction* RavenGUI::quitAction
private

Definition at line 98 of file ravengui.h.

◆ receiveCoinsAction

QAction* RavenGUI::receiveCoinsAction
private

Definition at line 106 of file ravengui.h.

◆ receiveCoinsMenuAction

QAction* RavenGUI::receiveCoinsMenuAction
private

Definition at line 107 of file ravengui.h.

◆ request

QNetworkRequest* RavenGUI::request
private

Definition at line 130 of file ravengui.h.

◆ rpcConsole

RPCConsole* RavenGUI::rpcConsole
private

Definition at line 136 of file ravengui.h.

◆ sendCoinsAction

QAction* RavenGUI::sendCoinsAction
private

Definition at line 99 of file ravengui.h.

◆ sendCoinsMenuAction

QAction* RavenGUI::sendCoinsMenuAction
private

Definition at line 100 of file ravengui.h.

◆ showHelpMessageAction

QAction* RavenGUI::showHelpMessageAction
private

Definition at line 117 of file ravengui.h.

◆ signMessageAction

QAction* RavenGUI::signMessageAction
private

Definition at line 103 of file ravengui.h.

◆ spinnerFrame

int RavenGUI::spinnerFrame
private

Definition at line 142 of file ravengui.h.

◆ toggleHideAction

QAction* RavenGUI::toggleHideAction
private

Definition at line 109 of file ravengui.h.

◆ transferAssetAction

QAction* RavenGUI::transferAssetAction
private

RVN START.

Definition at line 120 of file ravengui.h.

◆ trayIcon

QSystemTrayIcon* RavenGUI::trayIcon
private

RVN END.

Definition at line 133 of file ravengui.h.

◆ trayIconMenu

QMenu* RavenGUI::trayIconMenu
private

Definition at line 134 of file ravengui.h.

◆ unitDisplayControl

UnitDisplayStatusBarControl* RavenGUI::unitDisplayControl
private

Definition at line 86 of file ravengui.h.

◆ usedReceivingAddressesAction

QAction* RavenGUI::usedReceivingAddressesAction
private

Definition at line 102 of file ravengui.h.

◆ usedSendingAddressesAction

QAction* RavenGUI::usedSendingAddressesAction
private

Definition at line 101 of file ravengui.h.

◆ verifyMessageAction

QAction* RavenGUI::verifyMessageAction
private

Definition at line 104 of file ravengui.h.

◆ votingAction

QAction* RavenGUI::votingAction
private

Definition at line 124 of file ravengui.h.

◆ walletFrame

WalletFrame* RavenGUI::walletFrame
private

Definition at line 84 of file ravengui.h.


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