PIVX Core  5.6.99
P2P Digital Currency
Public Slots | Signals | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
PIVXGUI Class Reference

PIVX GUI main class. More...

#include <pivxgui.h>

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

Public Slots

void changeTheme (bool isLightTheme)
 
void goToDashboard ()
 
void goToSend ()
 
void goToReceive ()
 
void goToAddresses ()
 
void goToMasterNodes ()
 
void goToGovernance ()
 
void goToColdStaking ()
 
void goToSettings ()
 
void goToSettingsInfo ()
 
void openNetworkMonitor ()
 
void connectActions ()
 Here add every event connection. More...
 
void handleRestart (QStringList args)
 Get restart command-line parameters and request restart. 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 messageInfo (const QString &message)
 
bool execDialog (QDialog *dialog, int xDiv=3, int yDiv=5)
 
void openFAQ (SettingsFaqWidget::Section section=SettingsFaqWidget::Section::INTRO)
 Open FAQ dialog. More...
 
void incomingTransaction (const QString &date, int unit, const CAmount &amount, const QString &type, const QString &address)
 Show incoming transaction notification for new transactions. More...
 
void detectShutdown ()
 called by a timer to check if ShutdownRequested() More...
 

Signals

void themeChanged (bool isLightTheme, QString &theme)
 
void windowResizeEvent (QResizeEvent *event)
 
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

 PIVXGUI (const NetworkStyle *networkStyle, QWidget *parent=0)
 
 ~PIVXGUI ()
 
void setClientModel (ClientModel *clientModel)
 Set the client model. More...
 
void resizeEvent (QResizeEvent *event) override
 
void showHide (bool show)
 
int getNavWidth ()
 

Static Public Attributes

static const QString DEFAULT_WALLET = "~Default"
 

Protected Member Functions

void changeEvent (QEvent *e) override
 
void closeEvent (QCloseEvent *event) override
 

Private Slots

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 trayIconActivated (QSystemTrayIcon::ActivationReason reason)
 Handle tray icon clicked. More...
 

Private Member Functions

void createActions (const NetworkStyle *networkStyle)
 Create the main UI actions. 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 showTop (QWidget *view)
 
bool openStandardDialog (QString title="", QString body="", QString okBtn="OK", QString cancelBtn="CANCEL")
 
void subscribeToCoreSignals ()
 Connect core signals to GUI client. More...
 
void unsubscribeFromCoreSignals ()
 Disconnect core signals from GUI client. More...
 

Private Attributes

std::unique_ptr< interfaces::Handlerm_handler_message_box
 
bool enableWallet
 
ClientModelclientModel = nullptr
 
MNModelmnModel = nullptr
 
QAction * quitAction = nullptr
 
QAction * toggleHideAction = nullptr
 
NavMenuWidgetnavMenu = nullptr
 
TopBartopBar = nullptr
 
QStackedWidget * stackedContainer = nullptr
 
DashboardWidgetdashboard = nullptr
 
SendWidgetsendWidget = nullptr
 
ReceiveWidgetreceiveWidget = nullptr
 
AddressesWidgetaddressesWidget = nullptr
 
MasterNodesWidgetmasterNodesWidget = nullptr
 
ColdStakingWidgetcoldStakingWidget = nullptr
 
GovernanceWidgetgovernancewidget {nullptr}
 
SettingsWidgetsettingsWidget = nullptr
 
SnackBarsnackBar = nullptr
 
RPCConsolerpcConsole = nullptr
 
QSystemTrayIcon * trayIcon = nullptr
 
QMenu * trayIconMenu = nullptr
 
Notificatornotificator = nullptr
 
QLabel * op = nullptr
 
bool opEnabled = false
 

Detailed Description

PIVX GUI main class.

This class represents the main window of the PIVX 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 45 of file pivxgui.h.

Constructor & Destructor Documentation

◆ PIVXGUI()

PIVXGUI::PIVXGUI ( const NetworkStyle networkStyle,
QWidget *  parent = 0 
)
explicit
Todo:
: Add event filter??

Definition at line 40 of file pivxgui.cpp.

Here is the call graph for this function:

◆ ~PIVXGUI()

PIVXGUI::~PIVXGUI ( )

Definition at line 224 of file pivxgui.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ changeEvent()

void PIVXGUI::changeEvent ( QEvent *  e)
overrideprotected

Definition at line 336 of file pivxgui.cpp.

Here is the call graph for this function:

◆ changeTheme

void PIVXGUI::changeTheme ( bool  isLightTheme)
slot

Definition at line 551 of file pivxgui.cpp.

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

◆ closeEvent()

void PIVXGUI::closeEvent ( QCloseEvent *  event)
overrideprotected

