KiCad PCB EDA Suite
PANEL_GERBVIEW_SETTINGS Class Reference

#include <panel_gerbview_settings.h>

Inheritance diagram for PANEL_GERBVIEW_SETTINGS:
PANEL_GERBVIEW_SETTINGS_BASE

Public Member Functions

 PANEL_GERBVIEW_SETTINGS (GERBVIEW_FRAME *aFrame, wxWindow *aWindow)
 
 ~PANEL_GERBVIEW_SETTINGS ()
 

Protected Attributes

wxBoxSizer * m_UpperSizer
 
wxRadioBox * m_PolarDisplay
 
wxRadioBox * m_BoxUnits
 
wxRadioBox * m_PageSize
 
wxCheckBox * m_ShowPageLimitsOpt
 

Private Member Functions

bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 

Private Attributes

GERBVIEW_FRAMEm_Parent
 

Detailed Description

Definition at line 32 of file panel_gerbview_settings.h.

Constructor & Destructor Documentation

◆ PANEL_GERBVIEW_SETTINGS()

PANEL_GERBVIEW_SETTINGS::PANEL_GERBVIEW_SETTINGS ( GERBVIEW_FRAME aFrame,
wxWindow *  aWindow 
)

Definition at line 30 of file panel_gerbview_settings.cpp.

30  :
31  PANEL_GERBVIEW_SETTINGS_BASE( aWindow, wxID_ANY ),
32  m_Parent( aFrame )
33 {
34 }
PANEL_GERBVIEW_SETTINGS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL)

◆ ~PANEL_GERBVIEW_SETTINGS()

PANEL_GERBVIEW_SETTINGS::~PANEL_GERBVIEW_SETTINGS ( )
inline

Definition at line 39 of file panel_gerbview_settings.h.

39 {};

Member Function Documentation

◆ TransferDataFromWindow()

bool PANEL_GERBVIEW_SETTINGS::TransferDataFromWindow ( )
overrideprivate

Definition at line 56 of file panel_gerbview_settings.cpp.

57 {
58  m_Parent->SetShowPolarCoords( m_PolarDisplay->GetSelection() != 0 );
59  m_Parent->SetUserUnits( m_BoxUnits->GetSelection() == 0 ? INCHES : MILLIMETRES );
61 
62  PAGE_INFO pageInfo( g_GerberPageSizeList[ m_PageSize->GetSelection() ] );
63  m_Parent->SetPageSettings( pageInfo );
64 
65  return true;
66 }
void SetUserUnits(EDA_UNITS_T aUnits)
void SetPageSettings(const PAGE_INFO &aPageSettings) override
void SetShowPolarCoords(bool aShow)
Class PAGE_INFO describes the page size and margins of a paper page on which to eventually print or p...
Definition: page_info.h:54
Definition: common.h:155
GBR_DISPLAY_OPTIONS m_DisplayOptions
const wxChar * g_GerberPageSizeList[]
List of page sizes.
Definition: gerbview.cpp:35

References g_GerberPageSizeList, INCHES, PANEL_GERBVIEW_SETTINGS_BASE::m_BoxUnits, GERBVIEW_FRAME::m_DisplayOptions, GBR_DISPLAY_OPTIONS::m_DisplayPageLimits, PANEL_GERBVIEW_SETTINGS_BASE::m_PageSize, m_Parent, PANEL_GERBVIEW_SETTINGS_BASE::m_PolarDisplay, PANEL_GERBVIEW_SETTINGS_BASE::m_ShowPageLimitsOpt, MILLIMETRES, GERBVIEW_FRAME::SetPageSettings(), EDA_DRAW_FRAME::SetShowPolarCoords(), and EDA_BASE_FRAME::SetUserUnits().

◆ TransferDataToWindow()

bool PANEL_GERBVIEW_SETTINGS::TransferDataToWindow ( )
overrideprivate

Definition at line 37 of file panel_gerbview_settings.cpp.

38 {
39  m_PolarDisplay->SetSelection( m_Parent->GetShowPolarCoords() ? 1 : 0 );
40  m_BoxUnits->SetSelection( m_Parent->GetUserUnits() ? 1 : 0 );
42 
43  for( unsigned i = 0; i < arrayDim( g_GerberPageSizeList ); ++i )
44  {
46  {
47  m_PageSize->SetSelection( i );
48  break;
49  }
50  }
51 
52  return true;
53 }
const wxString & GetType() const
Definition: page_info.h:97
GBR_DISPLAY_OPTIONS m_DisplayOptions
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Definition: macros.h:108
const PAGE_INFO & GetPageSettings() const override
bool GetShowPolarCoords() const
For those frames that support polar coordinates.
EDA_UNITS_T GetUserUnits() const
Return the user units currently in use.
size_t i
Definition: json11.cpp:597
const wxChar * g_GerberPageSizeList[]
List of page sizes.
Definition: gerbview.cpp:35

References arrayDim(), g_GerberPageSizeList, GERBVIEW_FRAME::GetPageSettings(), EDA_DRAW_FRAME::GetShowPolarCoords(), PAGE_INFO::GetType(), EDA_BASE_FRAME::GetUserUnits(), i, PANEL_GERBVIEW_SETTINGS_BASE::m_BoxUnits, GERBVIEW_FRAME::m_DisplayOptions, GBR_DISPLAY_OPTIONS::m_DisplayPageLimits, PANEL_GERBVIEW_SETTINGS_BASE::m_PageSize, m_Parent, PANEL_GERBVIEW_SETTINGS_BASE::m_PolarDisplay, and PANEL_GERBVIEW_SETTINGS_BASE::m_ShowPageLimitsOpt.

Member Data Documentation

◆ m_BoxUnits

wxRadioBox* PANEL_GERBVIEW_SETTINGS_BASE::m_BoxUnits
protectedinherited

◆ m_PageSize

wxRadioBox* PANEL_GERBVIEW_SETTINGS_BASE::m_PageSize
protectedinherited

◆ m_Parent

GERBVIEW_FRAME* PANEL_GERBVIEW_SETTINGS::m_Parent
private

Definition at line 35 of file panel_gerbview_settings.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_PolarDisplay

wxRadioBox* PANEL_GERBVIEW_SETTINGS_BASE::m_PolarDisplay
protectedinherited

◆ m_ShowPageLimitsOpt

wxCheckBox* PANEL_GERBVIEW_SETTINGS_BASE::m_ShowPageLimitsOpt
protectedinherited

◆ m_UpperSizer

wxBoxSizer* PANEL_GERBVIEW_SETTINGS_BASE::m_UpperSizer
protectedinherited

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