27 #ifndef DIALOG_SIM_SETTINGS_BASE_H 28 #define DIALOG_SIM_SETTINGS_BASE_H 33 #include <wx/valnum.h> 42 DIALOG_SIM_SETTINGS( wxWindow* aParent, std::shared_ptr<SPICE_SIMULATOR_SETTINGS>& aSettings );
94 wxQueueEvent(
m_dcEnable2,
new wxCommandEvent( wxEVT_CHECKBOX ) );
104 wxString
evaluateDCControls( wxChoice* aDcSource, wxTextCtrl* aDcStart, wxTextCtrl* aDcStop,
105 wxTextCtrl* aDcIncr );
115 void updateDCUnits( wxChar aType, wxChoice* aSource, wxStaticText* aStartValUnit,
116 wxStaticText* aEndValUnit, wxStaticText* aStepUnit );
118 virtual void onInitDlg( wxInitDialogEvent& event )
override 165 return wxString( wxT(
"dec" ) );
168 return wxString( wxT(
"oct" ) );
171 return wxString( wxT(
"lin" ) );
174 wxASSERT_MSG(
false, wxT(
"Unhandled scale type" ) );
176 return wxEmptyString;
std::shared_ptr< SPICE_SIMULATOR_SETTINGS > m_settings
bool SetSimCommand(const wxString &aCommand)
SPICE_VALIDATOR m_spiceEmptyValidator
wxString evaluateDCControls(wxChoice *aDcSource, wxTextCtrl *aDcStart, wxTextCtrl *aDcStop, wxTextCtrl *aDcIncr)
Read values from one DC sweep source to form a part of simulation command.
void onDCSource2Selected(wxCommandEvent &event) override
static wxString scaleToString(int aOption)
Class DIALOG_SIM_SETTINGS_BASE.
wxStaticText * m_src2DCStartValUnit
void onDCSource1Selected(wxCommandEvent &event) override
wxStaticText * m_src1DCStepUnit
void onSwapDCSources(wxCommandEvent &event) override
const wxString & GetSimCommand() const
wxChoice * m_dcSourceType1
SPICE_VALIDATOR m_spiceValidator
DIALOG_SIM_SETTINGS(wxWindow *aParent, std::shared_ptr< SPICE_SIMULATOR_SETTINGS > &aSettings)
void updateDCSources(wxChar aType, wxChoice *aSource)
Update DC sweep source with symbols from schematic.
bool parseCommand(const wxString &aCommand)
Parse a Spice directive.
wxStaticText * m_src2DCStepUnit
void SetNetlistExporter(NETLIST_EXPORTER_PSPICE_SIM *aExporter)
wxStaticText * m_src2DCEndValUnit
bool TransferDataFromWindow() override
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
void onLoadDirectives(wxCommandEvent &event) override
virtual bool Validate() override
NETLIST_EXPORTER_PSPICE_SIM * m_exporter
wxStaticText * m_src1DCEndValUnit
bool TransferDataToWindow() override
wxIntegerValidator< int > m_posIntValidator
wxChoice * m_dcSourceType2
int GetNetlistOptions() const
void updateDCUnits(wxChar aType, wxChoice *aSource, wxStaticText *aStartValUnit, wxStaticText *aEndValUnit, wxStaticText *aStepUnit)
Update units on labels depending on selected source.
virtual void onInitDlg(wxInitDialogEvent &event) override
wxStaticText * m_src1DCStartValUnit
void onDCEnableSecondSource(wxCommandEvent &event) override
Storage for simulator specific settings.
Special netlist exporter flavor that allows one to override simulation commands.