28#ifndef __SIM_PLOT_FRAME__
29#define __SIM_PLOT_FRAME__
116 const wxString& aRef,
const wxString& aValue );
257 void menuNewPlot( wxCommandEvent& aEvent )
override;
261 void menuExit( wxCommandEvent& event )
override;
263 void menuSaveCsv( wxCommandEvent& event )
override;
264 void menuZoomIn( wxCommandEvent& event )
override;
265 void menuZoomOut( wxCommandEvent& event )
override;
266 void menuZoomFit( wxCommandEvent& event )
override;
285 void onPlotClose( wxAuiNotebookEvent& event )
override;
286 void onPlotClosed( wxAuiNotebookEvent& event )
override;
301 void onProbe( wxCommandEvent& event );
302 void onTune( wxCommandEvent& event );
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Special netlist exporter flavor that allows one to override simulation commands.
Schematic editor (Eeschema) main window.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Class SIM_PLOT_FRAME_BASE.
SIM_WORKBOOK * m_workbook
Implementing SIM_PLOT_FRAME_BASE.
void setSubWindowsSashSize()
int m_splitterSignalsSashPosition
void menuShowWhiteBackgroundUpdate(wxUpdateUIEvent &event) override
void onShowNetlist(wxCommandEvent &event)
void setIconsForMenuItems()
Give icons to menuitems of the main menubar.
void onProbe(wxCommandEvent &event)
void AddVoltagePlot(const wxString &aNetName)
Add a voltage plot for a given net name.
void menuShowLegendUpdate(wxUpdateUIEvent &event) override
void onCursorRClick(wxListEvent &aEvent) override
const NGSPICE_CIRCUIT_MODEL * GetExporter() const
Return the netlist exporter object used for simulations.
void onCursorUpdate(wxCommandEvent &aEvent)
void onAddSignal(wxCommandEvent &event)
void onPlotDragged(wxAuiNotebookEvent &event) override
wxString getDefaultPath()
Return the default path to be used in file browser dialog.
void RemoveTuner(TUNER_SLIDER *aTuner, bool aErase=true)
Remove an existing tuner.
void onSimReport(wxCommandEvent &aEvent)
void menuZoomIn(wxCommandEvent &event) override
void updateSignalList()
Update the list of currently plotted signals.
void menuWhiteBackground(wxCommandEvent &event) override
wxWindow * GetToolCanvas() const override
Canvas access.
void menuSaveWorkbook(wxCommandEvent &event) override
void onSimStarted(wxCommandEvent &aEvent)
wxToolBarToolBase * m_toolTune
void menuShowDotted(wxCommandEvent &event) override
wxToolBarToolBase * m_toolAddSignals
SIM_THREAD_REPORTER * m_reporter
List of currently displayed tuners.
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
wxToolBarToolBase * m_toolSimulate
void menuSimulateUpdate(wxUpdateUIEvent &event) override
void menuAddSignalsUpdate(wxUpdateUIEvent &event) override
bool loadWorkbook(const wxString &aPath)
Load plot settings from a file.
void onSimUpdate(wxCommandEvent &aEvent)
bool saveWorkbook(const wxString &aPath)
Save plot settings to a file.
void menuExit(wxCommandEvent &event) override
void UpdateTunerValue(const SCH_SHEET_PATH &aSheetPath, const KIID &aSymbol, const wxString &aRef, const wxString &aValue)
Safely update a field of the associated symbol without dereferencing the symbol.
void onWorkbookClrModified(wxCommandEvent &event)
wxToolBarToolBase * m_toolProbe
void onPlotChanged(wxAuiNotebookEvent &event) override
void AddCurrentPlot(const wxString &aDeviceName)
Add a current plot for a particular device.
void updateTitle()
Set the main window title bar text.
void menuSaveCsv(wxCommandEvent &event) override
SIM_PLOT_FRAME(KIWAY *aKiway, wxWindow *aParent)
void onWorkbookModified(wxCommandEvent &event)
void onSignalDblClick(wxMouseEvent &event) override
void StartSimulation(const wxString &aSimCommand=wxEmptyString)
void menuShowLegend(wxCommandEvent &event) override
int m_splitterTuneValuesSashPosition
bool GetPlotBgOpt() const
int getCurrentOptions() const
SIM_PANEL_BASE * m_lastSimPlot
imagelists used to add a small colored icon to signal names and cursors name, the same color as the c...
void onPlotClosed(wxAuiNotebookEvent &event) override
void onSimulate(wxCommandEvent &event)
void menuShowGridUpdate(wxUpdateUIEvent &event) override
wxString getDefaultFilename()
Return the default filename (with extension) to be used in file browser dialog.
void menuShowDottedUpdate(wxUpdateUIEvent &event) override
wxToolBarToolBase * m_toolSettings
void menuSaveWorkbookAs(wxCommandEvent &event) override
void onPlotClose(wxAuiNotebookEvent &event) override
bool updatePlot(const wxString &aName, SIM_PLOT_TYPE aType, SIM_PLOT_PANEL *aPlotPanel)
Update plot in a particular SIM_PLOT_PANEL.
bool canCloseWindow(wxCloseEvent &aEvent) override
SIM_PLOT_PANEL * GetCurrentPlot() const
Return the currently opened plot panel (or NULL if there is none).
void doCloseWindow() override
wxString getCurrentSimCommand() const
void menuTuneUpdate(wxUpdateUIEvent &event) override
void initWorkbook()
Load the currently active workbook stored in the project settings.
std::list< TUNER_SLIDER * > m_tuners
SIM_PANEL_BASE * getCurrentPlotWindow() const
Return the currently opened plot panel (or NULL if there is none).
void addPlot(const wxString &aName, SIM_PLOT_TYPE aType)
Add a new plot to the current panel.
void onSignalRClick(wxListEvent &aEvent) override
void applyTuners()
Apply component values specified using tuner sliders to the current netlist.
SIM_PANEL_BASE * NewPlotPanel(wxString aSimCommand, int aSimOptions)
Create a new plot panel for a given simulation type and adds it to the main notebook.
void removePlot(const wxString &aPlotName)
Remove a plot with a specific title.
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
void menuShowGrid(wxCommandEvent &event) override
WINDOW_SETTINGS * GetWindowSettings(APP_SETTINGS_BASE *aCfg) override
Return a pointer to the window settings for this frame.
void onSimFinished(wxCommandEvent &aEvent)
void onSettings(wxCommandEvent &event)
void menuSaveImage(wxCommandEvent &event) override
void onTune(wxCommandEvent &event)
int m_splitterLeftRightSashPosition
SCH_EDIT_FRAME * m_schematicFrame
void AddTuner(const SCH_SHEET_PATH &aSheetPath, SCH_SYMBOL *aSymbol)
Add a tuner for a symbol.
void menuNewPlot(wxCommandEvent &aEvent) override
void menuOpenWorkbook(wxCommandEvent &event) override
void menuZoomOut(wxCommandEvent &event) override
wxImageList * m_signalsIconColorList
std::shared_ptr< NGSPICE_CIRCUIT_MODEL > m_circuitModel
std::shared_ptr< SPICE_SIMULATOR > m_simulator
SIM_PLOT_TYPE getXAxisType(SIM_TYPE aType) const
Return X axis for a given simulation type.
int m_splitterPlotAndConsoleSashPosition
void menuProbeUpdate(wxUpdateUIEvent &event) override
unsigned int m_plotNumber
void menuZoomFit(wxCommandEvent &event) override
const wxString & GetSimCommand(const SIM_PANEL_BASE *aPlotPanel)
int GetSimOptions(const SIM_PANEL_BASE *aPlotPanel)
Storage for simulator specific settings.
Custom widget to handle quick component values modification and simulation on the fly.
wxDECLARE_EVENT(EVT_SIM_UPDATE, wxCommandEvent)
SIM_TYPE
< Possible simulation types
Stores the common settings that are saved and loaded for each window / frame.