|
KiCad PCB EDA Suite
|
A SPICE_VALUE_FORMAT holds precision and range info for formatting values.Helper class to handle Spice way of expressing values (e.g. 10.5 Meg) More...
#include <spice_value.h>
Public Member Functions | |
| void | FromString (const wxString &aString) |
| wxString | ToString () const |
| void | UpdateUnits (const wxString &aUnits) |
Public Attributes | |
| int | Precision |
| wxString | Range |
A SPICE_VALUE_FORMAT holds precision and range info for formatting values.Helper class to handle Spice way of expressing values (e.g. 10.5 Meg)
The Precision field indicates the number of significant digits to show in the result.
The range field gives the SI unit prefix for the range or '~' for auto-range, and the units. For instance "mV" or "~Hz".
Definition at line 38 of file spice_value.h.
| void SPICE_VALUE_FORMAT::FromString | ( | const wxString & | aString | ) |
Definition at line 37 of file spice_value.cpp.
| wxString SPICE_VALUE_FORMAT::ToString | ( | ) | const |
Definition at line 54 of file spice_value.cpp.
References Precision, and Range.
Referenced by SIMULATOR_FRAME_UI::SetMeasureFormat().
| void SPICE_VALUE_FORMAT::UpdateUnits | ( | const wxString & | aUnits | ) |
Definition at line 60 of file spice_value.cpp.
References SPICE_VALUE::ParseSIPrefix(), SPICE_VALUE::PFX_NONE, and Range.
Referenced by SIMULATOR_FRAME_UI::UpdateMeasurement().
| int SPICE_VALUE_FORMAT::Precision |
Definition at line 45 of file spice_value.h.
Referenced by DIALOG_SIM_FORMAT_VALUE::DIALOG_SIM_FORMAT_VALUE(), FromString(), SPICE_VALUE::ToString(), and ToString().
| wxString SPICE_VALUE_FORMAT::Range |
Definition at line 46 of file spice_value.h.
Referenced by DIALOG_SIM_FORMAT_VALUE::DIALOG_SIM_FORMAT_VALUE(), FromString(), SPICE_VALUE::ToString(), ToString(), and UpdateUnits().