KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PANEL_ESERIES_DISPLAY Class Reference

#include <panel_eseries_display.h>

Inheritance diagram for PANEL_ESERIES_DISPLAY:
PANEL_ESERIES_DISPLAY_BASE CALCULATOR_PANEL

Public Member Functions

 PANEL_ESERIES_DISPLAY (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 
 ~PANEL_ESERIES_DISPLAY ()
 
void LoadSettings (PCB_CALCULATOR_SETTINGS *aCfg) override
 Load the settings into the panel.
 
void SaveSettings (PCB_CALCULATOR_SETTINGS *aCfg) override
 Save the settings from the panel.
 
void ThemeChanged () override
 Update UI elements of the panel when the theme changes to ensure the images and fonts/colors are appropriate for the new theme.
 

Protected Attributes

wxGrid * m_GridEseries2496
 
wxGrid * m_GridEseries112
 
HTML_WINDOWm_panelESeriesHelp
 

Private Member Functions

void recalculateColumnColours (bool aDarkModeOn)
 Recalculate colours used to highlight the E-series columns.
 
void populateE112Tree ()
 Fill small E-series tree with values.
 
void populateE2496Tree ()
 Fill larger E-series tree with values.
 
void recolourE112Tree ()
 Colour small E-series tree according to current theme.
 
void recolourE2496Tree ()
 Colour large E-series tree according to current theme.
 

Private Attributes

wxColour m_colourE1Column
 Calculated colour for E1 column in current (light,dark) theme.
 
wxColour m_colourE3Pair [2]
 Calculated colours for E3 column in current (light,dark) theme.
 
wxColour m_colourE6Pair [2]
 Calculated colours for E6 column in current (light,dark) theme.
 
wxColour m_colourE12Pair [2]
 Calculated colours for E12 column in current (light,dark) theme.
 
wxColour m_colourE24Pair [2]
 Calculated colours for E24 column in current (light,dark) theme.
 
wxColour m_colourE48Pair [2]
 Calculated colours for E48 column in current (light,dark) theme.
 
wxColour m_colourE96Pair [2]
 Calculated colours for E96 column in current (light,dark) theme.
 
wxColour s_colourMatching
 Calculated matching colour for empty columns. Same as background of labels.
 

Static Private Attributes

static constexpr int s_altAdjustValue = 125
 Adjustment factor to create alternating R-series table entry colours.
 
static constexpr int s_darkAdjustValue = 78
 Adjustment factor to create darker grid cells in dark theme.
 
static constexpr uint32_t s_cE1BGR = 0xf0fff0
 Colour for E1 column in light theme. Passed to wxColour constructor.
 
static constexpr uint32_t s_cE3BGR = 0x98fb98
 Colour for E3 column in light theme. Passed to wxColour constructor.
 
static constexpr uint32_t s_cE6BGR = 0xed9564
 Colour for E6 column in light theme. Passed to wxColour constructor.
 
static constexpr uint32_t s_cE12BGR = 0xdda0dd
 Colour for E12 column in light theme. Passed to wxColour constructor.
 
static constexpr uint32_t s_cE24BGR = 0xebce87
 Colour for E24 column in light theme. Passed to wxColour constructor.
 
static constexpr uint32_t s_cE48BGR = 0x23e86b
 Colour for E48 column in light theme. Passed to wxColour constructor.
 
static constexpr uint32_t s_cE96BGR = 0x7aa0ff
 Colour for E96 column in light theme. Passed to wxColour constructor.
 

Detailed Description

Definition at line 29 of file panel_eseries_display.h.

Constructor & Destructor Documentation

◆ PANEL_ESERIES_DISPLAY()

PANEL_ESERIES_DISPLAY::PANEL_ESERIES_DISPLAY ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxTAB_TRAVERSAL,
const wxString &  name = wxEmptyString 
)

◆ ~PANEL_ESERIES_DISPLAY()

PANEL_ESERIES_DISPLAY::~PANEL_ESERIES_DISPLAY ( )

Member Function Documentation

◆ LoadSettings()

void PANEL_ESERIES_DISPLAY::LoadSettings ( PCB_CALCULATOR_SETTINGS aCfg)
overridevirtual

Load the settings into the panel.

Parameters
aCfgis the settings structure to load from

Implements CALCULATOR_PANEL.

◆ populateE112Tree()

void PANEL_ESERIES_DISPLAY::populateE112Tree ( )
private

Fill small E-series tree with values.

Contains values from E1, E3, E6 and E12 series.

◆ populateE2496Tree()

void PANEL_ESERIES_DISPLAY::populateE2496Tree ( )
private

Fill larger E-series tree with values.

Contains values from E24, E48, E96 series.

◆ recalculateColumnColours()

void PANEL_ESERIES_DISPLAY::recalculateColumnColours ( bool  aDarkModeOn)
private

Recalculate colours used to highlight the E-series columns.

Each colour is a pair of colours which are used in alternate rows to make the table easier to follow.

◆ recolourE112Tree()

void PANEL_ESERIES_DISPLAY::recolourE112Tree ( )
private

Colour small E-series tree according to current theme.

Contains values from E1, E3, E6 and E12 series.

◆ recolourE2496Tree()

void PANEL_ESERIES_DISPLAY::recolourE2496Tree ( )
private

Colour large E-series tree according to current theme.

Contains values from E24, E48, E96 series.

◆ SaveSettings()

void PANEL_ESERIES_DISPLAY::SaveSettings ( PCB_CALCULATOR_SETTINGS aCfg)
overridevirtual

Save the settings from the panel.

