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 34 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 45 of file panel_pcbnew_display_options.cpp.

46  :
47  PANEL_PCBNEW_DISPLAY_OPTIONS_BASE( aParent->GetTreebook() ),
48  m_frame( aFrame )
49 {
51  m_galOptsPanel = new GAL_OPTIONS_PANEL( this, galOptions );
52 
53  m_galOptionsSizer->Add( m_galOptsPanel, 1, wxEXPAND, 0 );
54 }
KIGFX::GAL_DISPLAY_OPTIONS & GetGalDisplayOptions()
Return a reference to the gal rendering options used by GAL for rendering.
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, const wxString &name=wxEmptyString)

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 78 of file panel_pcbnew_display_options.cpp.

79 {
81 
84 
85  displ_opts->m_DisplayPadIsol = m_OptDisplayPadClearence->GetValue();
86  displ_opts->m_DisplayPadNum = m_OptDisplayPadNumber->GetValue();
87 
89 
90  displ_opts->m_DisplayNetNamesMode = m_ShowNetNamesOption->GetSelection();
91 
93 
94  // Apply changes to the GAL
95  KIGFX::VIEW* view = m_frame->GetCanvas()->GetView();
96  KIGFX::PCB_PAINTER* painter = static_cast<KIGFX::PCB_PAINTER*>( view->GetPainter() );
97  KIGFX::PCB_RENDER_SETTINGS* settings = painter->GetSettings();
98 
99  settings->LoadDisplayOptions( displ_opts, m_frame->ShowPageLimits() );
101 
102  view->RecacheAllItems();
104 
105  return true;
106 }
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.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
void RecacheAllItems()
Function RecacheAllItems() Rebuilds GAL display lists.
Definition: view.cpp:1402
Class PCB_PAINTER Contains methods for drawing PCB-specific items.
Definition: pcb_painter.h:226
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
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:61
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:238
void MarkTargetDirty(int aTarget)
Function MarkTargetDirty() Sets or clears target 'dirty' flag.
Definition: view.h:585
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
virtual KIGFX::PCB_VIEW * GetView() const override
Function GetView() Returns a pointer to the VIEW instance used in the panel.
void LoadDisplayOptions(const PCB_DISPLAY_OPTIONS *aOptions, bool aShowPageLimits)
Function LoadDisplayOptions Loads settings related to display options (high-contrast mode,...
Class VIEW.
Definition: view.h:61
bool TransferDataFromWindow() override
Read the options set in the UI into the given options object.

References PCB_BASE_FRAME::GetCanvas(), PCB_BASE_FRAME::GetDisplayOptions(), KIGFX::VIEW::GetPainter(), KIGFX::PCB_PAINTER::GetSettings(), UTIL::GetValFromConfig(), PCB_DRAW_PANEL_GAL::GetView(), LAYER_NO_CONNECTS, LAYER_RATSNEST, 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, PCB_DISPLAY_OPTIONS::m_ShowGlobalRatsnest, PANEL_PCBNEW_DISPLAY_OPTIONS_BASE::m_ShowNetNamesOption, PCB_DISPLAY_OPTIONS::m_ShowTrackClearanceMode, KIGFX::VIEW::MarkTargetDirty(), KIGFX::VIEW::RecacheAllItems(), 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 57 of file panel_pcbnew_display_options.cpp.

58 {
60 
63 
64  m_OptDisplayPadClearence->SetValue( displ_opts->m_DisplayPadIsol );
65  m_OptDisplayPadNumber->SetValue( displ_opts->m_DisplayPadNum );
67  m_ShowNetNamesOption->SetSelection( displ_opts->m_DisplayNetNamesMode );
68 
70 
71  return true;
72 }
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: