KiCad PCB EDA Suite
TRANSLINE_PRM Class Reference

#include <transline_ident.h>

Public Member Functions

 TRANSLINE_PRM (PRM_TYPE aType, PRMS_ID aId, const char *aKeywordCfg="", const wxString &aDlgLabel=wxEmptyString, const wxString &aToolTip=wxEmptyString, double aValue=0.0, bool aConvUnit=false)
 TRANSLINE_PRM ctor. More...
 
double ToUserUnit ()
 
double FromUserUnit ()
 

Public Attributes

PRM_TYPE m_Type
 
PRMS_ID m_Id
 
std::string m_KeyWord
 
wxString m_DlgLabel
 
wxString m_ToolTip
 
double m_Value
 
double m_NormalizedValue
 
bool m_ConvUnit
 
void * m_ValueCtrl
 
void * m_UnitCtrl
 
int m_UnitSelection
 

Detailed Description

Definition at line 56 of file transline_ident.h.

Constructor & Destructor Documentation

◆ TRANSLINE_PRM()

TRANSLINE_PRM::TRANSLINE_PRM ( PRM_TYPE  aType,
PRMS_ID  aId,
const char *  aKeywordCfg = "",
const wxString &  aDlgLabel = wxEmptyString,
const wxString &  aToolTip = wxEmptyString,
double  aValue = 0.0,
bool  aConvUnit = false 
)

TRANSLINE_PRM ctor.

Parameters
aKeywordCfgis the keyword used in config to identify the parameter only ASCII7 keyword is valid
aDlgLabelis a I18n string used to identify the parameter in dialog. usually aDlgLabel is same as aKeywordCfg, but translatable

Definition at line 58 of file transline_ident.cpp.

64 {
65  m_Type = aType;
66  m_Id = aId;
67  m_DlgLabel = aDlgLabel;
68  m_KeyWord = aKeywordCfg;
69  m_ToolTip = aToolTip;
70  m_Value = aValue;
71  m_ConvUnit = aConvUnit;
72  m_ValueCtrl = NULL;
73  m_UnitCtrl = NULL;
74  m_UnitSelection = 0;
76  }
double m_NormalizedValue
wxString m_DlgLabel
wxString m_ToolTip
#define NULL
std::string m_KeyWord

References m_ConvUnit, m_DlgLabel, m_Id, m_KeyWord, m_NormalizedValue, m_ToolTip, m_Type, m_UnitCtrl, m_UnitSelection, m_Value, m_ValueCtrl, and NULL.

Member Function Documentation

◆ FromUserUnit()

double TRANSLINE_PRM::FromUserUnit ( )

Definition at line 88 of file transline_ident.cpp.

89 {
90  if( m_UnitCtrl )
91  return ( (UNIT_SELECTOR*) m_UnitCtrl )->GetUnitScale();
92  else
93  return 1.0;
94 }

References m_UnitCtrl.

◆ ToUserUnit()

double TRANSLINE_PRM::ToUserUnit ( )

Definition at line 79 of file transline_ident.cpp.

80 {
81  if( m_UnitCtrl && m_ConvUnit )
82  return 1.0 / ( (UNIT_SELECTOR*) m_UnitCtrl )->GetUnitScale();
83  else
84  return 1.0;
85 }

References m_ConvUnit, and m_UnitCtrl.

Referenced by PCB_CALCULATOR_FRAME::SetPrmValue().

Member Data Documentation

◆ m_ConvUnit

bool TRANSLINE_PRM::m_ConvUnit

◆ m_DlgLabel

wxString TRANSLINE_PRM::m_DlgLabel

◆ m_Id

◆ m_KeyWord

std::string TRANSLINE_PRM::m_KeyWord

Definition at line 61 of file transline_ident.h.

Referenced by TRANSLINE_PRM().

◆ m_NormalizedValue

◆ m_ToolTip

wxString TRANSLINE_PRM::m_ToolTip

◆ m_Type

PRM_TYPE TRANSLINE_PRM::m_Type

◆ m_UnitCtrl

◆ m_UnitSelection

int TRANSLINE_PRM::m_UnitSelection

◆ m_Value

◆ m_ValueCtrl


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