28 #ifndef __SIM_PLOT_FRAME__ 29 #define __SIM_PLOT_FRAME__ 146 void AddCurrentPlot(
const wxString& aDeviceName,
const wxString& aParam );
199 return dynamic_cast<SIM_PANEL_BASE*>(
m_plotNotebook->GetCurrentPage() );
217 void removePlot(
const wxString& aPlotName,
bool aErase =
true );
272 void menuNewPlot( wxCommandEvent& aEvent )
override;
282 void menuSaveCsv( wxCommandEvent& event )
override;
283 void menuZoomIn( wxCommandEvent& event )
override;
284 void menuZoomOut( wxCommandEvent& event )
override;
285 void menuZoomFit( wxCommandEvent& event )
override;
300 void onPlotClose( wxAuiNotebookEvent& event )
override;
308 void onProbe( wxCommandEvent& event );
309 void onTune( wxCommandEvent& event );
411 #endif // __sim_plot_frame__ void onAddSignal(wxCommandEvent &event)
bool saveWorkbook(const wxString &aPath)
Save plot settings to a file.
wxToolBarToolBase * m_toolProbe
void setIconsForMenuItems()
Give icons to menuitems of the main menubar.
void onSimStarted(wxCommandEvent &aEvent)
void RemoveTuner(TUNER_SLIDER *aTuner, bool aErase=true)
Remove an existing tuner.
bool GetPlotBgOpt() const
wxImageList * m_signalsIconColorList
A string to store the path of saved workbooks during a session.
void onPlotChanged(wxAuiNotebookEvent &event) override
void menuWhiteBackground(wxCommandEvent &event) override
void onSignalDblClick(wxMouseEvent &event) override
const wxString & GetTitle() const
SIM_PANEL_BASE * NewPlotPanel(wxString aSimCommand)
Create a new plot panel for a given simulation type and adds it to the main notebook.
int m_splitterPlotAndConsoleSashPosition
void menuZoomFit(wxCommandEvent &event) override
Map of plot panels and associated data.
TRACE_DESC(const NETLIST_EXPORTER_PSPICE_SIM &aExporter, const TRACE_DESC &aDescription, SIM_PLOT_TYPE aNewType)
std::list< TUNER_SLIDER * > m_tuners
void doCloseWindow() override
SIM_PLOT_TYPE GetType() const
wxString m_title
< Title displayed in the signal list/plot legend
Class SIM_PLOT_FRAME_BASE.
WINDOW_SETTINGS * GetWindowSettings(APP_SETTINGS_BASE *aCfg) override
Return a pointer to the window settings for this frame.
void menuNewPlot(wxCommandEvent &aEvent) override
void applyTuners()
Apply component values specified using tuner sliders to the current netlist.
void AddVoltagePlot(const wxString &aNetName)
Add a voltage plot for a given net name.
void AddCurrentPlot(const wxString &aDeviceName, const wxString &aParam)
Add a current plot for a particular device.
Schematic editor (Eeschema) main window.
void onSimUpdate(wxCommandEvent &aEvent)
void menuOpenWorkbook(wxCommandEvent &event) override
void menuShowGrid(wxCommandEvent &event) override
void menuZoomIn(wxCommandEvent &event) override
std::map< SIM_PANEL_BASE *, PLOT_INFO > m_plots
List of currently displayed tuners.
void menuZoomOut(wxCommandEvent &event) override
SIM_THREAD_REPORTER * m_reporter
std::shared_ptr< SPICE_SIMULATOR > m_simulator
bool updatePlot(const TRACE_DESC &aDescriptor, SIM_PLOT_PANEL *aPanel)
Update plot in a particular SIM_PLOT_PANEL.
SIM_PANEL_BASE * m_welcomePanel
SIM_PLOT_TYPE GetXAxisType(SIM_TYPE aType) const
Return X axis for a given simulation type.
void menuSaveCsv(wxCommandEvent &event) override
void onPlotClose(wxAuiNotebookEvent &event) override
void StartSimulation(const wxString &aSimCommand=wxEmptyString)
const wxString & GetParam() const
wxAuiNotebook * m_plotNotebook
SCH_EDIT_FRAME * m_schematicFrame
void setSubWindowsSashSize()
Stores the common settings that are saved and loaded for each window / frame.
SIM_PLOT_PANEL * m_lastSimPlot
imagelists used to add a small colored icon to signal names and cursors name, the same color as the c...
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
void onSimReport(wxCommandEvent &aEvent)
SIM_TYPE
< Possible simulation types
void onSimFinished(wxCommandEvent &aEvent)
void menuShowWhiteBackgroundUpdate(wxUpdateUIEvent &event) override
void onShowNetlist(wxCommandEvent &event)
void menuShowLegendUpdate(wxUpdateUIEvent &event) override
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
wxToolBarToolBase * m_toolAddSignals
int m_splitterTuneValuesSashPosition
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
TRACE_DESC(const NETLIST_EXPORTER_PSPICE_SIM &aExporter, const wxString &aName, SIM_PLOT_TYPE aType, const wxString &aParam)
Modifies an existing TRACE_DESC simulation type.
SIM_PANEL_BASE * currentPlotWindow() const
Return the currently opened plot panel (or NULL if there is none).
void onSignalRClick(wxListEvent &event) override
bool IsSimulationRunning()
void menuShowLegend(wxCommandEvent &event) override
void onTune(wxCommandEvent &event)
wxToolBarToolBase * m_toolSimulate
void menuSaveImage(wxCommandEvent &event) override
Implementing SIM_PLOT_FRAME_BASE.
bool loadWorkbook(const wxString &aPath)
Load plot settings from a file.
static wxString m_savedWorkbooksPath
Info panel.
void onCursorUpdate(wxCommandEvent &aEvent)
wxWindow * GetToolCanvas() const override
Canvas access.
DIALOG_SIM_SETTINGS * m_settingsDlg
const wxString & GetName() const
std::unique_ptr< NETLIST_EXPORTER_PSPICE_SIM > m_exporter
void updateNetlistExporter()
Reload the current schematic for the netlist exporter.
void menuExit(wxCommandEvent &event) override
void onSimulate(wxCommandEvent &event)
TRACE_MAP m_traces
< Map of the traces displayed on the plot
void onProbe(wxCommandEvent &event)
void updateSignalList()
Update the list of currently plotted signals.
wxDECLARE_EVENT(EVT_SIM_UPDATE, wxCommandEvent)
SIM_PLOT_TYPE m_type
Name of the signal parameter.
unsigned int m_plotNumber
int m_splitterSignalsSashPosition
SIM_PLOT_PANEL * CurrentPlot() const
Return the currently opened plot panel (or NULL if there is none).
std::map< wxString, TRACE_DESC > TRACE_MAP
void menuShowDotted(wxCommandEvent &event) override
int m_splitterLeftRightSashPosition
void menuShowDottedUpdate(wxUpdateUIEvent &event) override
const NETLIST_EXPORTER_PSPICE_SIM * GetExporter() const
Return the netlist exporter object used for simulations.
void removePlot(const wxString &aPlotName, bool aErase=true)
Remove a plot with a specific title.
Custom widget to handle quick component values modification and simulation on the fly.
void AddTuner(SCH_COMPONENT *aComponent)
Add a tuner for a component.
void menuShowGridUpdate(wxUpdateUIEvent &event) override
void menuSaveWorkbook(wxCommandEvent &event) override
void addPlot(const wxString &aName, SIM_PLOT_TYPE aType, const wxString &aParam)
Add a new plot to the current panel.
void onSettings(wxCommandEvent &event)
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
wxToolBarToolBase * m_toolTune
Special netlist exporter flavor that allows one to override simulation commands.
void updateTuners()
Filter out tuners for components that do not exist anymore.
wxToolBarToolBase * m_toolSettings
wxString m_name
< Name of the measured net/device
SIM_PLOT_FRAME(KIWAY *aKiway, wxWindow *aParent)
Constructor.