Bitcoin Core  27.99.0
P2P Digital Currency
Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
UnitDisplayStatusBarControl Class Reference

#include <bitcoingui.h>

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

Public Member Functions

 UnitDisplayStatusBarControl (const PlatformStyle *platformStyle)
 
void setOptionsModel (OptionsModel *optionsModel)
 Lets the control know about the Options Model (and its signals) More...
 

Protected Member Functions

void mousePressEvent (QMouseEvent *event) override
 So that it responds to left-button clicks. More...
 
void changeEvent (QEvent *e) override
 

Private Slots

void updateDisplayUnit (BitcoinUnit newUnits)
 When Display Units are changed on OptionsModel it will refresh the display text of the control on the status bar. More...
 
void onMenuSelection (QAction *action)
 Tells underlying optionsModel to update its current display unit. More...
 

Private Member Functions

void onDisplayUnitsClicked (const QPoint &point)
 Shows context menu with Display Unit options by the mouse coordinates. More...
 
void createContextMenu ()
 Creates context menu, its actions, and wires up all the relevant signals for mouse events. More...
 

Private Attributes

OptionsModeloptionsModel {nullptr}
 
QMenu * menu {nullptr}
 
const PlatformStylem_platform_style
 

Detailed Description

Definition at line 327 of file bitcoingui.h.

Constructor & Destructor Documentation

◆ UnitDisplayStatusBarControl()

UnitDisplayStatusBarControl::UnitDisplayStatusBarControl ( const PlatformStyle platformStyle)
explicit

Definition at line 1585 of file bitcoingui.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ changeEvent()

void UnitDisplayStatusBarControl::changeEvent ( QEvent *  e)
overrideprotected

Definition at line 1607 of file bitcoingui.cpp.

Here is the call graph for this function:

◆ createContextMenu()

void UnitDisplayStatusBarControl::createContextMenu ( )
private

Creates context menu, its actions, and wires up all the relevant signals for mouse events.

Definition at line 1620 of file bitcoingui.cpp.

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

◆ mousePressEvent()

void UnitDisplayStatusBarControl::mousePressEvent ( QMouseEvent *  event)
overrideprotected

So that it responds to left-button clicks.

So that it responds to button clicks.

Definition at line 1602 of file bitcoingui.cpp.

Here is the call graph for this function:

◆ onDisplayUnitsClicked()

void UnitDisplayStatusBarControl::onDisplayUnitsClicked ( const QPoint &  point)
private

Shows context menu with Display Unit options by the mouse coordinates.

Definition at line 1651 of file bitcoingui.cpp.

Here is the caller graph for this function:

◆ onMenuSelection

void UnitDisplayStatusBarControl::onMenuSelection ( QAction *  action)
privateslot

Tells underlying optionsModel to update its current display unit.

Definition at line 1658 of file bitcoingui.cpp.

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

◆ setOptionsModel()

void UnitDisplayStatusBarControl::setOptionsModel ( OptionsModel optionsModel)

Lets the control know about the Options Model (and its signals)

Definition at line 1630 of file bitcoingui.cpp.

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

◆ updateDisplayUnit

void UnitDisplayStatusBarControl::updateDisplayUnit ( BitcoinUnit  newUnits)
privateslot

When Display Units are changed on OptionsModel it will refresh the display text of the control on the status bar.

Definition at line 1645 of file bitcoingui.cpp.

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

Member Data Documentation

◆ m_platform_style

const PlatformStyle* UnitDisplayStatusBarControl::m_platform_style
private

Definition at line 344 of file bitcoingui.h.

◆ menu

QMenu* UnitDisplayStatusBarControl::menu {nullptr}
private

Definition at line 343 of file bitcoingui.h.

◆ optionsModel

OptionsModel* UnitDisplayStatusBarControl::optionsModel {nullptr}
private

Definition at line 342 of file bitcoingui.h.


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