KiCad PCB EDA Suite
PANEL_COLOR_CODE_BASE Class Referenceabstract

Class PANEL_COLOR_CODE_BASE. More...

#include <panel_color_code_base.h>

Inheritance diagram for PANEL_COLOR_CODE_BASE:
CALCULATOR_PANEL PANEL_COLOR_CODE

Public Member Functions

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

Protected Member Functions

virtual void OnToleranceSelection (wxCommandEvent &event)
 

Protected Attributes

wxRadioBox * m_rbToleranceSelection
 
wxStaticText * m_staticTextBand1
 
wxStaticText * m_staticTextBand2
 
wxStaticText * m_staticTextBand3
 
wxStaticText * m_staticTextBand4
 
wxStaticText * m_staticTextBand5
 
wxStaticText * m_staticTextBand6
 
wxStaticBitmap * m_Band1bitmap
 
wxStaticBitmap * m_Band2bitmap
 
wxStaticBitmap * m_Band3bitmap
 
wxStaticBitmap * m_Band4bitmap
 
wxStaticBitmap * m_Band_mult_bitmap
 
wxStaticBitmap * m_Band_tol_bitmap
 

Detailed Description

Class PANEL_COLOR_CODE_BASE.

Definition at line 34 of file panel_color_code_base.h.

Constructor & Destructor Documentation

◆ PANEL_COLOR_CODE_BASE()

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

Definition at line 12 of file panel_color_code_base.cpp.

12 : CALCULATOR_PANEL( parent, id, pos, size, style, name )
13{
14 wxBoxSizer* bSizerPanelColorCode;
15 bSizerPanelColorCode = new wxBoxSizer( wxHORIZONTAL );
16
17 wxBoxSizer* bSizerOpts;
18 bSizerOpts = new wxBoxSizer( wxVERTICAL );
19
20 wxString m_rbToleranceSelectionChoices[] = { _("10% / 5%"), _("<= 2%") };
21 int m_rbToleranceSelectionNChoices = sizeof( m_rbToleranceSelectionChoices ) / sizeof( wxString );
22 m_rbToleranceSelection = new wxRadioBox( this, wxID_ANY, _("Tolerance"), wxDefaultPosition, wxDefaultSize, m_rbToleranceSelectionNChoices, m_rbToleranceSelectionChoices, 1, wxRA_SPECIFY_COLS );
23 m_rbToleranceSelection->SetSelection( 0 );
24 bSizerOpts->Add( m_rbToleranceSelection, 0, wxBOTTOM|wxRIGHT, 30 );
25
26
27 bSizerPanelColorCode->Add( bSizerOpts, 0, wxALL, 8 );
28
29 wxFlexGridSizer* fgSizerColoCode;
30 fgSizerColoCode = new wxFlexGridSizer( 2, 6, 0, 0 );
31 fgSizerColoCode->SetFlexibleDirection( wxBOTH );
32 fgSizerColoCode->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
33
34 m_staticTextBand1 = new wxStaticText( this, wxID_ANY, _("1st Band"), wxDefaultPosition, wxDefaultSize, 0 );
35 m_staticTextBand1->Wrap( -1 );
36 fgSizerColoCode->Add( m_staticTextBand1, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
37
38 m_staticTextBand2 = new wxStaticText( this, wxID_ANY, _("2nd Band"), wxDefaultPosition, wxDefaultSize, 0 );
39 m_staticTextBand2->Wrap( -1 );
40 fgSizerColoCode->Add( m_staticTextBand2, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
41
42 m_staticTextBand3 = new wxStaticText( this, wxID_ANY, _("3rd Band"), wxDefaultPosition, wxDefaultSize, 0 );
43 m_staticTextBand3->Wrap( -1 );
44 fgSizerColoCode->Add( m_staticTextBand3, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
45
46 m_staticTextBand4 = new wxStaticText( this, wxID_ANY, _("4th Band"), wxDefaultPosition, wxDefaultSize, 0 );
47 m_staticTextBand4->Wrap( -1 );
48 fgSizerColoCode->Add( m_staticTextBand4, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
49
50 m_staticTextBand5 = new wxStaticText( this, wxID_ANY, _("Multiplier"), wxDefaultPosition, wxDefaultSize, 0 );
51 m_staticTextBand5->Wrap( -1 );
52 fgSizerColoCode->Add( m_staticTextBand5, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
53
54 m_staticTextBand6 = new wxStaticText( this, wxID_ANY, _("Tolerance"), wxDefaultPosition, wxDefaultSize, 0 );
55 m_staticTextBand6->Wrap( -1 );
56 fgSizerColoCode->Add( m_staticTextBand6, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
57
58 m_Band1bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
59 fgSizerColoCode->Add( m_Band1bitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
60
61 m_Band2bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
62 fgSizerColoCode->Add( m_Band2bitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
63
64 m_Band3bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
65 fgSizerColoCode->Add( m_Band3bitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
66
67 m_Band4bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
68 fgSizerColoCode->Add( m_Band4bitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
69
70 m_Band_mult_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
71 fgSizerColoCode->Add( m_Band_mult_bitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
72
73 m_Band_tol_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
74 fgSizerColoCode->Add( m_Band_tol_bitmap, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
75
76
77 bSizerPanelColorCode->Add( fgSizerColoCode, 1, wxEXPAND|wxLEFT, 5 );
78
79
80 this->SetSizer( bSizerPanelColorCode );
81 this->Layout();
82
83 // Connect Events
84 m_rbToleranceSelection->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PANEL_COLOR_CODE_BASE::OnToleranceSelection ), NULL, this );
85}
const char * name
Definition: DXF_plotter.cpp:56
CALCULATOR_PANEL(wxWindow *aParent, wxWindowID aId, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aName)
wxStaticBitmap * m_Band_tol_bitmap
virtual void OnToleranceSelection(wxCommandEvent &event)
wxStaticText * m_staticTextBand4
wxStaticText * m_staticTextBand1
wxStaticText * m_staticTextBand5
wxStaticText * m_staticTextBand3
wxStaticBitmap * m_Band2bitmap
wxStaticBitmap * m_Band4bitmap
wxStaticBitmap * m_Band_mult_bitmap
wxStaticText * m_staticTextBand6
wxStaticBitmap * m_Band1bitmap
wxStaticBitmap * m_Band3bitmap
wxStaticText * m_staticTextBand2
#define _(s)

References _, m_Band1bitmap, m_Band2bitmap, m_Band3bitmap, m_Band4bitmap, m_Band_mult_bitmap, m_Band_tol_bitmap, m_rbToleranceSelection, m_staticTextBand1, m_staticTextBand2, m_staticTextBand3, m_staticTextBand4, m_staticTextBand5, m_staticTextBand6, and OnToleranceSelection().

◆ ~PANEL_COLOR_CODE_BASE()

PANEL_COLOR_CODE_BASE::~PANEL_COLOR_CODE_BASE ( )

Definition at line 87 of file panel_color_code_base.cpp.

88{
89 // Disconnect Events
90 m_rbToleranceSelection->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PANEL_COLOR_CODE_BASE::OnToleranceSelection ), NULL, this );
91
92}

References m_rbToleranceSelection, and OnToleranceSelection().

Member Function Documentation

◆ LoadSettings()

virtual void CALCULATOR_PANEL::LoadSettings ( PCB_CALCULATOR_SETTINGS aCfg)
pure virtualinherited

◆ OnToleranceSelection()

virtual void PANEL_COLOR_CODE_BASE::OnToleranceSelection ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_COLOR_CODE.

Definition at line 54 of file panel_color_code_base.h.

54{ event.Skip(); }

Referenced by PANEL_COLOR_CODE_BASE(), and ~PANEL_COLOR_CODE_BASE().

◆ SaveSettings()

virtual void CALCULATOR_PANEL::SaveSettings ( PCB_CALCULATOR_SETTINGS aCfg)
pure virtualinherited

◆ ThemeChanged()

virtual void CALCULATOR_PANEL::ThemeChanged ( )
pure virtualinherited

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

Implemented in PANEL_BOARD_CLASS, PANEL_CABLE_SIZE, PANEL_COLOR_CODE, PANEL_ELECTRICAL_SPACING, PANEL_E_SERIES, PANEL_FUSING_CURRENT, PANEL_GALVANIC_CORROSION, PANEL_REGULATOR, PANEL_RF_ATTENUATORS, PANEL_TRACK_WIDTH, PANEL_TRANSLINE, PANEL_VIA_SIZE, and PANEL_WAVELENGTH.

Member Data Documentation

◆ m_Band1bitmap

wxStaticBitmap* PANEL_COLOR_CODE_BASE::m_Band1bitmap
protected

◆ m_Band2bitmap

wxStaticBitmap* PANEL_COLOR_CODE_BASE::m_Band2bitmap
protected

◆ m_Band3bitmap

wxStaticBitmap* PANEL_COLOR_CODE_BASE::m_Band3bitmap
protected

◆ m_Band4bitmap

wxStaticBitmap* PANEL_COLOR_CODE_BASE::m_Band4bitmap
protected

◆ m_Band_mult_bitmap

wxStaticBitmap* PANEL_COLOR_CODE_BASE::m_Band_mult_bitmap
protected

◆ m_Band_tol_bitmap

wxStaticBitmap* PANEL_COLOR_CODE_BASE::m_Band_tol_bitmap
protected

◆ m_rbToleranceSelection

wxRadioBox* PANEL_COLOR_CODE_BASE::m_rbToleranceSelection
protected

◆ m_staticTextBand1

wxStaticText* PANEL_COLOR_CODE_BASE::m_staticTextBand1
protected

Definition at line 40 of file panel_color_code_base.h.

Referenced by PANEL_COLOR_CODE_BASE().

◆ m_staticTextBand2

wxStaticText* PANEL_COLOR_CODE_BASE::m_staticTextBand2
protected

Definition at line 41 of file panel_color_code_base.h.

Referenced by PANEL_COLOR_CODE_BASE().

◆ m_staticTextBand3

wxStaticText* PANEL_COLOR_CODE_BASE::m_staticTextBand3
protected

Definition at line 42 of file panel_color_code_base.h.

Referenced by PANEL_COLOR_CODE_BASE().

◆ m_staticTextBand4

wxStaticText* PANEL_COLOR_CODE_BASE::m_staticTextBand4
protected

◆ m_staticTextBand5

wxStaticText* PANEL_COLOR_CODE_BASE::m_staticTextBand5
protected

Definition at line 44 of file panel_color_code_base.h.

Referenced by PANEL_COLOR_CODE_BASE().

◆ m_staticTextBand6

wxStaticText* PANEL_COLOR_CODE_BASE::m_staticTextBand6
protected

Definition at line 45 of file panel_color_code_base.h.

Referenced by PANEL_COLOR_CODE_BASE().


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