Definition at line 355 of file pivxgui.cpp.

Here is the call graph for this function:

◆ connectActions

void PIVXGUI::connectActions ( )
slot

Here add every event connection.

Definition at line 186 of file pivxgui.cpp.

Here is the call graph for this function:

◆ createActions()

void PIVXGUI::createActions ( const NetworkStyle networkStyle)
private

Create the main UI actions.

Definition at line 169 of file pivxgui.cpp.

Here is the call graph for this function:

◆ createTrayIcon()

void PIVXGUI::createTrayIcon ( const NetworkStyle networkStyle)
private

Create system tray icon and notification.

Definition at line 212 of file pivxgui.cpp.

Here is the call graph for this function:

◆ createTrayIconMenu()

void PIVXGUI::createTrayIconMenu ( )
private

Create system tray menu (or setup the dock menu)

Definition at line 290 of file pivxgui.cpp.

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

◆ detectShutdown

void PIVXGUI::detectShutdown ( )
slot

called by a timer to check if ShutdownRequested()

Definition at line 479 of file pivxgui.cpp.

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

◆ execDialog

bool PIVXGUI::execDialog ( QDialog *  dialog,
int  xDiv = 3,
int  yDiv = 5 
)
slot

Definition at line 574 of file pivxgui.cpp.

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

◆ getNavWidth()

int PIVXGUI::getNavWidth ( )

Definition at line 607 of file pivxgui.cpp.

Here is the caller graph for this function:

◆ goToAddresses

void PIVXGUI::goToAddresses ( )
slot

Definition at line 501 of file pivxgui.cpp.

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

◆ goToColdStaking

void PIVXGUI::goToColdStaking ( )
slot

Definition at line 512 of file pivxgui.cpp.

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

◆ goToDashboard

void PIVXGUI::goToDashboard ( )
slot

Definition at line 488 of file pivxgui.cpp.

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

◆ goToGovernance

void PIVXGUI::goToGovernance ( )
slot

Definition at line 517 of file pivxgui.cpp.

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

◆ goToMasterNodes

void PIVXGUI::goToMasterNodes ( )
slot

Definition at line 506 of file pivxgui.cpp.

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

◆ goToReceive

void PIVXGUI::goToReceive ( )
slot

Definition at line 533 of file pivxgui.cpp.

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

◆ goToSend

void PIVXGUI::goToSend ( )
slot

Definition at line 496 of file pivxgui.cpp.

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

◆ goToSettings

void PIVXGUI::goToSettings ( )
slot

Definition at line 522 of file pivxgui.cpp.

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

◆ goToSettingsInfo

void PIVXGUI::goToSettingsInfo ( )
slot

Definition at line 526 of file pivxgui.cpp.

Here is the call graph for this function:

◆ handleRestart

void PIVXGUI::handleRestart ( QStringList  args)
slot

Get restart command-line parameters and request restart.

Definition at line 239 of file pivxgui.cpp.

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

◆ incomingTransaction

void PIVXGUI::incomingTransaction ( const QString &  date,
int  unit,
const CAmount amount,
const QString &  type,
const QString &  address 
)
slot

Show incoming transaction notification for new transactions.

◆ message

void PIVXGUI::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 381 of file pivxgui.cpp.

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

◆ messageInfo

void PIVXGUI::messageInfo ( const QString &  message)
slot

Definition at line 372 of file pivxgui.cpp.

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

◆ openFAQ

void PIVXGUI::openFAQ ( SettingsFaqWidget::Section  section = SettingsFaqWidget::Section::INTRO)
slot

Open FAQ dialog.

Definition at line 612 of file pivxgui.cpp.

Here is the call graph for this function:

◆ openNetworkMonitor

void PIVXGUI::openNetworkMonitor ( )
slot

Definition at line 538 of file pivxgui.cpp.

Here is the call graph for this function:

◆ openStandardDialog()

bool PIVXGUI::openStandardDialog ( QString  title = "",
QString  body = "",
QString  okBtn = "OK",
QString  cancelBtn = "CANCEL" 
)
private

Definition at line 440 of file pivxgui.cpp.

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

◆ receivedURI

void PIVXGUI::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 PIVXGUI::requestedRestart ( QStringList  args)
signal

Restart handling.

Here is the caller graph for this function:

◆ resizeEvent()

void PIVXGUI::resizeEvent ( QResizeEvent *  event)
override

Definition at line 564 of file pivxgui.cpp.

Here is the call graph for this function:

◆ setClientModel()

void PIVXGUI::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 246 of file pivxgui.cpp.

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

◆ showHide()

void PIVXGUI::showHide ( bool  show)

Definition at line 579 of file pivxgui.cpp.

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

