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 ( GERBVIEW_FRAME aFrame,
wxWindow *  aWindow 
)

Definition at line 31 of file panel_gerbview_settings.cpp.

31  :
32  PANEL_GERBVIEW_SETTINGS_BASE( aWindow, wxID_ANY ),
33  m_Parent( aFrame )
34 {
35 }
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 ( )
inline

Definition at line 39 of file panel_gerbview_settings.h.

References TransferDataFromWindow(), and TransferDataToWindow().

39 {};

Member Function Documentation

bool PANEL_GERBVIEW_SETTINGS::TransferDataFromWindow ( )
overrideprivate

Definition at line 57 of file panel_gerbview_settings.cpp.

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

Referenced by ~PANEL_GERBVIEW_SETTINGS().

58 {
59  m_Parent->m_DisplayOptions.m_DisplayPolarCood = ( m_PolarDisplay->GetSelection() != 0 );
60  m_Parent->SetUserUnits( m_BoxUnits->GetSelection() == 0 ? INCHES : MILLIMETRES );
62 
63  PAGE_INFO pageInfo( g_GerberPageSizeList[ m_PageSize->GetSelection() ] );
64  m_Parent->SetPageSettings( pageInfo );
65 
66  return true;
67 }
void SetPageSettings(const PAGE_INFO &aPageSettings) override
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:160
GBR_DISPLAY_OPTIONS m_DisplayOptions
bool m_DisplayPolarCood
Option to display coordinates in status bar in X,Y or Polar coords.
void SetUserUnits(EDA_UNITS_T aUnits)
Definition: draw_frame.h:285
const wxChar * g_GerberPageSizeList[]
List of page sizes.
Definition: gerbview.cpp:38
bool PANEL_GERBVIEW_SETTINGS::TransferDataToWindow ( )
overrideprivate

Definition at line 38 of file panel_gerbview_settings.cpp.

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

Referenced by ~PANEL_GERBVIEW_SETTINGS().

39 {
41  m_BoxUnits->SetSelection( m_Parent->GetUserUnits() ? 1 : 0 );
43 
44  for( unsigned i = 0; i < DIM( g_GerberPageSizeList ); ++i )
45  {
47  {
48  m_PageSize->SetSelection( i );
49  break;
50  }
51  }
52 
53  return true;
54 }
#define DIM(x)
of elements in an array
Definition: macros.h:98
EDA_UNITS_T GetUserUnits() const override
Return the user units currently in use.
Definition: draw_frame.h:284
GBR_DISPLAY_OPTIONS m_DisplayOptions
bool m_DisplayPolarCood
Option to display coordinates in status bar in X,Y or Polar coords.
const PAGE_INFO & GetPageSettings() const override
size_t i
Definition: json11.cpp:597
const wxString & GetType() const
Definition: page_info.h:97
const wxChar * g_GerberPageSizeList[]
List of page sizes.
Definition: gerbview.cpp:38

Member Data Documentation

wxRadioBox* PANEL_GERBVIEW_SETTINGS_BASE::m_BoxUnits
protectedinherited
wxRadioBox* PANEL_GERBVIEW_SETTINGS_BASE::m_PageSize
protectedinherited
GERBVIEW_FRAME* PANEL_GERBVIEW_SETTINGS::m_Parent
private

Definition at line 35 of file panel_gerbview_settings.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

wxRadioBox* PANEL_GERBVIEW_SETTINGS_BASE::m_PolarDisplay
protectedinherited
wxCheckBox* PANEL_GERBVIEW_SETTINGS_BASE::m_ShowPageLimitsOpt
protectedinherited
wxBoxSizer* PANEL_GERBVIEW_SETTINGS_BASE::m_UpperSizer
protectedinherited

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