Terminology cleanup.
This commit is contained in:
parent
58f4943597
commit
102d61ed39
|
@ -188,7 +188,7 @@ bool DIALOG_SIM_MODEL<T_symbol, T_field>::TransferDataToWindow()
|
|||
if( libraryFilename != "" )
|
||||
{
|
||||
// The model is sourced from a library, optionally with instance overrides.
|
||||
m_useLibraryModelRadioButton->SetValue( true );
|
||||
m_rbLibraryModel->SetValue( true );
|
||||
|
||||
if( !loadLibrary( libraryFilename ) )
|
||||
{
|
||||
|
@ -269,7 +269,7 @@ bool DIALOG_SIM_MODEL<T_symbol, T_field>::TransferDataToWindow()
|
|||
|| !SIM_MODEL::GetFieldValue( &m_fields, SIM_TYPE_FIELD ).empty() )
|
||||
{
|
||||
// The model is sourced from the instance.
|
||||
m_useInstanceModelRadioButton->SetValue( true );
|
||||
m_rbBuiltinModel->SetValue( true );
|
||||
|
||||
msg.clear();
|
||||
m_curModelType = SIM_MODEL::ReadTypeFromFields( m_fields, &reporter );
|
||||
|
@ -282,7 +282,7 @@ bool DIALOG_SIM_MODEL<T_symbol, T_field>::TransferDataToWindow()
|
|||
|
||||
for( SIM_MODEL::TYPE type : SIM_MODEL::TYPE_ITERATOR() )
|
||||
{
|
||||
if( m_useInstanceModelRadioButton->GetValue() && type == m_curModelType )
|
||||
if( m_rbBuiltinModel->GetValue() && type == m_curModelType )
|
||||
{
|
||||
msg.clear();
|
||||
m_builtinModelsMgr.CreateModel( m_fields, m_sortedPartPins, false );
|
||||
|
@ -325,7 +325,7 @@ bool DIALOG_SIM_MODEL<T_symbol, T_field>::TransferDataFromWindow()
|
|||
std::string path;
|
||||
std::string name;
|
||||
|
||||
if( m_useLibraryModelRadioButton->GetValue() )
|
||||
if( m_rbLibraryModel->GetValue() )
|
||||
{
|
||||
path = m_libraryPathText->GetValue();
|
||||
wxFileName fn( path );
|
||||
|
@ -388,7 +388,7 @@ void DIALOG_SIM_MODEL<T_symbol, T_field>::updateWidgets()
|
|||
SIM_MODEL* model = &curModel();
|
||||
|
||||
updateIbisWidgets( model );
|
||||
updateInstanceWidgets( model );
|
||||
updateBuiltinModelWidgets( model );
|
||||
updateModelParamsTab( model );
|
||||
updateModelCodeTab( model );
|
||||
updatePinAssignments( model );
|
||||
|
@ -423,14 +423,14 @@ void DIALOG_SIM_MODEL<T_symbol, T_field>::updateIbisWidgets( SIM_MODEL* aModel )
|
|||
|
||||
|
||||
template <typename T_symbol, typename T_field>
|
||||
void DIALOG_SIM_MODEL<T_symbol, T_field>::updateInstanceWidgets( SIM_MODEL* aModel )
|
||||
void DIALOG_SIM_MODEL<T_symbol, T_field>::updateBuiltinModelWidgets( SIM_MODEL* aModel )
|
||||
{
|
||||
// Change the Type choice to match the current device type.
|
||||
if( aModel != m_prevModel )
|
||||
{
|
||||
m_deviceTypeChoice->Clear();
|
||||
|
||||
if( m_useLibraryModelRadioButton->GetValue() )
|
||||
if( m_rbLibraryModel->GetValue() )
|
||||
{
|
||||
m_deviceTypeChoice->Append( aModel->GetDeviceInfo().description );
|
||||
m_deviceTypeChoice->SetSelection( 0 );
|
||||
|
@ -466,7 +466,7 @@ void DIALOG_SIM_MODEL<T_symbol, T_field>::updateInstanceWidgets( SIM_MODEL* aMod
|
|||
}
|
||||
}
|
||||
|
||||
m_typeChoice->Enable( !m_useLibraryModelRadioButton->GetValue() || isIbisLoaded() );
|
||||
m_typeChoice->Enable( !m_rbLibraryModel->GetValue() || isIbisLoaded() );
|
||||
|
||||
if( dynamic_cast<SIM_MODEL_RAW_SPICE*>( aModel ) )
|
||||
m_modelNotebook->SetSelection( 1 );
|
||||
|
@ -597,7 +597,7 @@ void DIALOG_SIM_MODEL<T_symbol, T_field>::updateModelCodeTab( SIM_MODEL* aModel
|
|||
|
||||
item.modelName = m_modelNameChoice->GetStringSelection();
|
||||
|
||||
if( m_useInstanceModelRadioButton->GetValue() || item.modelName == "" )
|
||||
if( m_rbBuiltinModel->GetValue() || item.modelName == "" )
|
||||
item.modelName = m_fields.at( REFERENCE_FIELD ).GetText();
|
||||
|
||||
text << aModel->SpiceGenerator().Preview( item );
|
||||
|
@ -729,7 +729,7 @@ bool DIALOG_SIM_MODEL<T_symbol, T_field>::loadLibrary( const wxString& aLibraryP
|
|||
if( reporter.HasMessage() )
|
||||
DisplayErrorMessage( this, msg );
|
||||
|
||||
m_useLibraryModelRadioButton->SetValue( true );
|
||||
m_rbLibraryModel->SetValue( true );
|
||||
m_libraryPathText->ChangeValue( aLibraryPath );
|
||||
|
||||
wxArrayString modelNames;
|
||||
|
@ -929,7 +929,7 @@ int DIALOG_SIM_MODEL<T_symbol, T_field>::findSymbolPinRow( const wxString& aSymb
|
|||
template <typename T_symbol, typename T_field>
|
||||
SIM_MODEL& DIALOG_SIM_MODEL<T_symbol, T_field>::curModel() const
|
||||
{
|
||||
if( m_useLibraryModelRadioButton->GetValue() )
|
||||
if( m_rbLibraryModel->GetValue() )
|
||||
{
|
||||
int sel = m_modelNameChoice->GetSelection();
|
||||
|
||||
|
@ -1014,7 +1014,7 @@ int DIALOG_SIM_MODEL<T_symbol, T_field>::getModelPinIndex( const wxString& aMode
|
|||
template <typename T_symbol, typename T_field>
|
||||
void DIALOG_SIM_MODEL<T_symbol, T_field>::onRadioButton( wxCommandEvent& aEvent )
|
||||
{
|
||||
bool fromLibrary = m_useLibraryModelRadioButton->GetValue();
|
||||
bool fromLibrary = m_rbLibraryModel->GetValue();
|
||||
|
||||
m_pathLabel->Enable( fromLibrary );
|
||||
m_libraryPathText->Enable( fromLibrary );
|
||||
|
@ -1038,7 +1038,7 @@ void DIALOG_SIM_MODEL<T_symbol, T_field>::onRadioButton( wxCommandEvent& aEvent
|
|||
template <typename T_symbol, typename T_field>
|
||||
void DIALOG_SIM_MODEL<T_symbol, T_field>::onLibraryPathTextEnter( wxCommandEvent& aEvent )
|
||||
{
|
||||
if( m_useLibraryModelRadioButton->GetValue() )
|
||||
if( m_rbLibraryModel->GetValue() )
|
||||
{
|
||||
wxString path = m_libraryPathText->GetValue();
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ private:
|
|||
|
||||
void updateWidgets();
|
||||
void updateIbisWidgets( SIM_MODEL* aModel );
|
||||
void updateInstanceWidgets( SIM_MODEL* aModel );
|
||||
void updateBuiltinModelWidgets( SIM_MODEL* aModel );
|
||||
void updateModelParamsTab( SIM_MODEL* aModel );
|
||||
void updateModelCodeTab( SIM_MODEL* aModel );
|
||||
void updatePinAssignments( SIM_MODEL* aModel );
|
||||
|
|
|
@ -27,8 +27,8 @@ DIALOG_SIM_MODEL_BASE::DIALOG_SIM_MODEL_BASE( wxWindow* parent, wxWindowID id, c
|
|||
wxBoxSizer* bSizerMargins;
|
||||
bSizerMargins = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_useLibraryModelRadioButton = new wxRadioButton( m_modelPanel, wxID_ANY, _("SPICE model from file (*.lib, *.sub or *.ibs)"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
|
||||
bSizerMargins->Add( m_useLibraryModelRadioButton, 0, wxLEFT, 5 );
|
||||
m_rbLibraryModel = new wxRadioButton( m_modelPanel, wxID_ANY, _("SPICE model from file (*.lib, *.sub or *.ibs)"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
|
||||
bSizerMargins->Add( m_rbLibraryModel, 0, wxLEFT, 5 );
|
||||
|
||||
wxGridBagSizer* gbSizer1;
|
||||
gbSizer1 = new wxGridBagSizer( 3, 5 );
|
||||
|
@ -98,8 +98,8 @@ DIALOG_SIM_MODEL_BASE::DIALOG_SIM_MODEL_BASE( wxWindow* parent, wxWindowID id, c
|
|||
|
||||
bSizerMargins->Add( 0, 25, 0, wxEXPAND, 5 );
|
||||
|
||||
m_useInstanceModelRadioButton = new wxRadioButton( m_modelPanel, wxID_ANY, _("Built-in SPICE model"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerMargins->Add( m_useInstanceModelRadioButton, 0, wxBOTTOM|wxLEFT, 5 );
|
||||
m_rbBuiltinModel = new wxRadioButton( m_modelPanel, wxID_ANY, _("Built-in SPICE model"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerMargins->Add( m_rbBuiltinModel, 0, wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
wxFlexGridSizer* fgSizer16;
|
||||
fgSizer16 = new wxFlexGridSizer( 0, 2, 8, 0 );
|
||||
|
@ -328,7 +328,7 @@ DIALOG_SIM_MODEL_BASE::DIALOG_SIM_MODEL_BASE( wxWindow* parent, wxWindowID id, c
|
|||
this->Centre( wxBOTH );
|
||||
|
||||
// Connect Events
|
||||
m_useLibraryModelRadioButton->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onRadioButton ), NULL, this );
|
||||
m_rbLibraryModel->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onRadioButton ), NULL, this );
|
||||
m_pathLabel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathLabelUpdate ), NULL, this );
|
||||
m_libraryPathText->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathTextKillFocus ), NULL, this );
|
||||
m_libraryPathText->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathTextEnter ), NULL, this );
|
||||
|
@ -348,7 +348,7 @@ DIALOG_SIM_MODEL_BASE::DIALOG_SIM_MODEL_BASE( wxWindow* parent, wxWindowID id, c
|
|||
m_ibisModelCombobox->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_SIM_MODEL_BASE::onModelNameComboboxKillFocus ), NULL, this );
|
||||
m_ibisModelCombobox->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onIbisModelComboboxTextEnter ), NULL, this );
|
||||
m_ibisModelCombobox->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onModelNameComboboxUpdate ), NULL, this );
|
||||
m_useInstanceModelRadioButton->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onRadioButton ), NULL, this );
|
||||
m_rbBuiltinModel->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onRadioButton ), NULL, this );
|
||||
m_staticTextDevType->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onDeviceTypeLabelUpdate ), NULL, this );
|
||||
m_deviceTypeChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onDeviceTypeChoice ), NULL, this );
|
||||
m_deviceTypeChoice->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onDeviceTypeChoiceUpdate ), NULL, this );
|
||||
|
@ -363,7 +363,7 @@ DIALOG_SIM_MODEL_BASE::DIALOG_SIM_MODEL_BASE( wxWindow* parent, wxWindowID id, c
|
|||
DIALOG_SIM_MODEL_BASE::~DIALOG_SIM_MODEL_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
m_useLibraryModelRadioButton->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onRadioButton ), NULL, this );
|
||||
m_rbLibraryModel->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onRadioButton ), NULL, this );
|
||||
m_pathLabel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathLabelUpdate ), NULL, this );
|
||||
m_libraryPathText->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathTextKillFocus ), NULL, this );
|
||||
m_libraryPathText->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathTextEnter ), NULL, this );
|
||||
|
@ -383,7 +383,7 @@ DIALOG_SIM_MODEL_BASE::~DIALOG_SIM_MODEL_BASE()
|
|||
m_ibisModelCombobox->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_SIM_MODEL_BASE::onModelNameComboboxKillFocus ), NULL, this );
|
||||
m_ibisModelCombobox->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onIbisModelComboboxTextEnter ), NULL, this );
|
||||
m_ibisModelCombobox->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onModelNameComboboxUpdate ), NULL, this );
|
||||
m_useInstanceModelRadioButton->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onRadioButton ), NULL, this );
|
||||
m_rbBuiltinModel->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onRadioButton ), NULL, this );
|
||||
m_staticTextDevType->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onDeviceTypeLabelUpdate ), NULL, this );
|
||||
m_deviceTypeChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onDeviceTypeChoice ), NULL, this );
|
||||
m_deviceTypeChoice->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onDeviceTypeChoiceUpdate ), NULL, this );
|
||||
|
|
|
@ -227,7 +227,7 @@
|
|||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_useLibraryModelRadioButton</property>
|
||||
<property name="name">m_rbLibraryModel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
@ -1028,7 +1028,7 @@
|
|||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_useInstanceModelRadioButton</property>
|
||||
<property name="name">m_rbBuiltinModel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
|
|
@ -54,7 +54,7 @@ class DIALOG_SIM_MODEL_BASE : public DIALOG_SHIM
|
|||
protected:
|
||||
wxNotebook* m_notebook;
|
||||
wxPanel* m_modelPanel;
|
||||
wxRadioButton* m_useLibraryModelRadioButton;
|
||||
wxRadioButton* m_rbLibraryModel;
|
||||
wxStaticText* m_pathLabel;
|
||||
wxTextCtrl* m_libraryPathText;
|
||||
STD_BITMAP_BUTTON* m_browseButton;
|
||||
|
@ -65,7 +65,7 @@ class DIALOG_SIM_MODEL_BASE : public DIALOG_SHIM
|
|||
wxCheckBox* m_differentialCheckbox;
|
||||
wxStaticText* m_ibisModelLabel;
|
||||
wxComboBox* m_ibisModelCombobox;
|
||||
wxRadioButton* m_useInstanceModelRadioButton;
|
||||
wxRadioButton* m_rbBuiltinModel;
|
||||
wxStaticText* m_staticTextDevType;
|
||||
wxChoice* m_deviceTypeChoice;
|
||||
wxStaticText* m_staticTextSpiceType;
|
||||
|
|
Loading…
Reference in New Issue