KiCad PCB EDA Suite
|
#include <sim_plot_panel.h>
Public Member Functions | |
SIM_PLOT_PANEL (const wxString &aCommand, int aOptions, wxWindow *parent, SIM_PLOT_FRAME *aMainFrame, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxPanelNameStr) | |
virtual | ~SIM_PLOT_PANEL () |
set the pointer to the sim plot frame More... | |
void | SetMasterFrame (SIM_PLOT_FRAME *aFrame) |
wxString | GetLabelX () const |
wxString | GetLabelY1 () const |
wxString | GetLabelY2 () const |
bool | TraceShown (const wxString &aName) const |
const std::map< wxString, TRACE * > & | GetTraces () const |
TRACE * | GetTrace (const wxString &aName) const |
void | ShowGrid (bool aEnable) |
bool | IsGridShown () const |
void | ShowLegend (bool aEnable) |
bool | IsLegendShown () const |
void | SetDottedCurrentPhase (bool aEnable) |
bool | GetDottedCurrentPhase () const |
Toggle cursor for a particular trace. More... | |
void | EnableCursor (const wxString &aName, bool aEnable) |
Reset scale ranges to fit the current traces. More... | |
void | ResetScales () |
Update trace line style. More... | |
void | UpdateTraceStyle (TRACE *trace) |
void | UpdatePlotColors () |
More... | |
mpWindow * | GetPlotWin () const |
SIM_TYPE | GetType () const |
Static Public Member Functions | |
static bool | IsPlottable (SIM_TYPE aSimType) |
Protected Member Functions | |
bool | addTrace (const wxString &aTitle, const wxString &aName, int aPoints, const double *aX, const double *aY, SIM_PLOT_TYPE aType) |
bool | deleteTrace (const wxString &aName) |
const wxString & | getSimCommand () const |
void | setSimCommand (const wxString &aSimCommand) |
const int | getSimOptions () const |
void | setSimOptions (int aOptions) |
Private Member Functions | |
void | prepareDCAxes () |
< More... | |
void | updateAxes () |
More... | |
Private Attributes | |
SIM_PLOT_COLORS | m_colors |
mpWindow * | m_plotWin |
wxBoxSizer * | m_sizer |
std::map< wxString, TRACE * > | m_traces |
mpScaleXBase * | m_axis_x |
mpScaleY * | m_axis_y1 |
mpScaleY * | m_axis_y2 |
mpInfoLegend * | m_legend |
bool | m_dotted_cp |
std::vector< mpLayer * > | m_topLevel |
SIM_PLOT_FRAME * | m_masterFrame |
wxString | m_simCommand |
int | m_simOptions |
Friends | |
class | SIM_WORKBOOK |
Definition at line 181 of file sim_plot_panel.h.
SIM_PLOT_PANEL::SIM_PLOT_PANEL | ( | const wxString & | aCommand, |
int | aOptions, | ||
wxWindow * | parent, | ||
SIM_PLOT_FRAME * | aMainFrame, | ||
wxWindowID | id, | ||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = 0 , |
||
const wxString & | name = wxPanelNameStr |
||
) |
Definition at line 304 of file sim_plot_panel.cpp.
References mpWindow::AddLayer(), mpWindow::EnableDoubleBuffer(), mpWindow::LimitView(), m_legend, m_plotWin, m_sizer, mpWindow, mpWindow::SetMargins(), mpLayer::SetVisible(), mpWindow::UpdateAll(), updateAxes(), and UpdatePlotColors().
|
virtual |
set the pointer to the sim plot frame
Definition at line 337 of file sim_plot_panel.cpp.
|
protected |
Definition at line 475 of file sim_plot_panel.cpp.
References mpWindow::AddLayer(), mpWindow::DelLayer(), SIM_PLOT_COLORS::GenerateColor(), SIM_PANEL_BASE::GetType(), m_axis_x, m_axis_y1, m_axis_y2, m_colors, m_plotWin, m_topLevel, m_traces, TRACE::SetData(), mpScaleY::SetMasterScale(), mpFXY::SetScale(), TRACE::SetTraceColour(), SPT_AC_PHASE, SPT_CURRENT, ST_AC, ST_TRANSIENT, mpWindow::UpdateAll(), updateAxes(), and UpdateTraceStyle().
Referenced by SIM_WORKBOOK::AddTrace().
|
protected |
Definition at line 560 of file sim_plot_panel.cpp.
References cursor, mpWindow::DelLayer(), TRACE::GetCursor(), m_plotWin, m_traces, and ResetScales().
Referenced by SIM_WORKBOOK::DeleteTrace().
void SIM_PLOT_PANEL::EnableCursor | ( | const wxString & | aName, |
bool | aEnable | ||
) |
Reset scale ranges to fit the current traces.
Definition at line 582 of file sim_plot_panel.cpp.
References mpWindow::AddLayer(), SIM_PLOT_COLORS::CURSOR, mpWindow::DelLayer(), TRACE::GetCursor(), mpWindow::GetMarginLeft(), mpWindow::GetMarginRight(), SIM_PLOT_COLORS::GetPlotColor(), GetPlotWin(), GetTrace(), mpWindow::GetXScreen(), TRACE::HasCursor(), m_colors, m_plotWin, TRACE::SetCursor(), mpLayer::SetPen(), and CURSOR::SetX().
|
inline |
Toggle cursor for a particular trace.
Definition at line 271 of file sim_plot_panel.h.
References m_dotted_cp.
|
inline |
Definition at line 199 of file sim_plot_panel.h.
References mpLayer::GetName(), and m_axis_x.
Referenced by SIM_PLOT_FRAME::onCursorUpdate().
|
inline |
Definition at line 204 of file sim_plot_panel.h.
References mpLayer::GetName(), and m_axis_y1.
Referenced by SIM_PLOT_FRAME::onCursorUpdate().
|
inline |
Definition at line 209 of file sim_plot_panel.h.
References mpLayer::GetName(), and m_axis_y2.
Referenced by SIM_PLOT_FRAME::onCursorUpdate().
|
inline |
Definition at line 289 of file sim_plot_panel.h.
References m_plotWin.
Referenced by EnableCursor(), SIM_PLOT_FRAME::menuSaveImage(), SIM_PLOT_FRAME::menuZoomFit(), SIM_PLOT_FRAME::menuZoomIn(), SIM_PLOT_FRAME::menuZoomOut(), SIM_PLOT_FRAME::NewPlotPanel(), SIM_PLOT_FRAME::onSimFinished(), and SIM_PLOT_FRAME::removePlot().
|
inlineprotectedinherited |
Definition at line 56 of file sim_panel_base.h.
References SIM_PANEL_BASE::m_simCommand.
Referenced by SIM_WORKBOOK::GetSimCommand(), and prepareDCAxes().
|
inlineprotectedinherited |
Definition at line 66 of file sim_panel_base.h.
References SIM_PANEL_BASE::m_simOptions.
Referenced by SIM_WORKBOOK::GetSimOptions().
|
inline |
Definition at line 224 of file sim_plot_panel.h.
References m_traces.
Referenced by EnableCursor().
|
inline |
Definition at line 219 of file sim_plot_panel.h.
References m_traces.
Referenced by SIM_PLOT_FRAME::menuSaveCsv(), SIM_PLOT_FRAME::onCursorUpdate(), SIM_PLOT_FRAME::onSimFinished(), SIM_PLOT_FRAME::saveWorkbook(), and SIM_PLOT_FRAME::updateSignalList().
|
inherited |
Definition at line 70 of file sim_panel_base.cpp.
References NGSPICE_CIRCUIT_MODEL::CommandToSimType(), and SIM_PANEL_BASE::m_simCommand.
Referenced by SIM_PLOT_FRAME::addPlot(), addTrace(), SIM_PLOT_FRAME::GetCurrentPlot(), SIM_PLOT_FRAME::onAddSignal(), SIM_PLOT_FRAME::onSettings(), SIM_PLOT_FRAME::onSimFinished(), SIM_PLOT_FRAME::saveWorkbook(), SIM_PANEL_BASE::setSimCommand(), SIM_PLOT_FRAME::StartSimulation(), and updateAxes().
|
inline |
Definition at line 239 of file sim_plot_panel.h.
References mpScaleBase::GetTicks(), mpScaleY::GetTicks(), m_axis_x, and m_axis_y1.
|
inline |
Definition at line 254 of file sim_plot_panel.h.
References mpLayer::IsVisible(), and m_legend.
|
staticinherited |
Definition at line 55 of file sim_panel_base.cpp.
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().
|
private |
<
Construct the plot axes for DC simulation plot.
Definition at line 401 of file sim_plot_panel.cpp.
References _, SIM_PANEL_BASE::getSimCommand(), m_axis_x, m_axis_y1, m_axis_y2, mpALIGN_BOTTOM, mpALIGN_LEFT, and mpALIGN_RIGHT.
Referenced by updateAxes().
void SIM_PLOT_PANEL::ResetScales | ( | ) |
Update trace line style.
Definition at line 613 of file sim_plot_panel.cpp.
References m_axis_x, m_axis_y1, m_axis_y2, m_traces, name, and mpScaleBase::ResetDataRange().
Referenced by deleteTrace(), and SIM_PLOT_FRAME::onSimFinished().
|
inline |
Definition at line 259 of file sim_plot_panel.h.
References m_dotted_cp, m_plotWin, m_traces, mpWindow::UpdateAll(), and UpdateTraceStyle().
|
inline |
Definition at line 194 of file sim_plot_panel.h.
References m_masterFrame.
|
inlineprotectedinherited |
Definition at line 58 of file sim_panel_base.h.
References NGSPICE_CIRCUIT_MODEL::CommandToSimType(), SIM_PANEL_BASE::GetType(), and SIM_PANEL_BASE::m_simCommand.
Referenced by SIM_WORKBOOK::SetSimCommand().
|
inlineprotectedinherited |
Definition at line 67 of file sim_panel_base.h.
References SIM_PANEL_BASE::m_simOptions.
Referenced by SIM_WORKBOOK::SetSimOptions().
|
inline |
Definition at line 231 of file sim_plot_panel.h.
References m_axis_x, m_axis_y1, m_axis_y2, m_plotWin, mpScaleBase::SetTicks(), mpScaleY::SetTicks(), and mpWindow::UpdateAll().
|
inline |
Definition at line 248 of file sim_plot_panel.h.
References m_legend, m_plotWin, mpLayer::SetVisible(), and mpWindow::UpdateAll().
|
inline |
Definition at line 214 of file sim_plot_panel.h.
References m_traces.
Referenced by SIM_PLOT_FRAME::removePlot().
|
private |
Create/Ensure axes are available for plotting
Definition at line 343 of file sim_plot_panel.cpp.
References _, mpWindow::AddLayer(), SIM_PANEL_BASE::GetType(), m_axis_x, m_axis_y1, m_axis_y2, m_plotWin, mpALIGN_BOTTOM, mpALIGN_LEFT, mpALIGN_RIGHT, mpScaleY, prepareDCAxes(), mpScaleY::SetMasterScale(), mpScaleBase::SetNameAlign(), mpScaleBase::SetTicks(), mpScaleY::SetTicks(), ST_AC, ST_DC, ST_NOISE, and ST_TRANSIENT.
Referenced by addTrace(), and SIM_PLOT_PANEL().
void SIM_PLOT_PANEL::UpdatePlotColors | ( | ) |
Update plot colors
Getter for math plot window
Definition at line 447 of file sim_plot_panel.cpp.
References SIM_PLOT_COLORS::AXIS, SIM_PLOT_COLORS::BACKGROUND, SIM_PLOT_COLORS::CURSOR, cursor, SIM_PLOT_COLORS::FOREGROUND, SIM_PLOT_COLORS::GetPlotColor(), m_colors, m_plotWin, m_traces, name, mpWindow::SetColourTheme(), and mpWindow::UpdateAll().
Referenced by SIM_PLOT_FRAME::menuWhiteBackground(), and SIM_PLOT_PANEL().
void SIM_PLOT_PANEL::UpdateTraceStyle | ( | TRACE * | trace | ) |
Definition at line 465 of file sim_plot_panel.cpp.
References TRACE::GetTraceColour(), TRACE::GetType(), m_dotted_cp, mpLayer::SetPen(), SPT_AC_PHASE, and SPT_CURRENT.
Referenced by addTrace(), and SetDottedCurrentPhase().
|
friend |
Definition at line 183 of file sim_plot_panel.h.
|
private |
Definition at line 316 of file sim_plot_panel.h.
Referenced by addTrace(), GetLabelX(), IsGridShown(), prepareDCAxes(), ResetScales(), ShowGrid(), and updateAxes().
|
private |
Definition at line 317 of file sim_plot_panel.h.
Referenced by addTrace(), GetLabelY1(), IsGridShown(), prepareDCAxes(), ResetScales(), ShowGrid(), and updateAxes().
|
private |
Definition at line 318 of file sim_plot_panel.h.
Referenced by addTrace(), GetLabelY2(), prepareDCAxes(), ResetScales(), ShowGrid(), and updateAxes().
|
private |
Definition at line 307 of file sim_plot_panel.h.
Referenced by addTrace(), EnableCursor(), and UpdatePlotColors().
|
private |
Definition at line 321 of file sim_plot_panel.h.
Referenced by GetDottedCurrentPhase(), SetDottedCurrentPhase(), and UpdateTraceStyle().
|
private |
Definition at line 319 of file sim_plot_panel.h.
Referenced by IsLegendShown(), ShowLegend(), and SIM_PLOT_PANEL().
|
private |
Definition at line 325 of file sim_plot_panel.h.
Referenced by SetMasterFrame().
|
private |
Definition at line 310 of file sim_plot_panel.h.
Referenced by addTrace(), deleteTrace(), EnableCursor(), GetPlotWin(), SetDottedCurrentPhase(), ShowGrid(), ShowLegend(), SIM_PLOT_PANEL(), updateAxes(), and UpdatePlotColors().
|
privateinherited |
Definition at line 70 of file sim_panel_base.h.
Referenced by SIM_PANEL_BASE::getSimCommand(), SIM_PANEL_BASE::GetType(), and SIM_PANEL_BASE::setSimCommand().
|
privateinherited |
Definition at line 71 of file sim_panel_base.h.
Referenced by SIM_PANEL_BASE::getSimOptions(), and SIM_PANEL_BASE::setSimOptions().
|
private |
Definition at line 311 of file sim_plot_panel.h.
Referenced by SIM_PLOT_PANEL().
|
private |
Definition at line 323 of file sim_plot_panel.h.
Referenced by addTrace().
|
private |
Definition at line 314 of file sim_plot_panel.h.
Referenced by addTrace(), deleteTrace(), GetTrace(), GetTraces(), ResetScales(), SetDottedCurrentPhase(), TraceShown(), and UpdatePlotColors().