KiCad PCB EDA Suite
eeschema/dialogs/dialog_netlist.cpp File Reference

Dialog box for creating netlists. More...

#include <fctsys.h>
#include <pgm_base.h>
#include <kiface_i.h>
#include <gestfich.h>
#include <sch_edit_frame.h>
#include <general.h>
#include <netlist.h>
#include <sch_sheet.h>
#include <dialog_helpers.h>
#include <dialogs/dialog_netlist_base.h>
#include <wildcards_and_files_ext.h>
#include <invoke_sch_dialog.h>
#include <netlist_exporters/netlist_exporter_pspice.h>
#include <eeschema_id.h>
#include <wx/regex.h>

Go to the source code of this file.

Classes

class  NETLIST_PAGE_DIALOG
 
class  NETLIST_DIALOG
 
class  NETLIST_DIALOG_ADD_PLUGIN
 

Macros

#define CUSTOMPANEL_COUNTMAX   8
 
#define CUSTOM_NETLIST_TITLE   wxT( "CustomNetlistTitle" )
 
#define CUSTOM_NETLIST_COMMAND   wxT( "CustomNetlistCommand" )
 
#define NETLIST_USE_DEFAULT_NETNAME   wxT( "NetlistUseDefaultNetname" )
 
#define NETLIST_PSPICE_USE_NETNAME   wxT( "SpiceUseNetNames" )
 

Enumerations

enum  panel_netlist_index {
  PANELPCBNEW = 0, PANELORCADPCB2, PANELCADSTAR, PANELSPICE,
  PANELCUSTOMBASE
}
 
enum  id_netlist {
  ID_CREATE_NETLIST = ID_END_EESCHEMA_ID_LIST + 1, ID_CURRENT_FORMAT_IS_DEFAULT, ID_RUN_SIMULATOR, ID_ADD_SUBCIRCUIT_PREFIX,
  ID_USE_NETCODE_AS_NETNAME
}
 

Functions

 EVT_CHECKBOX (ID_CURRENT_FORMAT_IS_DEFAULT, NETLIST_DIALOG::SelectDefaultNetlistType) NETLIST_PAGE_DIALOG
 
int InvokeDialogNetList (SCH_EDIT_FRAME *aCaller)
 

Detailed Description

Dialog box for creating netlists.

Definition in file eeschema/dialogs/dialog_netlist.cpp.

Macro Definition Documentation

#define CUSTOM_NETLIST_COMMAND   wxT( "CustomNetlistCommand" )
#define CUSTOM_NETLIST_TITLE   wxT( "CustomNetlistTitle" )
#define NETLIST_PSPICE_USE_NETNAME   wxT( "SpiceUseNetNames" )

Definition at line 251 of file eeschema/dialogs/dialog_netlist.cpp.

#define NETLIST_USE_DEFAULT_NETNAME   wxT( "NetlistUseDefaultNetname" )

Enumeration Type Documentation

Enumerator
PANELPCBNEW 
PANELORCADPCB2 
PANELCADSTAR 
PANELSPICE 
PANELCUSTOMBASE 

Definition at line 65 of file eeschema/dialogs/dialog_netlist.cpp.

65  {
66  PANELPCBNEW = 0, /* Handle Netlist format Pcbnew */
67  PANELORCADPCB2, /* Handle Netlist format OracdPcb2 */
68  PANELCADSTAR, /* Handle Netlist format CadStar */
69  PANELSPICE, /* Handle Netlist format Pspice */
70  PANELCUSTOMBASE /* First auxiliary panel (custom netlists).
71  * others use PANELCUSTOMBASE+1, PANELCUSTOMBASE+2.. */
72 };

Function Documentation

Definition at line 256 of file eeschema/dialogs/dialog_netlist.cpp.

References NETLIST_PAGE_DIALOG::m_ButtonCancel, NETLIST_PAGE_DIALOG::m_CommandStringCtrl, NETLIST_PAGE_DIALOG::m_IdNetType, NETLIST_PAGE_DIALOG::m_IsCurrentFormat, NETLIST_PAGE_DIALOG::m_LeftBoxSizer, NETLIST_PAGE_DIALOG::m_LowBoxSizer, NETLIST_PAGE_DIALOG::m_pageNetFmtName, NETLIST_PAGE_DIALOG::m_RightBoxSizer, NETLIST_PAGE_DIALOG::m_RightOptionsBoxSizer, NETLIST_PAGE_DIALOG::m_SpiceAjustPassiveValues, and NETLIST_PAGE_DIALOG::m_TitleStringCtrl.

265  :
266  wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL )
267 {
268  m_IdNetType = id_NetType;
269  m_pageNetFmtName = title;
270  m_CommandStringCtrl = NULL;
271  m_TitleStringCtrl = NULL;
272  m_IsCurrentFormat = NULL;
273  m_SpiceAjustPassiveValues = NULL;
274  m_ButtonCancel = NULL;
275 
276  wxString netfmtName = ((NETLIST_DIALOG*)parent->GetParent())->m_NetFmtName;
277 
278  bool selected = m_pageNetFmtName == netfmtName;
279 
280  parent->AddPage( this, title, selected );
281 
282  wxBoxSizer* MainBoxSizer = new wxBoxSizer( wxVERTICAL );
283  SetSizer( MainBoxSizer );
284  wxBoxSizer* UpperBoxSizer = new wxBoxSizer( wxHORIZONTAL );
285  m_LowBoxSizer = new wxBoxSizer( wxVERTICAL );
286  MainBoxSizer->Add( UpperBoxSizer, 0, wxGROW | wxALL, 5 );
287  MainBoxSizer->Add( m_LowBoxSizer, 0, wxGROW | wxALL, 5 );
288 
289  m_LeftBoxSizer = new wxBoxSizer( wxVERTICAL );
290  m_RightBoxSizer = new wxBoxSizer( wxVERTICAL );
291  m_RightOptionsBoxSizer = new wxBoxSizer( wxVERTICAL );
292  UpperBoxSizer->Add( m_LeftBoxSizer, 0, wxGROW | wxALL, 5 );
293  UpperBoxSizer->Add( m_RightBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
294  UpperBoxSizer->Add( m_RightOptionsBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
295 
296  wxStaticText* text = new wxStaticText( this, -1, _( "Options:" ) );
297  m_LeftBoxSizer->Add( text, 0, wxGROW | wxBOTTOM | wxRIGHT, 5 );
298 
299  m_IsCurrentFormat = new wxCheckBox( this, ID_CURRENT_FORMAT_IS_DEFAULT, _( "Default format" ) );
300  m_LeftBoxSizer->Add( m_IsCurrentFormat, 0, wxGROW | wxBOTTOM | wxRIGHT, 5 );
301  m_IsCurrentFormat->SetValue( selected );
302 
303  if( selected )
304  ((NETLIST_DIALOG*)parent->GetParent())->m_asFormatSelected = true;
305 }
int InvokeDialogNetList ( SCH_EDIT_FRAME aCaller)

Definition at line 883 of file eeschema/dialogs/dialog_netlist.cpp.

Referenced by SCH_EDIT_FRAME::OnCreateNetlist().

884 {
885  NETLIST_DIALOG dlg( aCaller );
886 
887  return dlg.ShowModal();
888 }