Improved Spice model dialog for sources Now user can specify both DC/AC & transient analysis specifications at once.
This commit is contained in:
parent
53d772989a
commit
741ae10a97
|
@ -69,22 +69,22 @@ DIALOG_SPICE_MODEL::DIALOG_SPICE_MODEL( wxWindow* aParent, SCH_COMPONENT& aCompo
|
|||
m_genAcMag->SetValidator( m_spiceEmptyValidator );
|
||||
m_genAcPhase->SetValidator( m_spiceEmptyValidator );
|
||||
|
||||
m_pulseInit->SetValidator( m_spiceValidator );
|
||||
m_pulseNominal->SetValidator( m_spiceValidator );
|
||||
m_pulseInit->SetValidator( m_spiceEmptyValidator );
|
||||
m_pulseNominal->SetValidator( m_spiceEmptyValidator );
|
||||
m_pulseDelay->SetValidator( m_spiceEmptyValidator );
|
||||
m_pulseRise->SetValidator( m_spiceEmptyValidator );
|
||||
m_pulseFall->SetValidator( m_spiceEmptyValidator );
|
||||
m_pulseWidth->SetValidator( m_spiceEmptyValidator );
|
||||
m_pulsePeriod->SetValidator( m_spiceEmptyValidator );
|
||||
|
||||
m_sinOffset->SetValidator( m_spiceValidator );
|
||||
m_sinAmplitude->SetValidator( m_spiceValidator );
|
||||
m_sinOffset->SetValidator( m_spiceEmptyValidator );
|
||||
m_sinAmplitude->SetValidator( m_spiceEmptyValidator );
|
||||
m_sinFreq->SetValidator( m_spiceEmptyValidator );
|
||||
m_sinDelay->SetValidator( m_spiceEmptyValidator );
|
||||
m_sinDampFactor->SetValidator( m_spiceEmptyValidator );
|
||||
|
||||
m_expInit->SetValidator( m_spiceValidator );
|
||||
m_expPulsed->SetValidator( m_spiceValidator );
|
||||
m_expInit->SetValidator( m_spiceEmptyValidator );
|
||||
m_expPulsed->SetValidator( m_spiceEmptyValidator );
|
||||
m_expRiseDelay->SetValidator( m_spiceEmptyValidator );
|
||||
m_expRiseConst->SetValidator( m_spiceEmptyValidator );
|
||||
m_expFallDelay->SetValidator( m_spiceEmptyValidator );
|
||||
|
@ -314,43 +314,57 @@ bool DIALOG_SPICE_MODEL::parsePowerSource( const wxString& aModel )
|
|||
if( aModel.IsEmpty() )
|
||||
return false;
|
||||
|
||||
// Variables used for generic values processing (filling out wxTextCtrls in sequence)
|
||||
bool genericProcessing = false;
|
||||
unsigned int genericReqParamsCount = 0;
|
||||
std::vector<wxTextCtrl*> genericControls;
|
||||
|
||||
wxStringTokenizer tokenizer( aModel, " ()" );
|
||||
wxString tkn = tokenizer.GetNextToken().Lower();
|
||||
|
||||
try
|
||||
while( tokenizer.HasMoreTokens() )
|
||||
{
|
||||
// Variables used for generic values processing (filling out wxTextCtrls in sequence)
|
||||
bool genericProcessing = false;
|
||||
unsigned int genericReqParamsCount = 0;
|
||||
std::vector<wxTextCtrl*> genericControls;
|
||||
|
||||
if( tkn == "dc" )
|
||||
{
|
||||
m_powerNotebook->SetSelection( m_powerNotebook->FindPage( m_pwrGeneric ) );
|
||||
tkn = tokenizer.GetNextToken().Lower();
|
||||
|
||||
// it might be an optional "dc" or "trans" directive
|
||||
// There might be an optional "dc" or "trans" directive, skip it
|
||||
if( tkn == "dc" || tkn == "trans" )
|
||||
tkn = tokenizer.GetNextToken().Lower();
|
||||
|
||||
// DC value
|
||||
m_genDc->SetValue( SPICE_VALUE( tkn ).ToSpiceString() );
|
||||
|
||||
if( !tokenizer.HasMoreTokens() )
|
||||
return true;
|
||||
|
||||
tkn = tokenizer.GetNextToken().Lower();
|
||||
|
||||
if( tkn != "ac" )
|
||||
try
|
||||
{
|
||||
m_genDc->SetValue( SPICE_VALUE( tkn ).ToSpiceString() );
|
||||
}
|
||||
catch( ... )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
else if( tkn == "ac" )
|
||||
{
|
||||
// AC magnitude
|
||||
tkn = tokenizer.GetNextToken().Lower();
|
||||
m_genAcMag->SetValue( SPICE_VALUE( tkn ).ToSpiceString() );
|
||||
try
|
||||
{
|
||||
tkn = tokenizer.GetNextToken().Lower();
|
||||
m_genAcMag->SetValue( SPICE_VALUE( tkn ).ToSpiceString() );
|
||||
}
|
||||
catch( ... )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// AC phase
|
||||
tkn = tokenizer.GetNextToken().Lower();
|
||||
m_genAcMag->SetValue( SPICE_VALUE( tkn ).ToSpiceString() );
|
||||
// AC phase (optional)
|
||||
try
|
||||
{
|
||||
tkn = tokenizer.GetNextToken().Lower();
|
||||
m_genAcPhase->SetValue( SPICE_VALUE( tkn ).ToSpiceString() );
|
||||
}
|
||||
catch( ... )
|
||||
{
|
||||
continue; // perhaps another directive
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -390,15 +404,22 @@ bool DIALOG_SPICE_MODEL::parsePowerSource( const wxString& aModel )
|
|||
{
|
||||
m_powerNotebook->SetSelection( m_powerNotebook->FindPage( m_pwrPwl ) );
|
||||
|
||||
while( tokenizer.HasMoreTokens() )
|
||||
try
|
||||
{
|
||||
tkn = tokenizer.GetNextToken();
|
||||
SPICE_VALUE time( tkn );
|
||||
while( tokenizer.HasMoreTokens() )
|
||||
{
|
||||
tkn = tokenizer.GetNextToken();
|
||||
SPICE_VALUE time( tkn );
|
||||
|
||||
tkn = tokenizer.GetNextToken();
|
||||
SPICE_VALUE value( tkn );
|
||||
tkn = tokenizer.GetNextToken();
|
||||
SPICE_VALUE value( tkn );
|
||||
|
||||
addPwlValue( time.ToSpiceString(), value.ToSpiceString() );
|
||||
addPwlValue( time.ToSpiceString(), value.ToSpiceString() );
|
||||
}
|
||||
}
|
||||
catch( ... )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -406,27 +427,34 @@ bool DIALOG_SPICE_MODEL::parsePowerSource( const wxString& aModel )
|
|||
else
|
||||
{
|
||||
// Unhandled power source type
|
||||
wxASSERT_MSG( false, "Unhandled power source type" );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if( genericProcessing )
|
||||
{
|
||||
for( unsigned int i = 0; i < genericControls.size(); ++i )
|
||||
try
|
||||
{
|
||||
// If there are no more tokens, let's check if we got at least required fields
|
||||
if( !tokenizer.HasMoreTokens() )
|
||||
return ( i >= genericReqParamsCount );
|
||||
for( unsigned int i = 0; i < genericControls.size(); ++i )
|
||||
{
|
||||
// If there are no more tokens, let's check if we got at least required fields
|
||||
if( !tokenizer.HasMoreTokens() )
|
||||
return ( i >= genericReqParamsCount );
|
||||
|
||||
tkn = tokenizer.GetNextToken().Lower();
|
||||
genericControls[i]->SetValue( SPICE_VALUE( tkn ).ToSpiceString() );
|
||||
tkn = tokenizer.GetNextToken().Lower();
|
||||
genericControls[i]->SetValue( SPICE_VALUE( tkn ).ToSpiceString() );
|
||||
}
|
||||
}
|
||||
catch( ... )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( std::exception& e )
|
||||
{
|
||||
// Nothing, the dialog simply will not be filled
|
||||
return false;
|
||||
|
||||
// Get the next token now, so if any of the branches catches an expection, try to
|
||||
// process it in another branch
|
||||
tkn = tokenizer.GetNextToken().Lower();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -435,45 +463,52 @@ bool DIALOG_SPICE_MODEL::parsePowerSource( const wxString& aModel )
|
|||
|
||||
bool DIALOG_SPICE_MODEL::generatePowerSource( wxString& aTarget ) const
|
||||
{
|
||||
wxString res;
|
||||
wxString acdc, trans;
|
||||
wxWindow* page = m_powerNotebook->GetCurrentPage();
|
||||
bool useTrans = true; // shall we use the transient command part?
|
||||
|
||||
// Variables for generic processing
|
||||
bool genericProcessing = false;
|
||||
unsigned int genericReqParamsCount = 0;
|
||||
std::vector<wxTextCtrl*> genericControls;
|
||||
|
||||
if( page == m_pwrGeneric )
|
||||
/// DC / AC section
|
||||
// If SPICE_VALUE can be properly constructed, then it is a valid value
|
||||
try
|
||||
{
|
||||
if( !m_pwrGeneric->Validate() )
|
||||
return false;
|
||||
|
||||
if( empty( m_genDc ) && empty( m_genAcMag ) )
|
||||
{
|
||||
DisplayError( NULL, wxT( "You have to specify DC or/and AC value" ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
if( !empty( m_genDc ) )
|
||||
res += wxString::Format( "dc %s", m_genDc->GetValue() );
|
||||
|
||||
if( !empty( m_genAcMag ) )
|
||||
{
|
||||
res += wxString::Format( " ac %s", m_genAcMag->GetValue() );
|
||||
|
||||
if( !empty( m_genAcPhase ) )
|
||||
res += wxString::Format( " %s", m_genAcPhase->GetValue() );
|
||||
}
|
||||
acdc += wxString::Format( "dc %s ", SPICE_VALUE( m_genDc->GetValue() ).ToSpiceString() );
|
||||
}
|
||||
catch( ... )
|
||||
{
|
||||
DisplayError( NULL, wxT( "Invalid DC value" ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if( !empty( m_genAcMag ) )
|
||||
{
|
||||
acdc += wxString::Format( "ac %s ", SPICE_VALUE( m_genAcMag->GetValue() ).ToSpiceString() );
|
||||
|
||||
else if( page == m_pwrPulse )
|
||||
if( !empty( m_genAcPhase ) )
|
||||
acdc += wxString::Format( "%s ", SPICE_VALUE( m_genAcPhase->GetValue() ).ToSpiceString() );
|
||||
}
|
||||
}
|
||||
catch( ... )
|
||||
{
|
||||
DisplayError( NULL, wxT( "Invalid AC magnitude or phase" ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Transient section
|
||||
if( page == m_pwrPulse )
|
||||
{
|
||||
if( !m_pwrPulse->Validate() )
|
||||
return false;
|
||||
|
||||
genericProcessing = true;
|
||||
res = "pulse";
|
||||
trans += "pulse";
|
||||
genericReqParamsCount = 2;
|
||||
genericControls = { m_pulseInit, m_pulseNominal, m_pulseDelay,
|
||||
m_pulseRise, m_pulseFall, m_pulseWidth, m_pulsePeriod };
|
||||
|
@ -486,7 +521,7 @@ bool DIALOG_SPICE_MODEL::generatePowerSource( wxString& aTarget ) const
|
|||
return false;
|
||||
|
||||
genericProcessing = true;
|
||||
res = "sin";
|
||||
trans += "sin";
|
||||
genericReqParamsCount = 2;
|
||||
genericControls = { m_sinOffset, m_sinAmplitude, m_sinFreq, m_sinDelay, m_sinDampFactor };
|
||||
}
|
||||
|
@ -498,7 +533,7 @@ bool DIALOG_SPICE_MODEL::generatePowerSource( wxString& aTarget ) const
|
|||
return false;
|
||||
|
||||
genericProcessing = true;
|
||||
res = "exp";
|
||||
trans += "exp";
|
||||
genericReqParamsCount = 2;
|
||||
genericControls = { m_expInit, m_expPulsed,
|
||||
m_expRiseDelay, m_expRiseConst, m_expFallDelay, m_expFallConst };
|
||||
|
@ -507,21 +542,19 @@ bool DIALOG_SPICE_MODEL::generatePowerSource( wxString& aTarget ) const
|
|||
|
||||
else if( page == m_pwrPwl )
|
||||
{
|
||||
if( m_pwlValList->GetItemCount() == 0 )
|
||||
if( m_pwlValList->GetItemCount() > 0 )
|
||||
{
|
||||
DisplayError( NULL, wxT( "You have to specify at least one value" ) );
|
||||
return false;
|
||||
trans += "pwl(";
|
||||
|
||||
for( int i = 0; i < m_pwlValList->GetItemCount(); ++i )
|
||||
{
|
||||
trans += wxString::Format( "%s %s ", m_pwlValList->GetItemText( i, m_pwlTimeCol ),
|
||||
m_pwlValList->GetItemText( i, m_pwlValueCol ) );
|
||||
}
|
||||
|
||||
trans.Trim();
|
||||
trans += ")";
|
||||
}
|
||||
|
||||
res = "pwl(";
|
||||
|
||||
for( int i = 0; i < m_pwlValList->GetItemCount(); ++i )
|
||||
{
|
||||
res += wxString::Format( "%s %s ", m_pwlValList->GetItemText( i, m_pwlTimeCol ),
|
||||
m_pwlValList->GetItemText( i, m_pwlValueCol ) );
|
||||
}
|
||||
|
||||
res += ")";
|
||||
}
|
||||
|
||||
if( genericProcessing )
|
||||
|
@ -529,7 +562,7 @@ bool DIALOG_SPICE_MODEL::generatePowerSource( wxString& aTarget ) const
|
|||
bool finished = false;
|
||||
unsigned int paramCounter = 0;
|
||||
|
||||
res += "(";
|
||||
trans += "(";
|
||||
|
||||
for( auto textCtrl : genericControls )
|
||||
{
|
||||
|
@ -539,8 +572,16 @@ bool DIALOG_SPICE_MODEL::generatePowerSource( wxString& aTarget ) const
|
|||
|
||||
if( paramCounter < genericReqParamsCount )
|
||||
{
|
||||
if( paramCounter == 0 )
|
||||
{
|
||||
// It is fine, no parameters were entered
|
||||
useTrans = false;
|
||||
break;
|
||||
}
|
||||
|
||||
DisplayError( NULL,
|
||||
wxString::Format( wxT( "You need to specify at least the first %d parameters" ),
|
||||
wxString::Format( wxT( "You need to specify at least the "
|
||||
"first %d parameters for the transient source" ),
|
||||
genericReqParamsCount ) );
|
||||
|
||||
return false;
|
||||
|
@ -548,18 +589,26 @@ bool DIALOG_SPICE_MODEL::generatePowerSource( wxString& aTarget ) const
|
|||
}
|
||||
else if( finished )
|
||||
{
|
||||
DisplayError( NULL, wxT( "You cannot leave interleaved blank spaces" ) );
|
||||
DisplayError( NULL, wxT( "You cannot leave interleaved blank "
|
||||
"spaces for the transient source" ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
res += wxString::Format( "%s ", textCtrl->GetValue() );
|
||||
trans += wxString::Format( "%s ", textCtrl->GetValue() );
|
||||
++paramCounter;
|
||||
}
|
||||
|
||||
res += ")";
|
||||
trans.Trim();
|
||||
trans += ")";
|
||||
}
|
||||
|
||||
aTarget = res;
|
||||
aTarget = acdc;
|
||||
|
||||
if( useTrans )
|
||||
aTarget += trans;
|
||||
|
||||
aTarget.Trim( false );
|
||||
aTarget.Trim( true );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 24 2016)
|
||||
// C++ code generated with wxFormBuilder (version Jul 17 2016)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -131,42 +131,58 @@ DIALOG_SPICE_MODEL_BASE::DIALOG_SPICE_MODEL_BASE( wxWindow* parent, wxWindowID i
|
|||
wxBoxSizer* bSizer4;
|
||||
bSizer4 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_powerNotebook = new wxNotebook( m_power, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_pwrGeneric = new wxPanel( m_powerNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxStaticBoxSizer* sbSizer1;
|
||||
sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( m_power, wxID_ANY, _("DC/AC analysis") ), wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizer6;
|
||||
fgSizer6 = new wxFlexGridSizer( 0, 2, 0, 0 );
|
||||
fgSizer6 = new wxFlexGridSizer( 0, 4, 0, 0 );
|
||||
fgSizer6->AddGrowableCol( 0 );
|
||||
fgSizer6->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_staticText10 = new wxStaticText( m_pwrGeneric, wxID_ANY, _("DC [V/A]"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText10 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("DC [V/A]"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText10->Wrap( -1 );
|
||||
fgSizer6->Add( m_staticText10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_genDc = new wxTextCtrl( m_pwrGeneric, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_genDc->SetMinSize( wxSize( 200,-1 ) );
|
||||
m_genDc = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_genDc->SetMinSize( wxSize( 60,-1 ) );
|
||||
|
||||
fgSizer6->Add( m_genDc, 0, wxALL, 5 );
|
||||
|
||||
m_staticText11 = new wxStaticText( m_pwrGeneric, wxID_ANY, _("AC magnitude [V/A]"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
||||
fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
fgSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_staticText11 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("AC magnitude [V/A]"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText11->Wrap( -1 );
|
||||
fgSizer6->Add( m_staticText11, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_genAcMag = new wxTextCtrl( m_pwrGeneric, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_genAcMag = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_genAcMag->SetMinSize( wxSize( 60,-1 ) );
|
||||
|
||||
fgSizer6->Add( m_genAcMag, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_staticText12 = new wxStaticText( m_pwrGeneric, wxID_ANY, _("AC phase [rad]"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText12 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("AC phase [rad]"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText12->Wrap( -1 );
|
||||
fgSizer6->Add( m_staticText12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_genAcPhase = new wxTextCtrl( m_pwrGeneric, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_genAcPhase = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_genAcPhase->SetMinSize( wxSize( 60,-1 ) );
|
||||
|
||||
fgSizer6->Add( m_genAcPhase, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_pwrGeneric->SetSizer( fgSizer6 );
|
||||
m_pwrGeneric->Layout();
|
||||
fgSizer6->Fit( m_pwrGeneric );
|
||||
m_powerNotebook->AddPage( m_pwrGeneric, _("DC/AC"), true );
|
||||
sbSizer1->Add( fgSizer6, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizer4->Add( sbSizer1, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizer3;
|
||||
sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_power, wxID_ANY, _("Transient analysis") ), wxVERTICAL );
|
||||
|
||||
m_powerNotebook = new wxNotebook( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_pwrPulse = new wxPanel( m_powerNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxFlexGridSizer* fgSizer7;
|
||||
fgSizer7 = new wxFlexGridSizer( 0, 2, 0, 0 );
|
||||
|
@ -179,7 +195,7 @@ DIALOG_SPICE_MODEL_BASE::DIALOG_SPICE_MODEL_BASE( wxWindow* parent, wxWindowID i
|
|||
fgSizer7->Add( m_staticText13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_pulseInit = new wxTextCtrl( m_pwrPulse, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_pulseInit->SetMinSize( wxSize( 200,-1 ) );
|
||||
m_pulseInit->SetMinSize( wxSize( 100,-1 ) );
|
||||
|
||||
fgSizer7->Add( m_pulseInit, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
@ -229,7 +245,7 @@ DIALOG_SPICE_MODEL_BASE::DIALOG_SPICE_MODEL_BASE( wxWindow* parent, wxWindowID i
|
|||
m_pwrPulse->SetSizer( fgSizer7 );
|
||||
m_pwrPulse->Layout();
|
||||
fgSizer7->Fit( m_pwrPulse );
|
||||
m_powerNotebook->AddPage( m_pwrPulse, _("Pulse"), false );
|
||||
m_powerNotebook->AddPage( m_pwrPulse, _("Pulse"), true );
|
||||
m_pwrSin = new wxPanel( m_powerNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxFlexGridSizer* fgSizer8;
|
||||
fgSizer8 = new wxFlexGridSizer( 0, 2, 0, 0 );
|
||||
|
@ -242,7 +258,7 @@ DIALOG_SPICE_MODEL_BASE::DIALOG_SPICE_MODEL_BASE( wxWindow* parent, wxWindowID i
|
|||
fgSizer8->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_sinOffset = new wxTextCtrl( m_pwrSin, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_sinOffset->SetMinSize( wxSize( 200,-1 ) );
|
||||
m_sinOffset->SetMinSize( wxSize( 100,-1 ) );
|
||||
|
||||
fgSizer8->Add( m_sinOffset, 0, wxALL, 5 );
|
||||
|
||||
|
@ -291,7 +307,7 @@ DIALOG_SPICE_MODEL_BASE::DIALOG_SPICE_MODEL_BASE( wxWindow* parent, wxWindowID i
|
|||
fgSizer9->Add( m_staticText26, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_expInit = new wxTextCtrl( m_pwrExp, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_expInit->SetMinSize( wxSize( 200,-1 ) );
|
||||
m_expInit->SetMinSize( wxSize( 100,-1 ) );
|
||||
|
||||
fgSizer9->Add( m_expInit, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
@ -356,7 +372,7 @@ DIALOG_SPICE_MODEL_BASE::DIALOG_SPICE_MODEL_BASE( wxWindow* parent, wxWindowID i
|
|||
fgSizer10->Add( m_staticText34, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_pwlTime = new wxTextCtrl( m_pwrPwl, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_pwlTime->SetMinSize( wxSize( 200,-1 ) );
|
||||
m_pwlTime->SetMinSize( wxSize( 100,-1 ) );
|
||||
|
||||
fgSizer10->Add( m_pwlTime, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
@ -385,7 +401,7 @@ DIALOG_SPICE_MODEL_BASE::DIALOG_SPICE_MODEL_BASE( wxWindow* parent, wxWindowID i
|
|||
m_pwrPwl->SetSizer( fgSizer15 );
|
||||
m_pwrPwl->Layout();
|
||||
fgSizer15->Fit( m_pwrPwl );
|
||||
m_powerNotebook->AddPage( m_pwrPwl, _("PWL"), false );
|
||||
m_powerNotebook->AddPage( m_pwrPwl, _("Piece-wise Linear"), false );
|
||||
m_pwrFm = new wxPanel( m_powerNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
m_pwrFm->Hide();
|
||||
|
||||
|
@ -407,7 +423,10 @@ DIALOG_SPICE_MODEL_BASE::DIALOG_SPICE_MODEL_BASE( wxWindow* parent, wxWindowID i
|
|||
|
||||
m_powerNotebook->AddPage( m_pwrExtData, _("External data"), false );
|
||||
|
||||
bSizer4->Add( m_powerNotebook, 1, wxEXPAND | wxALL, 5 );
|
||||
sbSizer3->Add( m_powerNotebook, 1, wxEXPAND | wxALL, 5 );
|
||||
|
||||
|
||||
bSizer4->Add( sbSizer3, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxString m_pwrTypeChoices[] = { _("Voltage"), _("Current") };
|
||||
int m_pwrTypeNChoices = sizeof( m_pwrTypeChoices ) / sizeof( wxString );
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 24 2016)
|
||||
// C++ code generated with wxFormBuilder (version Jul 17 2016)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -28,6 +28,7 @@ class DIALOG_SHIM;
|
|||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/radiobox.h>
|
||||
|
@ -66,14 +67,13 @@ class DIALOG_SPICE_MODEL_BASE : public DIALOG_SHIM
|
|||
wxTextCtrl* m_icLib;
|
||||
wxButton* m_icSelectLib;
|
||||
wxPanel* m_power;
|
||||
wxNotebook* m_powerNotebook;
|
||||
wxPanel* m_pwrGeneric;
|
||||
wxStaticText* m_staticText10;
|
||||
wxTextCtrl* m_genDc;
|
||||
wxStaticText* m_staticText11;
|
||||
wxTextCtrl* m_genAcMag;
|
||||
wxStaticText* m_staticText12;
|
||||
wxTextCtrl* m_genAcPhase;
|
||||
wxNotebook* m_powerNotebook;
|
||||
wxPanel* m_pwrPulse;
|
||||
wxStaticText* m_staticText13;
|
||||
wxTextCtrl* m_pulseInit;
|
||||
|
@ -143,7 +143,7 @@ class DIALOG_SPICE_MODEL_BASE : public DIALOG_SHIM
|
|||
|
||||
public:
|
||||
|
||||
DIALOG_SPICE_MODEL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 425,630 ), long style = wxDEFAULT_DIALOG_STYLE );
|
||||
DIALOG_SPICE_MODEL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 410,705 ), long style = wxDEFAULT_DIALOG_STYLE );
|
||||
~DIALOG_SPICE_MODEL_BASE();
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue