KiCad PCB EDA Suite
UNIT_SELECTOR_ANGLE Class Reference

#include <unit_selector.h>

Inheritance diagram for UNIT_SELECTOR_ANGLE:
UNIT_SELECTOR

Public Member Functions

 UNIT_SELECTOR_ANGLE (wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, const wxArrayString &choices, long style=0)
 
virtual double GetUnitScale () override
 Function GetUnitScale. More...
 
wxString GetUnitName ()
 

Detailed Description

Definition at line 102 of file unit_selector.h.

Constructor & Destructor Documentation

◆ UNIT_SELECTOR_ANGLE()

UNIT_SELECTOR_ANGLE::UNIT_SELECTOR_ANGLE ( wxWindow *  parent,
wxWindowID  id,
const wxPoint &  pos,
const wxSize &  size,
const wxArrayString &  choices,
long  style = 0 
)

Definition at line 124 of file unit_selector.cpp.

126  :
127  UNIT_SELECTOR( parent, id, pos, size, choices, style )
128 {
129  Append( _( "Radian" ) );
130  Append( _( "Degree" ) );
131 }
UNIT_SELECTOR(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, const wxArrayString &choices, long style=0)
Definition: unit_selector.h:37
#define _(s)
Definition: 3d_actions.cpp:33

References _.

Member Function Documentation

◆ GetUnitName()

wxString UNIT_SELECTOR::GetUnitName ( )
inlineinherited

Definition at line 51 of file unit_selector.h.

52  {
53  return GetStringSelection();
54  }

Referenced by PCB_CALCULATOR_FRAME::TWDisplayValues().

◆ GetUnitScale()

double UNIT_SELECTOR_ANGLE::GetUnitScale ( )
overridevirtual

Function GetUnitScale.

Returns
the scaling factor to convert users units to normalized units (Hz)

Implements UNIT_SELECTOR.

Definition at line 138 of file unit_selector.cpp.

139 {
140  switch( GetCurrentSelection() )
141  {
142  case 0: return UNIT_RADIAN; break;
143  case 1: return UNIT_DEGREE; break;
144  }
145  return 1.0;
146 }
#define UNIT_RADIAN
Definition: units_scales.h:43
#define UNIT_DEGREE
Definition: units_scales.h:42

References UNIT_DEGREE, and UNIT_RADIAN.


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