|
KiCad PCB EDA Suite
|
Trace hidden while the tab is in Smith mode, kept so leaving the mode restores it. More...
#include <sim_plot_tab.h>
Public Member Functions | |
| SMITH_CURSOR (SMITH_TRACE *aTrace, SIM_PLOT_TAB *aPlotTab) | |
| void | Plot (wxDC &aDC, mpWindow &aWindow) override |
| Plot method. | |
| bool | Inside (const wxPoint &aPoint) const override |
| Checks whether a point is inside the info box rectangle. | |
| void | Move (wxPoint aDelta) override |
| Moves the layer rectangle of given pixel deltas. | |
| void | UpdateReference () override |
| Updates the rectangle reference point. | |
| void | SetCoordX (double aValue) override |
| void | UpdateForNewData () override |
| const wxRealPoint & | GetGamma () const |
| void | SetX (int aX) |
| void | Update () |
| bool | OnDoubleClick (const wxPoint &aPoint, mpWindow &aWindow) override |
| const wxRealPoint & | GetCoords () const |
| virtual bool | HasBBox () const override |
| mpInfoLayer has not bounding box. | |
| virtual bool | IsInfo () const override |
| Specifies that this is an Info box layer. | |
| wxPoint | GetPosition () const |
| Returns the position of the upper left corner of the box (in pixels) | |
| wxSize | GetSize () const |
| Returns the size of the box (in pixels) | |
| virtual double | GetMinX () const |
| Get inclusive left border of bounding box. | |
| virtual double | GetMaxX () const |
| Get inclusive right border of bounding box. | |
| virtual double | GetMinY () const |
| Get inclusive bottom border of bounding box. | |
| virtual double | GetMaxY () const |
| Get inclusive top border of bounding box. | |
| const wxString & | GetName () const |
| Get layer name. | |
| const wxString & | GetDisplayName () const |
| const wxFont & | GetFont () const |
| Get font set for this layer. | |
| const wxFont & | GetPlotFont () const |
| Get the font to draw this layer with, which is the default one when none was set. | |
| const wxPen & | GetPen () const |
| Get pen set for this layer. | |
| void | SetContinuity (bool continuity) |
| Set the 'continuity' property of the layer (true:draws a continuous line, false:draws separate points). | |
| bool | GetContinuity () const |
| Gets the 'continuity' property of the layer. | |
| void | ShowName (bool show) |
| Shows or hides the text label with the name of the layer (default is visible). | |
| virtual void | SetName (const wxString &name) |
| Set layer name. | |
| void | SetFont (const wxFont &font) |
| Set layer font. | |
| void | SetPen (const wxPen &pen) |
| Set layer pen. | |
| mpLayerType | GetLayerType () const |
| Get layer type: a Layer can be of different types: plot lines, axis, info boxes, etc, this method returns the right value. | |
| bool | IsVisible () const |
| Checks whether the layer is visible or not. | |
| void | SetVisible (bool show) |
| Sets layer visibility. | |
| const wxBrush & | GetBrush () const |
| Get brush set for this layer. | |
| void | SetBrush (const wxBrush &brush) |
| Set layer brush. | |
Protected Member Functions | |
| wxString | getID () |
Protected Attributes | |
| TRACE * | m_trace |
| bool | m_updateRequired |
| bool | m_updateRef |
| wxRealPoint | m_coords |
| mpWindow * | m_window |
| int | m_sweepIndex |
| bool | m_snapToNearest |
| double | m_snapTargetY |
| wxRect | m_dim |
| wxPoint | m_reference |
| wxBrush | m_brush |
| int | m_winX |
| int | m_winY |
| wxFont | m_font |
| wxPen | m_pen |
| wxString | m_name |
| wxString | m_displayName |
| bool | m_continuous |
| bool | m_showName |
| mpLayerType | m_type |
| bool | m_visible |
Static Protected Attributes | |
| static constexpr int | DRAG_MARGIN = 10 |
Private Member Functions | |
| void | snapToIndex (int aIndex) |
| void | snapToFrequency (double aFreq) |
| void | doSetCoordX (double aValue) |
Private Attributes | |
| int | m_index |
| wxRealPoint | m_gamma |
| double | m_requestFreq |
| bool | m_pendingFreq |
| bool | m_dragging |
Trace hidden while the tab is in Smith mode, kept so leaving the mode restores it.
Definition at line 290 of file sim_plot_tab.h.
|
inline |
Definition at line 293 of file sim_plot_tab.h.
References CURSOR::CURSOR(), m_dragging, m_gamma, m_index, m_pendingFreq, and m_requestFreq.
|
privateinherited |
Definition at line 1032 of file sim_plot_tab.cpp.
References distance(), m_coords, m_snapTargetY, m_snapToNearest, m_sweepIndex, and m_trace.
Referenced by Plot(), and SetCoordX().
|
inlineinherited |
Get brush set for this layer.
Definition at line 325 of file mathplot.h.
References m_brush.
|
inlineinherited |
Gets the 'continuity' property of the layer.
Definition at line 290 of file mathplot.h.
References m_continuous.
|
inlineinherited |
Definition at line 108 of file sim_plot_tab.h.
References m_coords.
Referenced by SIMULATOR_FRAME_UI::onCursorsGridCellChanged(), and SIMULATOR_FRAME_UI::updatePlotCursors().
|
inlineinherited |
Definition at line 251 of file mathplot.h.
References m_displayName, and m_name.
Referenced by mpInfoLegend::Plot().
|
inlineinherited |
Get font set for this layer.
Invalid if none was set.
Definition at line 259 of file mathplot.h.
References m_font.
Referenced by BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 315 of file sim_plot_tab.h.
References m_gamma.
Referenced by SIMULATOR_FRAME_UI::fillSmithCursorRow().
|
protectedinherited |
Definition at line 1164 of file sim_plot_tab.cpp.
References _, cursor, and m_trace.
Referenced by Plot(), and SMITH_CURSOR::Plot().
|
inlineinherited |
Get layer type: a Layer can be of different types: plot lines, axis, info boxes, etc, this method returns the right value.
Definition at line 313 of file mathplot.h.
References m_type.
Referenced by mpInfoLegend::Plot().
|
inlinevirtualinherited |
Get inclusive right border of bounding box.
Reimplemented in mpFXYVector.
Definition at line 191 of file mathplot.h.
Referenced by mpFXY::UpdateScales().
|
inlinevirtualinherited |
Get inclusive top border of bounding box.
Reimplemented in mpFXYVector.
Definition at line 201 of file mathplot.h.
Referenced by mpFXY::UpdateScales().
|
inlinevirtualinherited |
Get inclusive left border of bounding box.
Reimplemented in mpFXYVector.
Definition at line 186 of file mathplot.h.
Referenced by mpFXY::UpdateScales().
|
inlinevirtualinherited |
Get inclusive bottom border of bounding box.
Reimplemented in mpFXYVector.
Definition at line 196 of file mathplot.h.
Referenced by mpFXY::UpdateScales().
|
inlineinherited |
Get layer name.
Definition at line 249 of file mathplot.h.
References m_name.
Referenced by SIMULATOR_FRAME_UI::ToggleSmithChart(), SIMULATOR_FRAME_UI::updatePlotCursors(), and SIM_PLOT_TAB::UpdateTraceStyle().
|
inlineinherited |
Get pen set for this layer.
Definition at line 280 of file mathplot.h.
References m_pen.
Referenced by CURSOR::Plot(), mpInfoLegend::Plot(), SMITH_CURSOR::Plot(), SIMULATOR_FRAME_UI::rebuildSignalsGrid(), and SIMULATOR_FRAME_UI::signalsGridCursorUpdate().
|
inlineinherited |
Get the font to draw this layer with, which is the default one when none was set.
The stock fonts are built on first use from the running toolkit, so this must not be called before there is one; layers resolve their font when they plot, not when they are constructed.
Definition at line 269 of file mathplot.h.
References m_font.
Referenced by BOOST_AUTO_TEST_CASE(), mpFX::Plot(), mpFXY::Plot(), mpFY::Plot(), mpInfoLegend::Plot(), mpScaleXBase::Plot(), mpScaleY::Plot(), SMITH_CURSOR::Plot(), and SMITH_GRID::Plot().
|
inherited |
Returns the position of the upper left corner of the box (in pixels)
Definition at line 197 of file mathplot.cpp.
References m_dim.
Referenced by SIM_PLOT_TAB::AddView().
|
inherited |
Returns the size of the box (in pixels)
Definition at line 203 of file mathplot.cpp.
References m_dim.
|
inlineoverridevirtualinherited |
mpInfoLayer has not bounding box.
Reimplemented from mpLayer.
Definition at line 371 of file mathplot.h.
|
overridevirtual |
Checks whether a point is inside the info box rectangle.
| point | The point to be checked |
Reimplemented from CURSOR.
Definition at line 740 of file sim_plot_tab.cpp.
References std::abs(), CURSOR::DRAG_MARGIN, m_gamma, m_index, CURSOR::m_window, smithView(), and SMITH_VIEW::ToScreen().
|
inlineoverridevirtualinherited |
Specifies that this is an Info box layer.
Reimplemented from mpLayer.
Definition at line 382 of file mathplot.h.
|
inlineinherited |
Checks whether the layer is visible or not.
Definition at line 317 of file mathplot.h.
References m_visible.
Referenced by mpWindow::IsLayerVisible(), and mpInfoLegend::Plot().
|
overridevirtual |
Moves the layer rectangle of given pixel deltas.
| delta | The wxPoint container for delta coordinates along x and y. Units are in pixels. |
Reimplemented from CURSOR.
Definition at line 725 of file sim_plot_tab.cpp.
References m_dragging, mpInfoLayer::Move(), and CURSOR::Update().
|
overridevirtualinherited |
Reimplemented from mpInfoLayer.
Definition at line 1001 of file sim_plot_tab.cpp.
References Inside(), m_sweepIndex, m_trace, m_updateRef, m_window, and Update().
|
overridevirtual |
Plot method.
Can be overridden by derived classes.
| dc | the device content where to plot |
| w | the window to plot |
Reimplemented from CURSOR.
Definition at line 756 of file sim_plot_tab.cpp.
References formatFloat(), SMITH_MATH::GammaToImpedance(), CURSOR::getID(), mpLayer::GetPen(), mpLayer::GetPlotFont(), mpWindow::GetScrX(), mpWindow::GetScrY(), getSISuffix(), CURSOR::m_coords, mpInfoLayer::m_dim, m_dragging, m_gamma, m_index, m_pendingFreq, m_requestFreq, CURSOR::m_trace, CURSOR::m_updateRef, CURSOR::m_updateRequired, mpLayer::m_visible, CURSOR::m_window, KIGFX::COLOR4D::Mix(), SMITH_MATH::ReturnLoss(), SMITH_MATH::SeriesCapacitance(), SMITH_MATH::SeriesInductance(), smithView(), snapToFrequency(), snapToIndex(), KIGFX::COLOR4D::ToColour(), SMITH_VIEW::ToScreen(), UpdateForNewData(), mpInfoLayer::UpdateReference(), and SMITH_MATH::VSWR().
|
inlineinherited |
Set layer brush.
| brush | brush, will be copied to internal class member |
Definition at line 329 of file mathplot.h.
References m_brush.
|
inlineinherited |
Set the 'continuity' property of the layer (true:draws a continuous line, false:draws separate points).
Definition at line 285 of file mathplot.h.
References m_continuous.
Referenced by TRACE::TRACE().
|
overridevirtual |
Reimplemented from CURSOR.
Definition at line 696 of file sim_plot_tab.cpp.
References m_requestFreq, CURSOR::m_window, and UpdateForNewData().
|
inlineinherited |
Set layer font.
| font | Font, will be copied to internal class member |
Definition at line 304 of file mathplot.h.
References m_font.
Referenced by BOOST_AUTO_TEST_CASE().
|
inlinevirtualinherited |
Set layer name.
| name | Name, will be copied to internal class member |
Reimplemented in TRACE.
Definition at line 299 of file mathplot.h.
Referenced by mpFX::mpFX(), mpFXY::mpFXY(), mpFY::mpFY(), mpScaleXBase::mpScaleXBase(), mpScaleY::mpScaleY(), and TRACE::SetName().
|
inlineinherited |
Set layer pen.
| pen | Pen, will be copied to internal class member |
Definition at line 309 of file mathplot.h.
References m_pen.
Referenced by mpLayer(), mpScaleXBase::mpScaleXBase(), mpScaleY::mpScaleY(), mpInfoLegend::Plot(), and SIM_PLOT_TAB::UpdateTraceStyle().
|
inlineinherited |
Sets layer visibility.
| show | visibility bool. |
Definition at line 321 of file mathplot.h.
References m_visible.
Referenced by SIM_PLOT_TAB::AddView().
|
inlineinherited |
Definition at line 86 of file sim_plot_tab.h.
References mpInfoLayer::m_reference, m_updateRef, and Move().
|
inlineinherited |
Shows or hides the text label with the name of the layer (default is visible).
Definition at line 294 of file mathplot.h.
References m_showName.
Referenced by TRACE::TRACE().
|
private |
Definition at line 649 of file sim_plot_tab.cpp.
References end, m_index, CURSOR::m_trace, and snapToIndex().
Referenced by Plot(), and UpdateForNewData().
|
private |
Definition at line 628 of file sim_plot_tab.cpp.
References CURSOR::m_coords, m_gamma, m_index, and CURSOR::m_trace.
Referenced by Plot(), and snapToFrequency().
|
inlineinherited |
Definition at line 93 of file sim_plot_tab.h.
References m_updateRequired.
Referenced by Move(), SMITH_CURSOR::Move(), and OnDoubleClick().
|
overridevirtual |
Reimplemented from CURSOR.
Definition at line 707 of file sim_plot_tab.cpp.
References empty(), CURSOR::m_coords, m_pendingFreq, m_requestFreq, CURSOR::m_trace, CURSOR::m_updateRef, CURSOR::m_updateRequired, and snapToFrequency().
Referenced by Plot(), and SetCoordX().
|
overridevirtual |
Updates the rectangle reference point.
Used by internal methods of mpWindow to correctly move mpInfoLayers.
Reimplemented from CURSOR.
Definition at line 733 of file sim_plot_tab.cpp.
References mpInfoLayer::UpdateReference().
|
staticconstexprprotectedinherited |
Definition at line 131 of file sim_plot_tab.h.
Referenced by CURSOR(), Inside(), and SMITH_CURSOR::Inside().
|
protectedinherited |
Definition at line 410 of file mathplot.h.
Referenced by mpInfoLayer(), mpInfoLayer(), Plot(), and mpInfoLegend::Plot().
|
protectedinherited |
Definition at line 338 of file mathplot.h.
Referenced by GetContinuity(), mpLayer(), CURSOR::Plot(), mpFXY::Plot(), and SetContinuity().
|
protectedinherited |
Definition at line 125 of file sim_plot_tab.h.
Referenced by CURSOR(), doSetCoordX(), GetCoords(), Inside(), Plot(), SMITH_CURSOR::Plot(), SetCoordX(), SMITH_CURSOR::snapToIndex(), UpdateForNewData(), SMITH_CURSOR::UpdateForNewData(), and UpdateReference().
|
protectedinherited |
Definition at line 407 of file mathplot.h.
Referenced by GetPosition(), GetSize(), Inside(), Move(), mpInfoLayer(), mpInfoLayer(), CURSOR::Plot(), Plot(), mpInfoLegend::Plot(), SMITH_CURSOR::Plot(), and UpdateReference().
|
protectedinherited |
Definition at line 337 of file mathplot.h.
Referenced by GetDisplayName(), and TRACE::SetName().
|
private |
Definition at line 326 of file sim_plot_tab.h.
Referenced by Move(), Plot(), and SMITH_CURSOR().
|
protectedinherited |
Definition at line 333 of file mathplot.h.
Referenced by GetFont(), GetPlotFont(), and SetFont().
|
private |
Definition at line 323 of file sim_plot_tab.h.
Referenced by GetGamma(), Inside(), Plot(), SMITH_CURSOR(), and snapToIndex().
|
private |
Definition at line 322 of file sim_plot_tab.h.
Referenced by Inside(), Plot(), SMITH_CURSOR(), snapToFrequency(), and snapToIndex().
|
protectedinherited |
Definition at line 336 of file mathplot.h.
Referenced by GetDisplayName(), GetName(), mpFX::Plot(), mpFXY::Plot(), mpFY::Plot(), mpScaleXBase::Plot(), mpScaleY::Plot(), and SetName().
|
protectedinherited |
Definition at line 334 of file mathplot.h.
Referenced by GetPen(), mpFX::Plot(), mpFXY::Plot(), mpFY::Plot(), mpInfoLayer::Plot(), mpInfoLegend::Plot(), mpScaleXBase::Plot(), mpScaleY::Plot(), SMITH_GRID::Plot(), SMITH_TRACE::Plot(), and SetPen().
|
private |
Definition at line 325 of file sim_plot_tab.h.
Referenced by Plot(), SMITH_CURSOR(), and UpdateForNewData().
|
protectedinherited |
Definition at line 409 of file mathplot.h.
Referenced by CURSOR::Move(), Move(), mpInfoLayer(), mpInfoLayer(), CURSOR::SetX(), CURSOR::UpdateReference(), and UpdateReference().
|
private |
Definition at line 324 of file sim_plot_tab.h.
Referenced by Plot(), SetCoordX(), SMITH_CURSOR(), and UpdateForNewData().
|
protectedinherited |
Definition at line 339 of file mathplot.h.
Referenced by mpLayer(), mpFX::Plot(), mpFXY::Plot(), mpFY::Plot(), and ShowName().
|
protectedinherited |
Definition at line 129 of file sim_plot_tab.h.
Referenced by CURSOR(), doSetCoordX(), and Move().
|
protectedinherited |
Definition at line 128 of file sim_plot_tab.h.
Referenced by CURSOR(), doSetCoordX(), and Move().
|
protectedinherited |
Definition at line 127 of file sim_plot_tab.h.
Referenced by CURSOR(), doSetCoordX(), OnDoubleClick(), and Plot().
|
protectedinherited |
Definition at line 122 of file sim_plot_tab.h.
Referenced by CURSOR(), doSetCoordX(), getID(), Inside(), Move(), OnDoubleClick(), Plot(), SMITH_CURSOR::Plot(), SetCoordX(), SMITH_CURSOR::snapToFrequency(), SMITH_CURSOR::snapToIndex(), SMITH_CURSOR::UpdateForNewData(), and UpdateReference().
|
protectedinherited |
Definition at line 340 of file mathplot.h.
Referenced by GetLayerType(), mpFX::mpFX(), mpFXY::mpFXY(), mpFXYVector::mpFXYVector(), mpFY::mpFY(), mpInfoLayer::mpInfoLayer(), mpInfoLayer::mpInfoLayer(), mpLayer(), mpScaleXBase::mpScaleXBase(), mpScaleY::mpScaleY(), and SMITH_GRID::SMITH_GRID().
|
protectedinherited |
Definition at line 124 of file sim_plot_tab.h.
Referenced by CURSOR(), OnDoubleClick(), Plot(), SMITH_CURSOR::Plot(), SetCoordX(), SetX(), and SMITH_CURSOR::UpdateForNewData().
|
protectedinherited |
Definition at line 123 of file sim_plot_tab.h.
Referenced by CURSOR(), Plot(), SMITH_CURSOR::Plot(), SetCoordX(), Update(), and SMITH_CURSOR::UpdateForNewData().
|
protectedinherited |
Definition at line 341 of file mathplot.h.
Referenced by IsVisible(), mpLayer(), CURSOR::Plot(), mpFX::Plot(), mpFXY::Plot(), mpFY::Plot(), mpInfoLayer::Plot(), mpInfoLegend::Plot(), mpScaleXBase::Plot(), mpScaleY::Plot(), SMITH_CURSOR::Plot(), SMITH_GRID::Plot(), SMITH_TRACE::Plot(), and SetVisible().
|
protectedinherited |
Definition at line 126 of file sim_plot_tab.h.
Referenced by CURSOR(), Inside(), SMITH_CURSOR::Inside(), Move(), OnDoubleClick(), Plot(), SMITH_CURSOR::Plot(), SetCoordX(), SMITH_CURSOR::SetCoordX(), and UpdateReference().
|
protectedinherited |
Definition at line 411 of file mathplot.h.
Referenced by mpInfoLayer(), mpInfoLayer(), Plot(), and mpInfoLegend::Plot().
|
protectedinherited |
Definition at line 412 of file mathplot.h.
Referenced by mpInfoLayer(), mpInfoLayer(), Plot(), and mpInfoLegend::Plot().