◆ showNormalIfMinimized

void PIVXGUI::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 463 of file pivxgui.cpp.

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

◆ showTop()

void PIVXGUI::showTop ( QWidget *  view)
private

Definition at line 543 of file pivxgui.cpp.

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

◆ subscribeToCoreSignals()

void PIVXGUI::subscribeToCoreSignals ( )
private

Connect core signals to GUI client.

Definition at line 723 of file pivxgui.cpp.

Here is the call graph for this function:

◆ themeChanged

void PIVXGUI::themeChanged ( bool  isLightTheme,
QString &  theme 
)
signal
Here is the caller graph for this function:

◆ toggleHidden

void PIVXGUI::toggleHidden ( )
privateslot

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

Definition at line 474 of file pivxgui.cpp.

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

◆ trayIconActivated

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

Handle tray icon clicked.

Definition at line 321 of file pivxgui.cpp.

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

◆ unsubscribeFromCoreSignals()

void PIVXGUI::unsubscribeFromCoreSignals ( )
private

Disconnect core signals from GUI client.

Definition at line 729 of file pivxgui.cpp.

Here is the caller graph for this function:

◆ windowResizeEvent

void PIVXGUI::windowResizeEvent ( QResizeEvent *  event)
signal
Here is the caller graph for this function:

Member Data Documentation

◆ addressesWidget

AddressesWidget* PIVXGUI::addressesWidget = nullptr
private

Definition at line 143 of file pivxgui.h.

◆ clientModel

ClientModel* PIVXGUI::clientModel = nullptr
private

Definition at line 128 of file pivxgui.h.

◆ coldStakingWidget

ColdStakingWidget* PIVXGUI::coldStakingWidget = nullptr
private

Definition at line 145 of file pivxgui.h.

◆ dashboard

DashboardWidget* PIVXGUI::dashboard = nullptr
private

Definition at line 140 of file pivxgui.h.

◆ DEFAULT_WALLET

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

Definition at line 50 of file pivxgui.h.

◆ enableWallet

bool PIVXGUI::enableWallet
private

Definition at line 127 of file pivxgui.h.

◆ governancewidget

GovernanceWidget* PIVXGUI::governancewidget {nullptr}
private

Definition at line 146 of file pivxgui.h.

◆ m_handler_message_box

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

Definition at line 125 of file pivxgui.h.

◆ masterNodesWidget

MasterNodesWidget* PIVXGUI::masterNodesWidget = nullptr
private

Definition at line 144 of file pivxgui.h.

◆ mnModel

MNModel* PIVXGUI::mnModel = nullptr
private

Definition at line 129 of file pivxgui.h.

◆ navMenu

NavMenuWidget* PIVXGUI::navMenu = nullptr
private

Definition at line 136 of file pivxgui.h.

◆ notificator

Notificator* PIVXGUI::notificator = nullptr
private

Definition at line 156 of file pivxgui.h.

◆ op

QLabel* PIVXGUI::op = nullptr
private

Definition at line 158 of file pivxgui.h.

◆ opEnabled

bool PIVXGUI::opEnabled = false
private

Definition at line 159 of file pivxgui.h.

◆ quitAction

QAction* PIVXGUI::quitAction = nullptr
private

Definition at line 132 of file pivxgui.h.

◆ receiveWidget

ReceiveWidget* PIVXGUI::receiveWidget = nullptr
private

Definition at line 142 of file pivxgui.h.

◆ rpcConsole

RPCConsole* PIVXGUI::rpcConsole = nullptr
private

Definition at line 151 of file pivxgui.h.

◆ sendWidget

SendWidget* PIVXGUI::sendWidget = nullptr
private

Definition at line 141 of file pivxgui.h.

◆ settingsWidget

SettingsWidget* PIVXGUI::settingsWidget = nullptr
private

Definition at line 147 of file pivxgui.h.

◆ snackBar

SnackBar* PIVXGUI::snackBar = nullptr
private

Definition at line 149 of file pivxgui.h.

◆ stackedContainer

QStackedWidget* PIVXGUI::stackedContainer = nullptr
private

Definition at line 138 of file pivxgui.h.

◆ toggleHideAction

QAction* PIVXGUI::toggleHideAction = nullptr
private

Definition at line 133 of file pivxgui.h.

◆ topBar

TopBar* PIVXGUI::topBar = nullptr
private

Definition at line 137 of file pivxgui.h.

◆ trayIcon

QSystemTrayIcon* PIVXGUI::trayIcon = nullptr
private

Definition at line 154 of file pivxgui.h.

◆ trayIconMenu

QMenu* PIVXGUI::trayIconMenu = nullptr
private

Definition at line 155 of file pivxgui.h.


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