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 42 of file spice_value.h.
void SPICE_VALUE_FORMAT::FromString | ( | const wxString & | aString | ) |
Definition at line 41 of file spice_value.cpp.
References Precision, and Range.
Referenced by SIMULATOR_FRAME_UI::GetMeasureFormat(), SIMULATOR_FRAME_UI::loadJsonWorkbook(), and SIMULATOR_FRAME_UI::parseTraceParams().
wxString SPICE_VALUE_FORMAT::ToString | ( | ) | const |
Definition at line 58 of file spice_value.cpp.
References Precision, and Range.
Referenced by SIMULATOR_FRAME_UI::SaveWorkbook(), and SIMULATOR_FRAME_UI::SetMeasureFormat().
void SPICE_VALUE_FORMAT::UpdateUnits | ( | const wxString & | aUnits | ) |
Definition at line 64 of file spice_value.cpp.
References SPICE_VALUE::ParseSIPrefix(), SPICE_VALUE::PFX_NONE, and Range.
Referenced by SIMULATOR_FRAME_UI::UpdateMeasurement(), and SIMULATOR_FRAME_UI::updatePlotCursors().
int SPICE_VALUE_FORMAT::Precision |
Definition at line 49 of file spice_value.h.
Referenced by DIALOG_SIM_FORMAT_VALUE::DIALOG_SIM_FORMAT_VALUE(), FromString(), ToString(), SPICE_VALUE::ToString(), and DIALOG_SIM_FORMAT_VALUE::TransferDataFromWindow().
wxString SPICE_VALUE_FORMAT::Range |
Definition at line 50 of file spice_value.h.
Referenced by DIALOG_SIM_FORMAT_VALUE::DIALOG_SIM_FORMAT_VALUE(), FromString(), ToString(), SPICE_VALUE::ToString(), DIALOG_SIM_FORMAT_VALUE::TransferDataFromWindow(), and UpdateUnits().