KiCad PCB EDA Suite
PANEL_PCBNEW_DISPLAY_OPTIONS Class Reference

#include <panel_pcbnew_display_options.h>

Inheritance diagram for PANEL_PCBNEW_DISPLAY_OPTIONS:
PANEL_PCBNEW_DISPLAY_OPTIONS_BASE

Public Member Functions

 PANEL_PCBNEW_DISPLAY_OPTIONS (PCB_EDIT_FRAME *aFrame, PAGED_DIALOG *aWindow)
 
bool TransferDataFromWindow () override
 
bool TransferDataToWindow () override
 

Protected Types

enum  { ID_SHOW_CLEARANCE = 1000 }
 

Protected Attributes

wxBoxSizer * m_galOptionsSizer
 
wxRadioBox * m_ShowNetNamesOption
 
wxCheckBox * m_OptDisplayPadNumber
 
wxCheckBox * m_OptDisplayPadNoConn
 
wxRadioBox * m_OptDisplayTracksClearance
 
wxCheckBox * m_OptDisplayPadClearence
 

Private Attributes

PCB_EDIT_FRAMEm_frame
 
GAL_OPTIONS_PANELm_galOptsPanel
 

Detailed Description

Definition at line 25 of file panel_pcbnew_display_options.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
ID_SHOW_CLEARANCE 

Definition at line 35 of file panel_pcbnew_display_options_base.h.

Constructor & Destructor Documentation

◆ PANEL_PCBNEW_DISPLAY_OPTIONS()

PANEL_PCBNEW_DISPLAY_OPTIONS::PANEL_PCBNEW_DISPLAY_OPTIONS ( PCB_EDIT_FRAME aFrame,
PAGED_DIALOG aWindow 
)

Definition at line 47 of file panel_pcbnew_display_options.cpp.

48  :
49  PANEL_PCBNEW_DISPLAY_OPTIONS_BASE( aParent->GetTreebook() ),
50  m_frame( aFrame )
51 {
53  m_galOptsPanel = new GAL_OPTIONS_PANEL( this, galOptions );
54 
55  m_galOptionsSizer->Add( m_galOptsPanel, 1, wxEXPAND, 0 );
56 }
KIGFX::GAL_DISPLAY_OPTIONS & GetGalDisplayOptions()
Return a reference to the gal rendering options used by GAL for rendering.
Definition: draw_frame.h:953
PANEL_PCBNEW_DISPLAY_OPTIONS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL)

References EDA_DRAW_FRAME::GetGalDisplayOptions(), m_frame, PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::m_galOptionsSizer, and m_galOptsPanel.

Member Function Documentation

◆ TransferDataFromWindow()

bool PANEL_PCBNEW_DISPLAY_OPTIONS::TransferDataFromWindow ( )
override

Definition at line 80 of file panel_pcbnew_display_options.cpp.

