KiCad PCB EDA Suite
transline.cpp File Reference
#include <cmath>
#include <limits>
#include "transline.h"
#include "units.h"
#include <cstdio>

Go to the source code of this file.

Macros

#define INFINITY   std::numeric_limits<double>::infinity()
 
#define M_PI_2   ( M_PI / 2 )
 
#define NR_EPSI   2.2204460492503131e-16
 
#define MAX_ERROR   0.000001
 

Functions

void SetPropertyInDialog (enum PRMS_ID aPrmId, double value)
 
void SetResultInDialog (int line, const char *text)
 
void SetResultInDialog (int aLineNumber, double aValue, const char *aText)
 
double GetPropertyInDialog (enum PRMS_ID aPrmId)
 
bool IsSelectedInDialog (enum PRMS_ID aPrmId)
 
void SetPropertyBgColorInDialog (enum PRMS_ID aPrmId, const KIGFX::COLOR4D *aCol)
 Function SetPropertyBgColorInDialog Set the background color of a parameter. More...
 

Macro Definition Documentation

◆ INFINITY

#define INFINITY   std::numeric_limits<double>::infinity()

Definition at line 32 of file transline.cpp.

◆ M_PI_2

#define M_PI_2   ( M_PI / 2 )

Definition at line 37 of file transline.cpp.

◆ MAX_ERROR

#define MAX_ERROR   0.000001

Definition at line 320 of file transline.cpp.

◆ NR_EPSI

#define NR_EPSI   2.2204460492503131e-16

Definition at line 245 of file transline.cpp.

Function Documentation

◆ GetPropertyInDialog()

double GetPropertyInDialog ( enum PRMS_ID  aPrmId)

Definition at line 118 of file params_read_write.cpp.

119 {
120  PCB_CALCULATOR_FRAME* frame = (PCB_CALCULATOR_FRAME*) wxTheApp->GetTopWindow();
121  return frame->GetPrmValue( aPrmId );
122 }
double GetPrmValue(enum PRMS_ID aPrmId) const
Function GetPrmValue Returns a param value.

References PCB_CALCULATOR_FRAME::GetPrmValue().

Referenced by TRANSLINE::getProperty().

◆ IsSelectedInDialog()

bool IsSelectedInDialog ( enum PRMS_ID  aPrmId)

Definition at line 126 of file params_read_write.cpp.

127 {
128  PCB_CALCULATOR_FRAME* frame = (PCB_CALCULATOR_FRAME*) wxTheApp->GetTopWindow();
129  return frame->IsPrmSelected( aPrmId );
130 }
bool IsPrmSelected(enum PRMS_ID aPrmId) const
Function IsPrmSelected.

References PCB_CALCULATOR_FRAME::IsPrmSelected().

Referenced by TRANSLINE::isSelected().

◆ SetPropertyBgColorInDialog()

void SetPropertyBgColorInDialog ( enum PRMS_ID  aPrmId,
const KIGFX::COLOR4D aCol 
)

Function SetPropertyBgColorInDialog Set the background color of a parameter.

Parameters
aPrmId= param id to set
aCol= new color

Definition at line 90 of file params_read_write.cpp.

91 {
92  PCB_CALCULATOR_FRAME* frame = (PCB_CALCULATOR_FRAME*) wxTheApp->GetTopWindow();
93  frame->SetPrmBgColor( aPrmId, aCol );
94 }
void SetPrmBgColor(enum PRMS_ID aPrmId, const KIGFX::COLOR4D *aCol)
Function SetPrgmBgColor Set the background color of a parameter.

References PCB_CALCULATOR_FRAME::SetPrmBgColor().

Referenced by TRANSLINE::setErrorLevel().

◆ SetPropertyInDialog()

void SetPropertyInDialog ( enum PRMS_ID  aPrmId,
double  value 
)

Definition at line 84 of file params_read_write.cpp.

85 {
86  PCB_CALCULATOR_FRAME* frame = (PCB_CALCULATOR_FRAME*) wxTheApp->GetTopWindow();
87  frame->SetPrmValue( aPrmId, value );
88 }
void SetPrmValue(enum PRMS_ID aPrmId, double aValue)
Function SetPrmValue Read/write params values and results.

References PCB_CALCULATOR_FRAME::SetPrmValue().

Referenced by TRANSLINE::setProperty().

◆ SetResultInDialog() [1/2]

void SetResultInDialog ( int  line,
const char *  text 
)

Definition at line 98 of file params_read_write.cpp.

99 {
100  PCB_CALCULATOR_FRAME* frame = (PCB_CALCULATOR_FRAME*) wxTheApp->GetTopWindow();
101  wxString msg = wxString::FromUTF8( aText );
102  frame->SetResult( line, msg );
103 }
void SetResult(int aLineNumber, const wxString &aText)
Function SetResult Puts the text into the given result line.

References PCB_CALCULATOR_FRAME::SetResult().

Referenced by TRANSLINE::setResult().

◆ SetResultInDialog() [2/2]

void SetResultInDialog ( int  aLineNumber,
double  aValue,
const char *  aText 
)

Definition at line 107 of file params_read_write.cpp.

108 {
109  PCB_CALCULATOR_FRAME* frame = (PCB_CALCULATOR_FRAME*) wxTheApp->GetTopWindow();
110  wxString msg = wxString::FromUTF8( aText );
111  wxString fullmsg;
112  fullmsg.Printf( wxT( "%g " ), aValue );
113  fullmsg += msg;
114  frame->SetResult( aLineNumber, fullmsg );
115 }
void SetResult(int aLineNumber, const wxString &aText)
Function SetResult Puts the text into the given result line.

References PCB_CALCULATOR_FRAME::SetResult().