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 <schframe.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>

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 245 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 250 of file eeschema/dialogs/dialog_netlist.cpp.

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

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

Referenced by SCH_EDIT_FRAME::OnCreateNetlist().

860 {
861  NETLIST_DIALOG dlg( aCaller );
862 
863  return dlg.ShowModal();
864 }