|
KiCad PCB EDA Suite
|
#include <sim_plot_tab.h>
Public Member Functions | |
| SIM_PLOT_TAB (const wxString &aSimCommand, wxWindow *parent) | |
| virtual | ~SIM_PLOT_TAB () |
| void | ApplyPreferences (const SIM_PREFERENCES &aPrefs) override |
| const std::vector< SIM_VIEW * > & | GetViews () const |
| SIM_VIEW * | GetView (int aIndex) const |
| int | GetViewIndex (SIM_VIEW *aView) const |
| int | GetViewCount () const |
| SIM_VIEW * | GetDefaultView () const |
| The view new traces default to, and legacy (single-view) settings apply to. | |
| SIM_VIEW * | AddView () |
| Add a new (empty) view, stacked below the existing ones. | |
| bool | RemoveView (SIM_VIEW *aView) |
| Remove a view. | |
| void | SyncXView (SIM_VIEW *aSource) |
| Mirror aSource's current X range onto every other view of this tab. | |
| wxString | GetLabelX () const |
| wxString | GetUnitsX () const |
| wxString | GetUnitsForTrace (TRACE *aTrace) const |
| Get the display units (e.g. "V", "A", "dB") for a given trace's own view. | |
| void | ShowGrid (bool aEnable) |
| bool | IsGridShown () const |
| void | ShowLegend (bool aEnable) |
| bool | IsLegendShown () const |
| wxPoint | GetLegendPosition () const |
| void | SetLegendPosition (const wxPoint &aPosition) |
| wxString | GetLabelY1 () const |
| wxString | GetLabelY2 () const |
| wxString | GetLabelY3 () const |
| wxString | GetUnitsY1 () const |
| wxString | GetUnitsY2 () const |
| wxString | GetUnitsY3 () const |
| bool | GetY1Scale (double *aMin, double *aMax) const |
| bool | GetY2Scale (double *aMin, double *aMax) const |
| bool | GetY3Scale (double *aMin, double *aMax) const |
| void | SetY1Scale (bool aLock, double aMin, double aMax) |
| void | SetY2Scale (bool aLock, double aMin, double aMax) |
| void | SetY3Scale (bool aLock, double aMin, double aMax) |
| void | EnsureThirdYAxisExists () |
| void | SetDottedSecondary (bool aEnable) |
| Draw secondary signal traces (current or phase) with dotted lines. | |
| bool | GetDottedSecondary () const |
| void | SetTraceWidth (int aWidth) |
| int | GetTraceWidth () const |
| void | SetUserMargins (int aTop, int aRight, int aBottom, int aLeft) |
| Margins apply to every view of the tab. See SIM_VIEW::SetUserMargins(). | |
| int | GetUserMargin (int aIndex) const |
| void | SetSmithMode (bool aEnable) |
| Smith mode is tab-wide: every view of the tab shows a Smith chart while it is on. | |
| bool | IsSmithMode () const |
| void | UpdateSmithReferenceImpedance () |
| Refresh the grid z0 from the shown Smith traces, on every view. | |
| double | GetSmithZoom () const |
| The saved/restored pan and zoom track the default view. | |
| wxRealPoint | GetSmithPan () const |
| void | ResetSmithView () |
| void | SetSmithView (double aZoom, double aPanX, double aPanY) |
| Restore a saved view, values are validated and clamped. | |
| void | SmithZoomAt (const wxPoint &aPos, double aFactor) |
| void | SmithPanBy (const wxPoint &aDelta) |
| std::vector< SMITH_STASHED_TRACE > & | SmithStashedTraces () |
| Traces and cursors set aside while in Smith mode, restored when leaving it. | |
| std::vector< SMITH_STASHED_CURSOR > & | SmithStashedCursors () |
| void | EnableTrackCursor (bool aEnable) |
| Turn on/off the crosshair that follows the mouse and reads out every trace's value. | |
| bool | IsTrackCursorEnabled () const |
| void | SetTrackCursorX (double aPlotX) |
| Show the track cursor of every view at a shared plot-space X. | |
| void | HideTrackCursor () |
| void | EnableCursor (TRACE *aTrace, int aCursorId, const wxString &aSignalName) |
| Turn on/off the cursor for a particular trace. | |
| void | DisableCursor (TRACE *aTrace, int aCursorId) |
| void | ResetScales (bool aIncludeX) |
| Reset scale ranges to fit the current traces, on every view. | |
| void | UpdateTraceStyle (TRACE *trace) |
| Update trace line style. | |
| void | UpdatePlotColors () |
| Update plot colors. | |
| wxColour | GetPlotColor (SIM_PLOT_COLORS::COLOR_SET aColorId) |
| void | OnLanguageChanged () override |
| mpWindow * | GetPlotWin () const |
| Getter for the default view's math plot window (back-compat for zoom undo/redo, export). | |
| TRACE * | GetOrAddTrace (const wxString &aVectorName, int aType, SIM_VIEW *aView) |
| Get (or create, on aView) the TRACE for a signal. | |
| void | SetTraceData (TRACE *aTrace, std::vector< double > &aX, std::vector< double > &aY, int aSweepCount, size_t aSweepSize, bool aIsMultiRun=false, const std::vector< wxString > &aMultiRunLabels={}) |
| bool | DeleteTrace (const wxString &aVectorName, int aTraceType) |
| void | DeleteTrace (TRACE *aTrace) |
| const std::map< wxString, TRACE * > & | GetTraces () const |
| TRACE * | GetTrace (const wxString &aVecName, int aType) const |
| std::vector< std::pair< wxString, wxString > > & | Measurements () |
| SIM_TYPE | GetSimType () const |
| const wxString & | GetSimCommand () const |
| void | SetSimCommand (const wxString &aSimCommand) |
| int | GetSimOptions () const |
| void | SetSimOptions (int aOptions) |
| wxString | GetLastSchTextSimCommand () const |
| void | SetLastSchTextSimCommand (const wxString &aCmd) |
| const wxString & | GetSpicePlotName () const |
| void | SetSpicePlotName (const wxString &aPlotName) |
Static Public Member Functions | |
| static bool | IsPlottable (SIM_TYPE aSimType) |
Public Attributes | |
| wxPoint | m_LastLegendPosition |
| wxSize | m_LastPlotWinSize |
| Plot window size at which the legend position was observed. | |
Static Public Attributes | |
| static constexpr int | MIN_TRACE_WIDTH = 1 |
| Trace pen widths offered by the plot settings dialog. | |
| static constexpr int | MAX_TRACE_WIDTH = 4 |
Private Member Functions | |
| wxString | getTraceId (const wxString &aVectorName, int aType) const |
| Shared implementation of GetY1Scale/GetY2Scale/GetY3Scale for axis slot 1/2/3. | |
| bool | getYScale (int aSlot, double *aMin, double *aMax) const |
Static Private Member Functions | |
| static mpWindow::MouseWheelActionSet | convertMouseWheelActions (const SIM_MOUSE_WHEEL_ACTION_SET &s) |
Private Attributes | |
| SIM_PLOT_COLORS | m_colors |
| std::map< wxString, wxColour > | m_sessionTraceColors |
| wxBoxSizer * | m_viewsSizer |
| std::vector< SIM_VIEW * > | m_views |
| mpWindow::MouseWheelActionSet | m_mouseWheelActions |
| std::map< wxString, TRACE * > | m_traces |
| bool | m_dotted_cp |
| int | m_traceWidth |
| bool | m_syncingXView |
| bool | m_trackCursorEnabled |
| bool | m_smithMode |
| std::vector< SMITH_STASHED_TRACE > | m_smithStashedTraces |
| std::vector< SMITH_STASHED_CURSOR > | m_smithStashedCursors |
| std::vector< std::pair< wxString, wxString > > | m_measurements |
| wxString | m_simCommand |
| unsigned | m_simOptions |
| wxString | m_lastSchTextSimCommand |
| wxString | m_spicePlotName |
Definition at line 662 of file sim_plot_tab.h.
| SIM_PLOT_TAB::SIM_PLOT_TAB | ( | const wxString & | aSimCommand, |
| wxWindow * | parent ) |
Definition at line 2585 of file sim_plot_tab.cpp.
References _, AddView(), convertMouseWheelActions(), SIM_MOUSE_WHEEL_ACTION_SET::GetMouseDefaults(), GetViews(), KiBitmapBundle(), m_dotted_cp, m_mouseWheelActions, m_smithMode, m_syncingXView, m_traceWidth, m_trackCursorEnabled, m_viewsSizer, RemoveView(), STD_BITMAP_BUTTON::SetBitmap(), SIM_TAB::SIM_TAB(), small_plus, and small_trash.
|
virtual |
Definition at line 2636 of file sim_plot_tab.cpp.
| SIM_VIEW * SIM_PLOT_TAB::AddView | ( | ) |
Add a new (empty) view, stacked below the existing ones.
Definition at line 2651 of file sim_plot_tab.cpp.
References mpWindow::AddLayer(), SIM_VIEW::calcBottomMargin(), mpWindow::EnableDoubleBuffer(), SIM_VIEW::EnsureThirdYAxisExists(), GetDefaultView(), mpWindow::GetMarginLeft(), mpWindow::GetMarginTop(), mpInfoLayer::GetPosition(), GetUserMargin(), mpWindow::LimitView(), SIM_VIEW::m_lastLegendPosition, SIM_VIEW::m_legend, m_mouseWheelActions, m_smithMode, m_views, m_viewsSizer, SIM_VIEW::RaiseOverlays(), mpWindow::SetMargins(), mpWindow::SetMouseWheelActions(), SIM_VIEW::SetSmithChart(), SIM_VIEW::SetUserMargins(), mpLayer::SetVisible(), SIM_VIEW::SetY1Scale(), SIM_VIEW::SetY2Scale(), SIM_VIEW::SetY3Scale(), SIM_VIEW::ShowLegend(), SyncXView(), mpWindow::UpdateAll(), SIM_VIEW::updateAxes(), and UpdatePlotColors().
Referenced by SIMULATOR_FRAME_UI::loadJsonWorkbook(), and SIM_PLOT_TAB().
|
overridevirtual |
Reimplemented from SIM_TAB.
Definition at line 2642 of file sim_plot_tab.cpp.
References convertMouseWheelActions(), m_mouseWheelActions, m_views, and SIM_PREFERENCES::mouse_wheel_actions.
Referenced by SIMULATOR_FRAME_UI::NewSimTab().
|
inlinestaticprivate |
Definition at line 861 of file sim_plot_tab.h.
References mpWindow::COUNT, COUNT, mpWindow::MouseWheelActionSet::horizontal, SIM_MOUSE_WHEEL_ACTION_SET::horizontal, SIM_MOUSE_WHEEL_ACTION_SET::vertical_unmodified, SIM_MOUSE_WHEEL_ACTION_SET::vertical_with_alt, SIM_MOUSE_WHEEL_ACTION_SET::vertical_with_ctrl, SIM_MOUSE_WHEEL_ACTION_SET::vertical_with_shift, mpWindow::MouseWheelActionSet::verticalUnmodified, mpWindow::MouseWheelActionSet::verticalWithAlt, mpWindow::MouseWheelActionSet::verticalWithCtrl, and mpWindow::MouseWheelActionSet::verticalWithShift.
Referenced by ApplyPreferences(), and SIM_PLOT_TAB().
| bool SIM_PLOT_TAB::DeleteTrace | ( | const wxString & | aVectorName, |
| int | aTraceType ) |
Definition at line 3331 of file sim_plot_tab.cpp.
References DeleteTrace(), and GetTrace().
Referenced by DeleteTrace(), SIMULATOR_FRAME_UI::OnSimRefresh(), RemoveView(), SIMULATOR_FRAME_UI::setSignalView(), SIMULATOR_FRAME_UI::SetUserDefinedSignals(), and SIMULATOR_FRAME_UI::ToggleSmithChart().
| void SIM_PLOT_TAB::DeleteTrace | ( | TRACE * | aTrace | ) |
Definition at line 3302 of file sim_plot_tab.cpp.
References cursor, TRACE::GetCursors(), TRACE::GetView(), m_traces, name, and ResetScales().
| void SIM_PLOT_TAB::DisableCursor | ( | TRACE * | aTrace, |
| int | aCursorId ) |
Definition at line 3384 of file sim_plot_tab.cpp.
References cursor, TRACE::GetCursor(), TRACE::GetView(), and TRACE::SetCursor().
Referenced by SIMULATOR_FRAME_UI::DeleteCursor(), and SIMULATOR_FRAME_UI::onSignalsTreeMenuSelection().
| void SIM_PLOT_TAB::EnableCursor | ( | TRACE * | aTrace, |
| int | aCursorId, | ||
| const wxString & | aSignalName ) |
Turn on/off the cursor for a particular trace.
Definition at line 3343 of file sim_plot_tab.cpp.
References mpWindow::AddLayer(), center, CURSOR, cursor, SMITH_TRACE::GetFrequencies(), mpWindow::GetMarginLeft(), mpWindow::GetMarginRight(), TRACE::GetType(), TRACE::GetView(), mpWindow::GetXScreen(), KiROUND(), SIM_VIEW::RaiseOverlays(), TRACE::SetCursor(), and SPT_SP_SMITH.
Referenced by SIMULATOR_FRAME_UI::loadJsonWorkbook(), SIMULATOR_FRAME_UI::onSignalsTreeMenuSelection(), SIMULATOR_FRAME_UI::setSignalView(), and SIMULATOR_FRAME_UI::ToggleSmithChart().
| void SIM_PLOT_TAB::EnableTrackCursor | ( | bool | aEnable | ) |
Turn on/off the crosshair that follows the mouse and reads out every trace's value.
It is a tab-wide mode: the crosshair shows on every stacked view at the same X.
Definition at line 3046 of file sim_plot_tab.cpp.
References HideTrackCursor(), and m_trackCursorEnabled.
Referenced by SIMULATOR_FRAME_UI::loadJsonWorkbook().
| void SIM_PLOT_TAB::EnsureThirdYAxisExists | ( | ) |
Definition at line 3016 of file sim_plot_tab.cpp.
References m_views.
Referenced by SIMULATOR_FRAME_UI::loadJsonWorkbook().
|
inline |
The view new traces default to, and legacy (single-view) settings apply to.
Definition at line 685 of file sim_plot_tab.h.
References m_views.
Referenced by AddView(), GetLabelX(), GetLabelY1(), GetLabelY2(), GetLabelY3(), GetLegendPosition(), GetPlotWin(), GetSmithPan(), GetSmithZoom(), GetUnitsForTrace(), GetUnitsX(), GetUnitsY1(), GetUnitsY2(), GetUnitsY3(), getYScale(), IsGridShown(), IsLegendShown(), SIMULATOR_FRAME_UI::loadJsonWorkbook(), SetLegendPosition(), SIMULATOR_FRAME_UI::ToggleSmithChart(), and SIMULATOR_FRAME_UI::updateTrace().
|
inline |
Definition at line 747 of file sim_plot_tab.h.
References m_dotted_cp.
Referenced by SIMULATOR_FRAME::setupUIConditions().
| wxString SIM_PLOT_TAB::GetLabelX | ( | ) | const |
Definition at line 2804 of file sim_plot_tab.cpp.
References GetDefaultView(), and SIM_VIEW::GetLabelX().
Referenced by SIMULATOR_FRAME_UI::updatePlotCursors().
| wxString SIM_PLOT_TAB::GetLabelY1 | ( | ) | const |
Definition at line 2869 of file sim_plot_tab.cpp.
References GetDefaultView(), and SIM_VIEW::GetLabelY1().
Referenced by SIMULATOR_FRAME_UI::updatePlotCursors().
| wxString SIM_PLOT_TAB::GetLabelY2 | ( | ) | const |
Definition at line 2876 of file sim_plot_tab.cpp.
References GetDefaultView(), and SIM_VIEW::GetLabelY2().
Referenced by SIMULATOR_FRAME_UI::updatePlotCursors().
| wxString SIM_PLOT_TAB::GetLabelY3 | ( | ) | const |
Definition at line 2883 of file sim_plot_tab.cpp.
References GetDefaultView(), and SIM_VIEW::GetLabelY3().
Referenced by SIMULATOR_FRAME_UI::updatePlotCursors().
|
inlineinherited |
Definition at line 54 of file sim_tab.h.
References m_lastSchTextSimCommand.
Referenced by SIMULATOR_FRAME_UI::SaveWorkbook(), and SIMULATOR_FRAME::StartSimulation().
| wxPoint SIM_PLOT_TAB::GetLegendPosition | ( | ) | const |
Definition at line 2853 of file sim_plot_tab.cpp.
References GetDefaultView(), and SIM_VIEW::GetLegendPosition().
Get (or create, on aView) the TRACE for a signal.
If the trace already exists (on any view), it is returned unchanged – callers wanting to move an existing trace to a different view should DeleteTrace() it first.
Definition at line 3175 of file sim_plot_tab.cpp.
References mpWindow::AddLayer(), SIM_TAB::GetSimType(), GetTrace(), getTraceId(), SIM_VIEW::m_axis_y2, SIM_VIEW::m_axis_y3, m_colors, m_sessionTraceColors, m_traces, SIM_VIEW::RaiseOverlays(), mpScaleY::SetMasterScale(), TRACE::SetTraceColour(), TRACE::SetView(), SPT_SP_SMITH, SPT_VOLTAGE, ST_DC, ST_TRAN, SIM_VIEW::updateAxes(), SIM_VIEW::UpdateAxisVisibility(), SIM_VIEW::UpdateMargins(), and UpdateTraceStyle().
Referenced by SIMULATOR_FRAME_UI::updateTrace().
|
inline |
Definition at line 825 of file sim_plot_tab.h.
References m_colors.
| mpWindow * SIM_PLOT_TAB::GetPlotWin | ( | ) | const |
Getter for the default view's math plot window (back-compat for zoom undo/redo, export).
Definition at line 3467 of file sim_plot_tab.cpp.
References GetDefaultView().
Referenced by SIMULATOR_FRAME::setupUIConditions().
|
inlineinherited |
Definition at line 48 of file sim_tab.h.
References m_simCommand.
Referenced by SIMULATOR_FRAME::EditAnalysis(), SIMULATOR_FRAME_UI::rebuildSignalsTree(), SIMULATOR_FRAME_UI::SaveWorkbook(), SIMULATOR_FRAME::StartSimulation(), and SIMULATOR_FRAME_UI::updateTrace().
|
inlineinherited |
Definition at line 51 of file sim_tab.h.
References m_simOptions.
Referenced by SIMULATOR_FRAME::EditAnalysis(), SIMULATOR_FRAME_UI::SaveWorkbook(), and SIMULATOR_FRAME::StartSimulation().
|
inherited |
Definition at line 71 of file sim_tab.cpp.
References SPICE_CIRCUIT_MODEL::CommandToSimType(), and m_simCommand.
Referenced by SIM_PLOT_TAB::GetOrAddTrace(), SIMULATOR_FRAME_UI::GetSimTab(), SIMULATOR_FRAME_UI::onPlotClosed(), SIMULATOR_FRAME_UI::onSignalsTreeContextMenu(), SIMULATOR_FRAME_UI::OnSimRefresh(), SIMULATOR_FRAME_UI::rebuildMeasurementsTree(), SIMULATOR_FRAME_UI::rebuildSignalsList(), SIMULATOR_FRAME_UI::rebuildSignalsTree(), SIMULATOR_FRAME_UI::refreshMeasurementGroupIcons(), SIMULATOR_FRAME_UI::SaveWorkbook(), SIM_PLOT_TAB::SetSmithMode(), SIM_PLOT_TAB::SetTraceData(), SIMULATOR_FRAME::setupUIConditions(), SIMULATOR_FRAME_UI::SetUserDefinedSignals(), SIMULATOR_FRAME_UI::ToggleSmithChart(), SIMULATOR_FRAME_UI::UpdateMeasurement(), SIMULATOR_FRAME_UI::updatePlotCursors(), and SIMULATOR_FRAME_UI::vectorNameFromSignalName().
| wxRealPoint SIM_PLOT_TAB::GetSmithPan | ( | ) | const |
Definition at line 3106 of file sim_plot_tab.cpp.
References GetDefaultView(), and SIM_VIEW::GetSmithPan().
| double SIM_PLOT_TAB::GetSmithZoom | ( | ) | const |
The saved/restored pan and zoom track the default view.
Definition at line 3099 of file sim_plot_tab.cpp.
References GetDefaultView(), and SIM_VIEW::GetSmithZoom().
|
inlineinherited |
Definition at line 57 of file sim_tab.h.
References m_spicePlotName.
Referenced by SIMULATOR_FRAME::destroyTabPlot(), SIMULATOR_FRAME_UI::IsPlotOwnedByOtherTab(), and SIMULATOR_FRAME_UI::OnSimRefresh().
|
inline |
Definition at line 845 of file sim_plot_tab.h.
References getTraceId(), and m_traces.
Referenced by DeleteTrace(), GetOrAddTrace(), SIMULATOR_FRAME_UI::onSignalsTreeContextMenu(), SIMULATOR_FRAME_UI::onSignalsTreeMenuSelection(), SIMULATOR_FRAME_UI::OnSimRefresh(), SIMULATOR_FRAME_UI::refreshMeasurementGroupIcons(), SIMULATOR_FRAME_UI::setSignalView(), SIMULATOR_FRAME_UI::SetUserDefinedSignals(), SIMULATOR_FRAME_UI::ToggleSmithChart(), SIMULATOR_FRAME_UI::updateSignalsTree(), and SIMULATOR_FRAME_UI::updateTrace().
|
inlineprivate |
Shared implementation of GetY1Scale/GetY2Scale/GetY3Scale for axis slot 1/2/3.
Definition at line 878 of file sim_plot_tab.h.
References SPT_Y_AXIS_MASK.
Referenced by GetOrAddTrace(), and GetTrace().
|
inline |
Definition at line 843 of file sim_plot_tab.h.
References m_traces.
Referenced by SIMULATOR_FRAME_UI::DeleteCursor(), SIMULATOR_FRAME_UI::onCursorsGridCellChanged(), SIMULATOR_FRAME_UI::onSignalsTreeMenuSelection(), SIMULATOR_FRAME_UI::OnSimRefresh(), SIMULATOR_FRAME_UI::refreshMeasurementGroupIcons(), SIMULATOR_FRAME_UI::ToggleSmithChart(), and SIMULATOR_FRAME_UI::updatePlotCursors().
|
inline |
Definition at line 764 of file sim_plot_tab.h.
References m_traceWidth.
| wxString SIM_PLOT_TAB::GetUnitsForTrace | ( | TRACE * | aTrace | ) | const |
Get the display units (e.g. "V", "A", "dB") for a given trace's own view.
Definition at line 2818 of file sim_plot_tab.cpp.
References GetDefaultView(), SIM_VIEW::GetUnitsForTrace(), and TRACE::GetView().
| wxString SIM_PLOT_TAB::GetUnitsX | ( | ) | const |
Definition at line 2811 of file sim_plot_tab.cpp.
References GetDefaultView(), and SIM_VIEW::GetUnitsX().
Referenced by SIMULATOR_FRAME_UI::updatePlotCursors().
| wxString SIM_PLOT_TAB::GetUnitsY1 | ( | ) | const |
Definition at line 2890 of file sim_plot_tab.cpp.
References GetDefaultView(), and SIM_VIEW::GetUnitsY1().
Referenced by SIMULATOR_FRAME_UI::updatePlotCursors().
| wxString SIM_PLOT_TAB::GetUnitsY2 | ( | ) | const |
Definition at line 2897 of file sim_plot_tab.cpp.
References GetDefaultView(), and SIM_VIEW::GetUnitsY2().
Referenced by SIMULATOR_FRAME_UI::updatePlotCursors().
| wxString SIM_PLOT_TAB::GetUnitsY3 | ( | ) | const |
Definition at line 2904 of file sim_plot_tab.cpp.
References GetDefaultView(), and SIM_VIEW::GetUnitsY3().
Referenced by SIMULATOR_FRAME_UI::updatePlotCursors().
|
inline |
|
inline |
Definition at line 675 of file sim_plot_tab.h.
References m_views.
Referenced by SIMULATOR_FRAME_UI::lastSignalView(), and SIMULATOR_FRAME_UI::onSignalsTreeMenuSelection().
|
inline |
Definition at line 682 of file sim_plot_tab.h.
References m_views.
Referenced by SIMULATOR_FRAME_UI::getViewChoices(), and SIMULATOR_FRAME_UI::lastSignalView().
| int SIM_PLOT_TAB::GetViewIndex | ( | SIM_VIEW * | aView | ) | const |
Definition at line 2766 of file sim_plot_tab.cpp.
References m_views.
Referenced by SIMULATOR_FRAME_UI::getViewLabel(), and SIMULATOR_FRAME_UI::updateSignalsTree().
|
inline |
Definition at line 673 of file sim_plot_tab.h.
References m_views.
Referenced by SIMULATOR_FRAME_UI::getYScaleTargetViews(), SIMULATOR_FRAME_UI::onSignalsTreeActivated(), SIMULATOR_FRAME_UI::onSignalsTreeMenuSelection(), SIMULATOR_FRAME_UI::OnSimRefresh(), SIM_PLOT_TAB(), and SIMULATOR_FRAME_UI::ToggleSmithChart().
| bool SIM_PLOT_TAB::GetY1Scale | ( | double * | aMin, |
| double * | aMax ) const |
Definition at line 2965 of file sim_plot_tab.cpp.
References getYScale().
| bool SIM_PLOT_TAB::GetY2Scale | ( | double * | aMin, |
| double * | aMax ) const |
Definition at line 2971 of file sim_plot_tab.cpp.
References getYScale().
| bool SIM_PLOT_TAB::GetY3Scale | ( | double * | aMin, |
| double * | aMax ) const |
Definition at line 2977 of file sim_plot_tab.cpp.
References getYScale().
|
private |
Definition at line 2911 of file sim_plot_tab.cpp.
References SIM_VIEW::GetAxisBySlot(), mpScaleBase::GetDataRange(), GetDefaultView(), mpScaleBase::IsRangeSet(), and m_views.
Referenced by GetY1Scale(), GetY2Scale(), and GetY3Scale().
| void SIM_PLOT_TAB::HideTrackCursor | ( | ) |
Definition at line 3066 of file sim_plot_tab.cpp.
References m_views.
Referenced by EnableTrackCursor().
| bool SIM_PLOT_TAB::IsGridShown | ( | ) | const |
Definition at line 2832 of file sim_plot_tab.cpp.
References GetDefaultView(), and SIM_VIEW::IsGridShown().
Referenced by SIMULATOR_FRAME::setupUIConditions().
| bool SIM_PLOT_TAB::IsLegendShown | ( | ) | const |
Definition at line 2846 of file sim_plot_tab.cpp.
References GetDefaultView(), and SIM_VIEW::IsLegendShown().
Referenced by SIMULATOR_FRAME::setupUIConditions().
|
staticinherited |
Definition at line 49 of file sim_tab.cpp.
References ST_AC, ST_DC, ST_FFT, ST_NOISE, ST_SP, and ST_TRAN.
Referenced by SIMULATOR_FRAME_UI::AddTrace(), SIMULATOR_FRAME_UI::NewSimTab(), SIMULATOR_FRAME_UI::OnSimRefresh(), and SIMULATOR_FRAME_UI::updateTrace().
|
inline |
Definition at line 781 of file sim_plot_tab.h.
References m_smithMode.
Referenced by SIMULATOR_FRAME_UI::rebuildSignalsList(), SIMULATOR_FRAME_UI::rebuildSignalsTree(), SIMULATOR_FRAME_UI::refreshMeasurementGroupIcons(), SIMULATOR_FRAME::setupUIConditions(), SIMULATOR_FRAME_UI::ToggleSmithChart(), SIMULATOR_FRAME_UI::updatePlotCursors(), and SIMULATOR_FRAME_UI::vectorNameFromSignalName().
|
inline |
Definition at line 805 of file sim_plot_tab.h.
References m_trackCursorEnabled.
Referenced by SIMULATOR_FRAME::setupUIConditions().
|
inline |
Definition at line 852 of file sim_plot_tab.h.
References m_measurements.
Referenced by SIMULATOR_FRAME_UI::AddMeasurement(), SIMULATOR_FRAME_UI::AddMeasurements(), SIMULATOR_FRAME_UI::editMeasurement(), SIMULATOR_FRAME_UI::loadJsonWorkbook(), SIMULATOR_FRAME_UI::loadLegacyWorkbook(), SIMULATOR_FRAME_UI::rebuildMeasurementsTree(), SIMULATOR_FRAME_UI::shownMeasurementValues(), and SIMULATOR_FRAME_UI::UpdateMeasurement().
|
overridevirtual |
| bool SIM_PLOT_TAB::RemoveView | ( | SIM_VIEW * | aView | ) |
Remove a view.
Any traces plotted on it are unplotted (not deleted from the grid). The last remaining view cannot be removed.
Definition at line 2719 of file sim_plot_tab.cpp.
References DeleteTrace(), m_traces, m_views, m_viewsSizer, name, and ResetScales().
Referenced by SIM_PLOT_TAB().
| void SIM_PLOT_TAB::ResetScales | ( | bool | aIncludeX | ) |
Reset scale ranges to fit the current traces, on every view.
Definition at line 3399 of file sim_plot_tab.cpp.
References m_traces, m_views, and name.
Referenced by DeleteTrace(), SIMULATOR_FRAME_UI::onSignalsTreeMenuSelection(), SIMULATOR_FRAME_UI::OnSimRefresh(), and RemoveView().
| void SIM_PLOT_TAB::ResetSmithView | ( | ) |
Definition at line 3113 of file sim_plot_tab.cpp.
References m_views.
|
inline |
Draw secondary signal traces (current or phase) with dotted lines.
Definition at line 736 of file sim_plot_tab.h.
References m_dotted_cp, m_traces, m_views, name, and UpdateTraceStyle().
Referenced by SIMULATOR_FRAME_UI::loadJsonWorkbook(), and SIMULATOR_FRAME_UI::parseTraceParams().
|
inlineinherited |
Definition at line 55 of file sim_tab.h.
References m_lastSchTextSimCommand.
Referenced by SIMULATOR_FRAME_UI::loadLegacyWorkbook(), and SIMULATOR_FRAME::StartSimulation().
| void SIM_PLOT_TAB::SetLegendPosition | ( | const wxPoint & | aPosition | ) |
Definition at line 2860 of file sim_plot_tab.cpp.
References GetDefaultView(), and m_LastLegendPosition.
Referenced by SIMULATOR_FRAME_UI::loadJsonWorkbook().
|
inlineinherited |
Definition at line 49 of file sim_tab.h.
References m_simCommand.
Referenced by SIMULATOR_FRAME::EditAnalysis(), and SIMULATOR_FRAME::StartSimulation().
|
inlineinherited |
Definition at line 52 of file sim_tab.h.
References m_simOptions.
Referenced by DIALOG_SIM_COMMAND::ApplySettings(), SIMULATOR_FRAME_UI::InitWorkbook(), SIMULATOR_FRAME_UI::loadJsonWorkbook(), and SIMULATOR_FRAME_UI::loadLegacyWorkbook().
| void SIM_PLOT_TAB::SetSmithMode | ( | bool | aEnable | ) |
Smith mode is tab-wide: every view of the tab shows a Smith chart while it is on.
Definition at line 3076 of file sim_plot_tab.cpp.
References SIM_TAB::GetSimType(), m_smithMode, m_views, and ST_SP.
Referenced by SIMULATOR_FRAME_UI::loadJsonWorkbook(), and SIMULATOR_FRAME_UI::ToggleSmithChart().
| void SIM_PLOT_TAB::SetSmithView | ( | double | aZoom, |
| double | aPanX, | ||
| double | aPanY ) |
Restore a saved view, values are validated and clamped.
Definition at line 3123 of file sim_plot_tab.cpp.
References m_views.
Referenced by SIMULATOR_FRAME_UI::loadJsonWorkbook().
|
inlineinherited |
Definition at line 58 of file sim_tab.h.
References m_spicePlotName.
Referenced by SIMULATOR_FRAME::destroyTabPlot(), SIMULATOR_FRAME_UI::OnSimRefresh(), and SIMULATOR_FRAME::StartSimulation().
| void SIM_PLOT_TAB::SetTraceData | ( | TRACE * | aTrace, |
| std::vector< double > & | aX, | ||
| std::vector< double > & | aY, | ||
| int | aSweepCount, | ||
| size_t | aSweepSize, | ||
| bool | aIsMultiRun = false, | ||
| const std::vector< wxString > & | aMultiRunLabels = {} ) |
Definition at line 3232 of file sim_plot_tab.cpp.
References cursor, TRACE::GetCursors(), SIM_TAB::GetSimType(), TRACE::GetType(), TRACE::GetView(), SIM_VIEW::m_axis_x, SIM_VIEW::m_axis_y1, SIM_VIEW::m_axis_y2, SIM_VIEW::m_axis_y3, M_PI, MagnitudeToDb(), TRACE::SetData(), TRACE::SetIsMultiRun(), TRACE::SetMultiRunLabels(), mpFXY::SetScale(), mpFXYVector::SetSweepCount(), mpFXYVector::SetSweepSize(), SPT_AC_PHASE, SPT_CURRENT, SPT_POWER, SPT_SP_SMITH, ST_AC, ST_FFT, and SIM_VIEW::UpdateAxisVisibility().
Referenced by SIMULATOR_FRAME_UI::updateTrace().
|
inline |
Definition at line 753 of file sim_plot_tab.h.
References m_traces, m_traceWidth, m_views, MAX_TRACE_WIDTH, MIN_TRACE_WIDTH, name, and UpdateTraceStyle().
Referenced by SIMULATOR_FRAME_UI::loadJsonWorkbook().
| void SIM_PLOT_TAB::SetTrackCursorX | ( | double | aPlotX | ) |
Show the track cursor of every view at a shared plot-space X.
Definition at line 3055 of file sim_plot_tab.cpp.
References m_views.
|
inline |
Margins apply to every view of the tab. See SIM_VIEW::SetUserMargins().
Definition at line 767 of file sim_plot_tab.h.
References m_views.
Referenced by SIMULATOR_FRAME_UI::loadJsonWorkbook().
| void SIM_PLOT_TAB::SetY1Scale | ( | bool | aLock, |
| double | aMin, | ||
| double | aMax ) |
Definition at line 2983 of file sim_plot_tab.cpp.
References m_views.
Referenced by SIMULATOR_FRAME_UI::loadJsonWorkbook().
| void SIM_PLOT_TAB::SetY2Scale | ( | bool | aLock, |
| double | aMin, | ||
| double | aMax ) |
Definition at line 2994 of file sim_plot_tab.cpp.
References m_views.
Referenced by SIMULATOR_FRAME_UI::loadJsonWorkbook().
| void SIM_PLOT_TAB::SetY3Scale | ( | bool | aLock, |
| double | aMin, | ||
| double | aMax ) |
Definition at line 3005 of file sim_plot_tab.cpp.
References m_views.
Referenced by SIMULATOR_FRAME_UI::loadJsonWorkbook().
| void SIM_PLOT_TAB::ShowGrid | ( | bool | aEnable | ) |
Definition at line 2825 of file sim_plot_tab.cpp.
References m_views.
Referenced by SIMULATOR_FRAME_UI::loadJsonWorkbook(), and SIMULATOR_FRAME_UI::parseTraceParams().
| void SIM_PLOT_TAB::ShowLegend | ( | bool | aEnable | ) |
Definition at line 2839 of file sim_plot_tab.cpp.
References m_views.
Referenced by SIMULATOR_FRAME_UI::loadJsonWorkbook().
| void SIM_PLOT_TAB::SmithPanBy | ( | const wxPoint & | aDelta | ) |
Definition at line 3137 of file sim_plot_tab.cpp.
References m_views.
|
inline |
Definition at line 800 of file sim_plot_tab.h.
References m_smithStashedCursors.
Referenced by SIMULATOR_FRAME_UI::loadJsonWorkbook(), and SIMULATOR_FRAME_UI::ToggleSmithChart().
|
inline |
Traces and cursors set aside while in Smith mode, restored when leaving it.
Definition at line 799 of file sim_plot_tab.h.
References m_smithStashedTraces.
Referenced by SIMULATOR_FRAME_UI::loadJsonWorkbook(), and SIMULATOR_FRAME_UI::ToggleSmithChart().
| void SIM_PLOT_TAB::SmithZoomAt | ( | const wxPoint & | aPos, |
| double | aFactor ) |
Definition at line 3130 of file sim_plot_tab.cpp.
References m_views.
| void SIM_PLOT_TAB::SyncXView | ( | SIM_VIEW * | aSource | ) |
Mirror aSource's current X range onto every other view of this tab.
Definition at line 2778 of file sim_plot_tab.cpp.
References mpWindow::GetDesiredXmax(), mpWindow::GetDesiredXmin(), mpWindow::GetPosX(), mpWindow::GetScaleX(), m_syncingXView, and m_views.
Referenced by AddView().
| void SIM_PLOT_TAB::UpdatePlotColors | ( | ) |
Update plot colors.
Definition at line 3023 of file sim_plot_tab.cpp.
References SIM_PLOT_COLORS::AXIS, SIM_PLOT_COLORS::BACKGROUND, SIM_PLOT_COLORS::FOREGROUND, m_colors, and m_views.
Referenced by AddView(), SIMULATOR_FRAME_UI::onSignalsTreeMenuSelection(), and SIMULATOR_FRAME_UI::ToggleDarkModePlots().
| void SIM_PLOT_TAB::UpdateSmithReferenceImpedance | ( | ) |
Refresh the grid z0 from the shown Smith traces, on every view.
Definition at line 3092 of file sim_plot_tab.cpp.
References m_views.
Referenced by SIMULATOR_FRAME_UI::updateTrace().
| void SIM_PLOT_TAB::UpdateTraceStyle | ( | TRACE * | trace | ) |
Update trace line style.
Definition at line 3154 of file sim_plot_tab.cpp.
References TRACE::GetTraceColour(), TRACE::GetType(), TRACE::GetVectorName(), m_dotted_cp, m_sessionTraceColors, m_traceWidth, mpLayer::SetPen(), SPT_AC_GAIN, SPT_AC_PHASE, and SPT_CURRENT.
Referenced by GetOrAddTrace(), SIMULATOR_FRAME_UI::onSignalsTreeMenuSelection(), SIMULATOR_FRAME_UI::parseTraceParams(), SetDottedSecondary(), and SetTraceWidth().
|
private |
Definition at line 887 of file sim_plot_tab.h.
Referenced by GetOrAddTrace(), GetPlotColor(), and UpdatePlotColors().
|
private |
Definition at line 901 of file sim_plot_tab.h.
Referenced by GetDottedSecondary(), SetDottedSecondary(), SIM_PLOT_TAB(), and UpdateTraceStyle().
| wxPoint SIM_PLOT_TAB::m_LastLegendPosition |
Definition at line 855 of file sim_plot_tab.h.
Referenced by SetLegendPosition().
| wxSize SIM_PLOT_TAB::m_LastPlotWinSize |
Plot window size at which the legend position was observed.
Definition at line 858 of file sim_plot_tab.h.
|
privateinherited |
Definition at line 63 of file sim_tab.h.
Referenced by GetLastSchTextSimCommand(), and SetLastSchTextSimCommand().
|
private |
Definition at line 918 of file sim_plot_tab.h.
Referenced by Measurements().
|
private |
Definition at line 896 of file sim_plot_tab.h.
Referenced by AddView(), ApplyPreferences(), and SIM_PLOT_TAB().
|
private |
Definition at line 888 of file sim_plot_tab.h.
Referenced by GetOrAddTrace(), and UpdateTraceStyle().
|
privateinherited |
Definition at line 61 of file sim_tab.h.
Referenced by GetSimCommand(), GetSimType(), SetSimCommand(), SIM_TAB(), and SIM_TAB().
|
privateinherited |
Definition at line 62 of file sim_tab.h.
Referenced by GetSimOptions(), SetSimOptions(), SIM_TAB(), and SIM_TAB().
|
private |
Definition at line 912 of file sim_plot_tab.h.
Referenced by AddView(), IsSmithMode(), SetSmithMode(), and SIM_PLOT_TAB().
|
private |
Definition at line 915 of file sim_plot_tab.h.
Referenced by SmithStashedCursors().
|
private |
Definition at line 914 of file sim_plot_tab.h.
Referenced by SmithStashedTraces().
|
privateinherited |
Definition at line 64 of file sim_tab.h.
Referenced by GetSpicePlotName(), and SetSpicePlotName().
|
private |
Definition at line 906 of file sim_plot_tab.h.
Referenced by SIM_PLOT_TAB(), and SyncXView().
|
private |
Definition at line 899 of file sim_plot_tab.h.
Referenced by DeleteTrace(), GetOrAddTrace(), GetTrace(), GetTraces(), RemoveView(), ResetScales(), SetDottedSecondary(), and SetTraceWidth().
|
private |
Definition at line 903 of file sim_plot_tab.h.
Referenced by GetTraceWidth(), SetTraceWidth(), SIM_PLOT_TAB(), and UpdateTraceStyle().
|
private |
Definition at line 908 of file sim_plot_tab.h.
Referenced by EnableTrackCursor(), IsTrackCursorEnabled(), and SIM_PLOT_TAB().
|
private |
Definition at line 893 of file sim_plot_tab.h.
Referenced by AddView(), ApplyPreferences(), EnsureThirdYAxisExists(), GetDefaultView(), GetUserMargin(), GetView(), GetViewCount(), GetViewIndex(), GetViews(), getYScale(), HideTrackCursor(), OnLanguageChanged(), RemoveView(), ResetScales(), ResetSmithView(), SetDottedSecondary(), SetSmithMode(), SetSmithView(), SetTraceWidth(), SetTrackCursorX(), SetUserMargins(), SetY1Scale(), SetY2Scale(), SetY3Scale(), ShowGrid(), ShowLegend(), SmithPanBy(), SmithZoomAt(), SyncXView(), UpdatePlotColors(), and UpdateSmithReferenceImpedance().
|
private |
Definition at line 890 of file sim_plot_tab.h.
Referenced by AddView(), RemoveView(), and SIM_PLOT_TAB().
|
staticconstexpr |
Definition at line 751 of file sim_plot_tab.h.
Referenced by SetTraceWidth().
|
staticconstexpr |
Trace pen widths offered by the plot settings dialog.
Definition at line 750 of file sim_plot_tab.h.
Referenced by SetTraceWidth().