KiCad PCB EDA Suite
SIM_NOPLOT_PANEL Class Reference

#include <sim_panel_base.h>

Inheritance diagram for SIM_NOPLOT_PANEL:
SIM_PANEL_BASE

Public Member Functions

 SIM_NOPLOT_PANEL (const wxString &aCommand, wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxPanelNameStr)
 
virtual ~SIM_NOPLOT_PANEL ()
 
SIM_TYPE GetType () const
 

Static Public Member Functions

static bool IsPlottable (SIM_TYPE aSimType)
 

Protected Member Functions

const wxString & getSimCommand () const
 
void setSimCommand (const wxString &aSimCommand)
 

Private Attributes

wxSizer * m_sizer
 
wxStaticText * m_textInfo
 

Detailed Description

Definition at line 72 of file sim_panel_base.h.

Constructor & Destructor Documentation

◆ SIM_NOPLOT_PANEL()

SIM_NOPLOT_PANEL::SIM_NOPLOT_PANEL ( const wxString &  aCommand,
wxWindow *  parent,
wxWindowID  id,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = 0,
const wxString &  name = wxPanelNameStr 
)

Definition at line 78 of file sim_panel_base.cpp.

80  :
81  SIM_PANEL_BASE( aCommand, parent, id, pos, size, style, name )
82 {
83  m_sizer = new wxBoxSizer( wxVERTICAL );
84  m_sizer->Add( 0, 1, 1, wxEXPAND, 5 );
85 
86  m_textInfo = new wxStaticText( dynamic_cast<wxWindow*>( this ), wxID_ANY, "", wxDefaultPosition,
87  wxDefaultSize, wxALL | wxEXPAND | wxALIGN_CENTER_HORIZONTAL );
88  m_textInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT,
89  wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
90  m_textInfo->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
91  m_textInfo->SetLabel(
92  _( "This simulation provide no plots. Please refer to console window for results" ) );
93 
94  m_sizer->Add( m_textInfo, 1, wxALL | wxEXPAND, 5 );
95  m_sizer->Add( 0, 1, 1, wxEXPAND, 5 );
96 
97  dynamic_cast<wxWindow*>( this )->SetSizer( m_sizer );
98 }
#define _(s)
const char * name
Definition: DXF_plotter.cpp:56
wxStaticText * m_textInfo

References _, m_sizer, and m_textInfo.

◆ ~SIM_NOPLOT_PANEL()

SIM_NOPLOT_PANEL::~SIM_NOPLOT_PANEL ( )
virtual

Definition at line 101 of file sim_panel_base.cpp.

102 {
103 }

Member Function Documentation

◆ getSimCommand()

const wxString& SIM_PANEL_BASE::getSimCommand ( ) const
inlineprotectedinherited

Definition at line 57 of file sim_panel_base.h.

57 { return m_simCommand; }
wxString m_simCommand

References SIM_PANEL_BASE::m_simCommand.

Referenced by SIM_WORKBOOK::GetSimCommand(), and SIM_PLOT_PANEL::prepareDCAxes().

◆ GetType()

◆ IsPlottable()

bool SIM_PANEL_BASE::IsPlottable ( SIM_TYPE  aSimType)
staticinherited

Definition at line 57 of file sim_panel_base.cpp.

58 {
59  switch( aSimType )
60  {
61  case ST_AC:
62  case ST_DC:
63  case ST_TRANSIENT:
64  return true;
65 
66  default:
67  return false;
68  }
69 }

References ST_AC, ST_DC, and ST_TRANSIENT.

Referenced by SIM_PLOT_FRAME::addPlot(), SIM_PLOT_FRAME::menuNewPlot(), SIM_PLOT_FRAME::NewPlotPanel(), SIM_PLOT_FRAME::onSimFinished(), and SIM_PLOT_FRAME::updatePlot().

◆ setSimCommand()

void SIM_PANEL_BASE::setSimCommand ( const wxString &  aSimCommand)
inlineprotectedinherited

Definition at line 59 of file sim_panel_base.h.

60  {
61  wxCHECK_RET( GetType() == NETLIST_EXPORTER_PSPICE_SIM::CommandToSimType( aSimCommand ),
62  "Cannot change the type of simulation of the existing plot panel" );
63 
64  m_simCommand = aSimCommand;
65  }
static SIM_TYPE CommandToSimType(const wxString &aCmd)
Return simulation type basing on a simulation command directive.
wxString m_simCommand
SIM_TYPE GetType() const

References NETLIST_EXPORTER_PSPICE_SIM::CommandToSimType(), SIM_PANEL_BASE::GetType(), and SIM_PANEL_BASE::m_simCommand.

Referenced by SIM_WORKBOOK::SetSimCommand().

Member Data Documentation

◆ m_sizer

wxSizer* SIM_NOPLOT_PANEL::m_sizer
private

Definition at line 82 of file sim_panel_base.h.

Referenced by SIM_NOPLOT_PANEL().

◆ m_textInfo

wxStaticText* SIM_NOPLOT_PANEL::m_textInfo
private

Definition at line 83 of file sim_panel_base.h.

Referenced by SIM_NOPLOT_PANEL().


The documentation for this class was generated from the following files: