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, int aOptions, wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxPanelNameStr)
 
virtual ~SIM_NOPLOT_PANEL ()
 
void OnLanguageChanged () override
 
SIM_TYPE GetType () const
 
const wxString & GetSimCommand () const
 
void SetSimCommand (const wxString &aSimCommand)
 
const int GetSimOptions () const
 
void SetSimOptions (int aOptions)
 

Static Public Member Functions

static bool IsPlottable (SIM_TYPE aSimType)
 

Private Attributes

wxSizer * m_sizer
 
wxStaticText * m_textInfo
 
wxString m_simCommand
 
int m_simOptions
 

Detailed Description

Definition at line 69 of file sim_panel_base.h.

Constructor & Destructor Documentation

◆ SIM_NOPLOT_PANEL()

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

Definition at line 76 of file sim_panel_base.cpp.

78 :
79 SIM_PANEL_BASE( aCommand, aOptions, parent, id, pos, size, style, name )
80{
81 m_sizer = new wxBoxSizer( wxVERTICAL );
82 m_sizer->Add( 0, 1, 1, wxEXPAND, 5 );
83
84 m_textInfo = new wxStaticText( dynamic_cast<wxWindow*>( this ), wxID_ANY, "", wxDefaultPosition,
85 wxDefaultSize, wxALL | wxEXPAND | wxALIGN_CENTER_HORIZONTAL );
86 m_textInfo->SetFont( KIUI::GetControlFont( this ).Bold() );
87 m_textInfo->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
88 m_textInfo->SetLabel( _( "Simulation provided no plots. Please refer to console window "
89 "for results." ) );
90
91 m_sizer->Add( m_textInfo, 1, wxALL | wxEXPAND, 5 );
92 m_sizer->Add( 0, 1, 1, wxEXPAND, 5 );
93
94 dynamic_cast<wxWindow*>( this )->SetSizer( m_sizer );
95}
const char * name
Definition: DXF_plotter.cpp:56
wxStaticText * m_textInfo
#define _(s)
wxFont GetControlFont(wxWindow *aWindow)
Definition: ui_common.cpp:162

References _, KIUI::GetControlFont(), m_sizer, and m_textInfo.

◆ ~SIM_NOPLOT_PANEL()

SIM_NOPLOT_PANEL::~SIM_NOPLOT_PANEL ( )
virtual

Definition at line 98 of file sim_panel_base.cpp.

99{
100}

Member Function Documentation

◆ GetSimCommand()

◆ GetSimOptions()

const int SIM_PANEL_BASE::GetSimOptions ( ) const
inlineinherited

◆ GetType()

◆ IsPlottable()

bool SIM_PANEL_BASE::IsPlottable ( SIM_TYPE  aSimType)
staticinherited

Definition at line 55 of file sim_panel_base.cpp.

56{
57 switch( aSimType )
58 {
59 case ST_AC:
60 case ST_DC:
61 case ST_TRANSIENT:
62 return true;
63
64 default:
65 return false;
66 }
67}
@ ST_TRANSIENT
Definition: sim_types.h:42
@ ST_AC
Definition: sim_types.h:34
@ ST_DC
Definition: sim_types.h:35

References ST_AC, ST_DC, and ST_TRANSIENT.

Referenced by SIMULATOR_FRAME::doAddTrace(), SIMULATOR_CONTROL::NewPlot(), SIMULATOR_FRAME::NewPlotPanel(), SIMULATOR_FRAME::onSimFinished(), and SIMULATOR_FRAME::updateTrace().

◆ OnLanguageChanged()

void SIM_NOPLOT_PANEL::OnLanguageChanged ( )
overridevirtual

Implements SIM_PANEL_BASE.

Definition at line 103 of file sim_panel_base.cpp.

104{
105 m_textInfo->SetLabel( _( "Simulation provided no plots. Please refer to console window "
106 "for results." ) );
107}

References _, and m_textInfo.

◆ SetSimCommand()

void SIM_PANEL_BASE::SetSimCommand ( const wxString &  aSimCommand)
inlineinherited

Definition at line 52 of file sim_panel_base.h.

53 {
54 wxCHECK_RET( GetType() == NGSPICE_CIRCUIT_MODEL::CommandToSimType( aSimCommand ),
55 "Cannot change the type of simulation of the existing plot panel" );
56
57 m_simCommand = aSimCommand;
58 }
SIM_TYPE GetType() const

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

Referenced by SIMULATOR_FRAME::EditSimCommand(), and SIMULATOR_FRAME::StartSimulation().

◆ SetSimOptions()

void SIM_PANEL_BASE::SetSimOptions ( int  aOptions)
inlineinherited

Definition at line 61 of file sim_panel_base.h.

61{ m_simOptions = aOptions; }

References SIM_PANEL_BASE::m_simOptions.

Referenced by SIMULATOR_FRAME::EditSimCommand().

Member Data Documentation

◆ m_simCommand

wxString SIM_PANEL_BASE::m_simCommand
privateinherited

◆ m_simOptions

int SIM_PANEL_BASE::m_simOptions
privateinherited

◆ m_sizer

wxSizer* SIM_NOPLOT_PANEL::m_sizer
private

Definition at line 81 of file sim_panel_base.h.

Referenced by SIM_NOPLOT_PANEL().

◆ m_textInfo

wxStaticText* SIM_NOPLOT_PANEL::m_textInfo
private

Definition at line 82 of file sim_panel_base.h.

Referenced by OnLanguageChanged(), and SIM_NOPLOT_PANEL().


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