81 {
83 
86 
87  displ_opts->m_DisplayPadIsol = m_OptDisplayPadClearence->GetValue();
88  displ_opts->m_DisplayPadNum = m_OptDisplayPadNumber->GetValue();
89 
91 
92  displ_opts->m_DisplayNetNamesMode = m_ShowNetNamesOption->GetSelection();
93 
95 
96  // Apply changes to the GAL
98  KIGFX::PCB_PAINTER* painter = static_cast<KIGFX::PCB_PAINTER*>( view->GetPainter() );
99  KIGFX::PCB_RENDER_SETTINGS* settings = painter->GetSettings();
100  settings->LoadDisplayOptions( displ_opts, m_frame->ShowPageLimits() );
101  view->RecacheAllItems();
103 
104  m_frame->GetCanvas()->Refresh();
105 
106  return true;
107 }
show a marker on pads with no nets
void SetElementVisibility(GAL_LAYER_ID aElement, bool aNewState)
Function SetElementVisibility changes the visibility of an element category.
EDA_DRAW_PANEL_GAL * GetGalCanvas() const
Return a pointer to GAL-based canvas of given EDA draw frame.
Definition: draw_frame.h:935
void RecacheAllItems()
Function RecacheAllItems() Rebuilds GAL display lists.
Definition: view.cpp:1401
Class PCB_PAINTER Contains methods for drawing PCB-specific items.
Definition: pcb_painter.h:211
PAINTER * GetPainter() const
Function GetPainter() Returns the painter object used by the view for drawing VIEW_ITEMS.
Definition: view.h:199
void * GetDisplayOptions() override
Function GetDisplayOptions returns the display options current in use Display options are relative to...
bool ShowPageLimits() const
Definition: draw_frame.h:392
TRACE_CLEARANCE_DISPLAY_MODE_T m_ShowTrackClearanceMode
How trace clearances are displayed.
Auxiliary rendering target (noncached)
Definition: definitions.h:49
Class PCB_RENDER_SETTINGS Stores PCB specific render settings.
Definition: pcb_painter.h:62
static const UTIL::CFG_MAP< PCB_DISPLAY_OPTIONS::TRACE_CLEARANCE_DISPLAY_MODE_T > traceClearanceSelectMap
Class PCB_DISPLAY_OPTIONS handles display options like enable/disable some optional drawings.
virtual PCB_RENDER_SETTINGS * GetSettings() override
Function GetSettings Returns pointer to current settings that are going to be used when drawing items...
Definition: pcb_painter.h:223
void MarkTargetDirty(int aTarget)
Function MarkTargetDirty() Sets or clears target 'dirty' flag.
Definition: view.h:596
virtual EDA_DRAW_PANEL * GetCanvas() const
Definition: draw_frame.h:395
static CFG_NATIVE_VAL< MAP > GetValFromConfig(const MAP &aMap, long aConf)
Get the native value corresponding to the config value (read from file or UI, probably) and find it i...
Definition: config_map.h:96
void LoadDisplayOptions(const PCB_DISPLAY_OPTIONS *aOptions, bool aShowPageLimits)
Function LoadDisplayOptions Loads settings related to display options (high-contrast mode,...
KIGFX::VIEW * GetView() const
Function GetView() Returns a pointer to the VIEW instance used in the panel.
Class VIEW.
Definition: view.h:61
virtual void Refresh(bool eraseBackground=true, const wxRect *rect=NULL)
bool TransferDataFromWindow() override
Read the options set in the UI into the given options object.

References EDA_DRAW_FRAME::GetCanvas(), PCB_BASE_FRAME::GetDisplayOptions(), EDA_DRAW_FRAME::GetGalCanvas(), KIGFX::VIEW::GetPainter(), KIGFX::PCB_PAINTER::GetSettings(), UTIL::GetValFromConfig(), EDA_DRAW_PANEL_GAL::GetView(), LAYER_NO_CONNECTS, KIGFX::PCB_RENDER_SETTINGS::LoadDisplayOptions(), PCB_DISPLAY_OPTIONS::m_DisplayNetNamesMode, PCB_DISPLAY_OPTIONS::m_DisplayPadIsol, PCB_DISPLAY_OPTIONS::m_DisplayPadNum, m_frame, m_galOptsPanel, PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::m_OptDisplayPadClearence, PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::m_OptDisplayPadNoConn, PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::m_OptDisplayPadNumber, PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::m_OptDisplayTracksClearance, PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::m_ShowNetNamesOption, PCB_DISPLAY_OPTIONS::m_ShowTrackClearanceMode, KIGFX::VIEW::MarkTargetDirty(), KIGFX::VIEW::RecacheAllItems(), EDA_DRAW_PANEL::Refresh(), PCB_EDIT_FRAME::SetElementVisibility(), EDA_DRAW_FRAME::ShowPageLimits(), KIGFX::TARGET_NONCACHED, traceClearanceSelectMap, and GAL_OPTIONS_PANEL::TransferDataFromWindow().

◆ TransferDataToWindow()

bool PANEL_PCBNEW_DISPLAY_OPTIONS::TransferDataToWindow ( )
override

Definition at line 59 of file panel_pcbnew_display_options.cpp.

60 {
62 
65 
66  m_OptDisplayPadClearence->SetValue( displ_opts->m_DisplayPadIsol );
67  m_OptDisplayPadNumber->SetValue( displ_opts->m_DisplayPadNum );
69  m_ShowNetNamesOption->SetSelection( displ_opts->m_DisplayNetNamesMode );
70 
72 
73  return true;
74 }
show a marker on pads with no nets
void * GetDisplayOptions() override
Function GetDisplayOptions returns the display options current in use Display options are relative to...
TRACE_CLEARANCE_DISPLAY_MODE_T m_ShowTrackClearanceMode
How trace clearances are displayed.
static const UTIL::CFG_MAP< PCB_DISPLAY_OPTIONS::TRACE_CLEARANCE_DISPLAY_MODE_T > traceClearanceSelectMap
Class PCB_DISPLAY_OPTIONS handles display options like enable/disable some optional drawings.
bool TransferDataToWindow() override
Load the panel controls from the given opt.
bool IsElementVisible(GAL_LAYER_ID aElement) const
Function IsElementVisible tests whether a given element category is visible.
static long GetConfigForVal(const MAP &aMap, CFG_NATIVE_VAL< MAP > aVal)
Get the mapped config value (the one to write to file, or use in an index) from the given native (pro...
Definition: config_map.h:69

References UTIL::GetConfigForVal(), PCB_BASE_FRAME::GetDisplayOptions(), PCB_EDIT_FRAME::IsElementVisible(), LAYER_NO_CONNECTS, PCB_DISPLAY_OPTIONS::m_DisplayNetNamesMode, PCB_DISPLAY_OPTIONS::m_DisplayPadIsol, PCB_DISPLAY_OPTIONS::m_DisplayPadNum, m_frame, m_galOptsPanel, PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::m_OptDisplayPadClearence, PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::m_OptDisplayPadNoConn, PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::m_OptDisplayPadNumber, PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::m_OptDisplayTracksClearance, PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::m_ShowNetNamesOption, PCB_DISPLAY_OPTIONS::m_ShowTrackClearanceMode, traceClearanceSelectMap, and GAL_OPTIONS_PANEL::TransferDataToWindow().

Member Data Documentation

◆ m_frame

PCB_EDIT_FRAME* PANEL_PCBNEW_DISPLAY_OPTIONS::m_frame
private

◆ m_galOptionsSizer

wxBoxSizer* PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::m_galOptionsSizer
protectedinherited

◆ m_galOptsPanel

GAL_OPTIONS_PANEL* PANEL_PCBNEW_DISPLAY_OPTIONS::m_galOptsPanel
private

◆ m_OptDisplayPadClearence

wxCheckBox* PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::m_OptDisplayPadClearence
protectedinherited

◆ m_OptDisplayPadNoConn

wxCheckBox* PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::m_OptDisplayPadNoConn
protectedinherited

◆ m_OptDisplayPadNumber

wxCheckBox* PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::m_OptDisplayPadNumber
protectedinherited

◆ m_OptDisplayTracksClearance

wxRadioBox* PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::m_OptDisplayTracksClearance
protectedinherited

◆ m_ShowNetNamesOption

wxRadioBox* PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::m_ShowNetNamesOption
protectedinherited

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