Parameters
aCfgis the settings structure to save to

Implements CALCULATOR_PANEL.

◆ ThemeChanged()

void PANEL_ESERIES_DISPLAY::ThemeChanged ( )
overridevirtual

Update UI elements of the panel when the theme changes to ensure the images and fonts/colors are appropriate for the new theme.

Implements CALCULATOR_PANEL.

Member Data Documentation

◆ m_colourE12Pair

wxColour PANEL_ESERIES_DISPLAY::m_colourE12Pair[2]
private

Calculated colours for E12 column in current (light,dark) theme.

Definition at line 141 of file panel_eseries_display.h.

◆ m_colourE1Column

wxColour PANEL_ESERIES_DISPLAY::m_colourE1Column
private

Calculated colour for E1 column in current (light,dark) theme.

Definition at line 132 of file panel_eseries_display.h.

◆ m_colourE24Pair

wxColour PANEL_ESERIES_DISPLAY::m_colourE24Pair[2]
private

Calculated colours for E24 column in current (light,dark) theme.

Definition at line 144 of file panel_eseries_display.h.

◆ m_colourE3Pair

wxColour PANEL_ESERIES_DISPLAY::m_colourE3Pair[2]
private

Calculated colours for E3 column in current (light,dark) theme.

Definition at line 135 of file panel_eseries_display.h.

◆ m_colourE48Pair

wxColour PANEL_ESERIES_DISPLAY::m_colourE48Pair[2]
private

Calculated colours for E48 column in current (light,dark) theme.

Definition at line 147 of file panel_eseries_display.h.

◆ m_colourE6Pair

wxColour PANEL_ESERIES_DISPLAY::m_colourE6Pair[2]
private

Calculated colours for E6 column in current (light,dark) theme.

Definition at line 138 of file panel_eseries_display.h.

◆ m_colourE96Pair

wxColour PANEL_ESERIES_DISPLAY::m_colourE96Pair[2]
private

Calculated colours for E96 column in current (light,dark) theme.

Definition at line 150 of file panel_eseries_display.h.

◆ m_GridEseries112

wxGrid* PANEL_ESERIES_DISPLAY_BASE::m_GridEseries112
protectedinherited

◆ m_GridEseries2496

wxGrid* PANEL_ESERIES_DISPLAY_BASE::m_GridEseries2496
protectedinherited

◆ m_panelESeriesHelp

HTML_WINDOW* PANEL_ESERIES_DISPLAY_BASE::m_panelESeriesHelp
protectedinherited

◆ s_altAdjustValue

constexpr int PANEL_ESERIES_DISPLAY::s_altAdjustValue = 125
staticconstexprprivate

Adjustment factor to create alternating R-series table entry colours.

This is to make the table easier to read. This value is passed to wxColour::ChangeLightness().

Definition at line 80 of file panel_eseries_display.h.

◆ s_cE12BGR

constexpr uint32_t PANEL_ESERIES_DISPLAY::s_cE12BGR = 0xdda0dd
staticconstexprprivate

Colour for E12 column in light theme. Passed to wxColour constructor.

HTML plum

Definition at line 111 of file panel_eseries_display.h.

◆ s_cE1BGR

constexpr uint32_t PANEL_ESERIES_DISPLAY::s_cE1BGR = 0xf0fff0
staticconstexprprivate

Colour for E1 column in light theme. Passed to wxColour constructor.

HTML honeydew

Definition at line 93 of file panel_eseries_display.h.

◆ s_cE24BGR

constexpr uint32_t PANEL_ESERIES_DISPLAY::s_cE24BGR = 0xebce87
staticconstexprprivate

Colour for E24 column in light theme. Passed to wxColour constructor.

HTML skyblue

Definition at line 117 of file panel_eseries_display.h.

◆ s_cE3BGR

constexpr uint32_t PANEL_ESERIES_DISPLAY::s_cE3BGR = 0x98fb98
staticconstexprprivate

Colour for E3 column in light theme. Passed to wxColour constructor.

HTML palegreen

Definition at line 99 of file panel_eseries_display.h.

◆ s_cE48BGR

constexpr uint32_t PANEL_ESERIES_DISPLAY::s_cE48BGR = 0x23e86b
staticconstexprprivate

Colour for E48 column in light theme. Passed to wxColour constructor.

HTML olivedrab

Definition at line 123 of file panel_eseries_display.h.

◆ s_cE6BGR

constexpr uint32_t PANEL_ESERIES_DISPLAY::s_cE6BGR = 0xed9564
staticconstexprprivate

Colour for E6 column in light theme. Passed to wxColour constructor.

HTML cornflowerblue

Definition at line 105 of file panel_eseries_display.h.

◆ s_cE96BGR

constexpr uint32_t PANEL_ESERIES_DISPLAY::s_cE96BGR = 0x7aa0ff
staticconstexprprivate

Colour for E96 column in light theme. Passed to wxColour constructor.

HTML lightsalmon

Definition at line 129 of file panel_eseries_display.h.

◆ s_colourMatching

wxColour PANEL_ESERIES_DISPLAY::s_colourMatching
private

Calculated matching colour for empty columns. Same as background of labels.

Definition at line 153 of file panel_eseries_display.h.

◆ s_darkAdjustValue

constexpr int PANEL_ESERIES_DISPLAY::s_darkAdjustValue = 78
staticconstexprprivate

Adjustment factor to create darker grid cells in dark theme.

Without this the light numbers on the grid backgrounds are difficult to read. This value is passed to wxColour::ChangeLightness().

Definition at line 87 of file panel_eseries_display.h.


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