KiCad PCB EDA Suite
|
#include <panel_eseries_display.h>
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_WINDOW * | m_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. | |
Definition at line 29 of file panel_eseries_display.h.
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 | ( | ) |
|
overridevirtual |
Load the settings into the panel.
aCfg | is the settings structure to load from |
Implements CALCULATOR_PANEL.
|
private |
Fill small E-series tree with values.
Contains values from E1, E3, E6 and E12 series.
|
private |
Fill larger E-series tree with values.
Contains values from E24, E48, E96 series.
|
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.
|
private |
Colour small E-series tree according to current theme.
Contains values from E1, E3, E6 and E12 series.
|
private |
Colour large E-series tree according to current theme.
Contains values from E24, E48, E96 series.
|
overridevirtual |
Save the settings from the panel.
aCfg | is the settings structure to save to |
Implements CALCULATOR_PANEL.
|
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.
|
private |
Calculated colours for E12 column in current (light,dark) theme.
Definition at line 141 of file panel_eseries_display.h.
|
private |
Calculated colour for E1 column in current (light,dark) theme.
Definition at line 132 of file panel_eseries_display.h.
|
private |
Calculated colours for E24 column in current (light,dark) theme.
Definition at line 144 of file panel_eseries_display.h.
|
private |
Calculated colours for E3 column in current (light,dark) theme.
Definition at line 135 of file panel_eseries_display.h.
|
private |
Calculated colours for E48 column in current (light,dark) theme.
Definition at line 147 of file panel_eseries_display.h.
|
private |
Calculated colours for E6 column in current (light,dark) theme.
Definition at line 138 of file panel_eseries_display.h.
|
private |
Calculated colours for E96 column in current (light,dark) theme.
Definition at line 150 of file panel_eseries_display.h.
|
protectedinherited |
Definition at line 38 of file panel_eseries_display_base.h.
Referenced by PANEL_ESERIES_DISPLAY_BASE::PANEL_ESERIES_DISPLAY_BASE().
|
protectedinherited |
Definition at line 37 of file panel_eseries_display_base.h.
Referenced by PANEL_ESERIES_DISPLAY_BASE::PANEL_ESERIES_DISPLAY_BASE().
|
protectedinherited |
Definition at line 39 of file panel_eseries_display_base.h.
Referenced by PANEL_ESERIES_DISPLAY_BASE::PANEL_ESERIES_DISPLAY_BASE().
|
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.
|
staticconstexprprivate |
Colour for E12 column in light theme. Passed to wxColour constructor.
HTML plum
Definition at line 111 of file panel_eseries_display.h.
|
staticconstexprprivate |
Colour for E1 column in light theme. Passed to wxColour constructor.
HTML honeydew
Definition at line 93 of file panel_eseries_display.h.
|
staticconstexprprivate |
Colour for E24 column in light theme. Passed to wxColour constructor.
HTML skyblue
Definition at line 117 of file panel_eseries_display.h.
|
staticconstexprprivate |
Colour for E3 column in light theme. Passed to wxColour constructor.
HTML palegreen
Definition at line 99 of file panel_eseries_display.h.
|
staticconstexprprivate |
Colour for E48 column in light theme. Passed to wxColour constructor.
HTML olivedrab
Definition at line 123 of file panel_eseries_display.h.
|
staticconstexprprivate |
Colour for E6 column in light theme. Passed to wxColour constructor.
HTML cornflowerblue
Definition at line 105 of file panel_eseries_display.h.
|
staticconstexprprivate |
Colour for E96 column in light theme. Passed to wxColour constructor.
HTML lightsalmon
Definition at line 129 of file panel_eseries_display.h.
|
private |
Calculated matching colour for empty columns. Same as background of labels.
Definition at line 153 of file panel_eseries_display.h.
|
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.