MCPcopy Create free account
hub / github.com/CieNTi/serial_port_plotter / getPartAt

Method getPartAt

qcustomplot/qcustomplot.cpp:8662–8675  ·  view source on GitHub ↗

! Returns the part of the axis that is hit by \a pos (in pixels). The return value of this function is independent of the user-selectable parts defined with \ref setSelectableParts. Further, this function does not change the current selection state of the axis. If the axis is not visible (\ref setVisible), this function always returns \ref spNone. \see setSelectedParts, setSelectab

Source from the content-addressed store, hash-verified

8660 \see setSelectedParts, setSelectableParts, QCustomPlot::setInteractions
8661*/
8662QCPAxis::SelectablePart QCPAxis::getPartAt(const QPointF &pos) const
8663{
8664 if (!mVisible)
8665 return spNone;
8666
8667 if (mAxisPainter->axisSelectionBox().contains(pos.toPoint()))
8668 return spAxis;
8669 else if (mAxisPainter->tickLabelsSelectionBox().contains(pos.toPoint()))
8670 return spTickLabels;
8671 else if (mAxisPainter->labelSelectionBox().contains(pos.toPoint()))
8672 return spAxisLabel;
8673 else
8674 return spNone;
8675}
8676
8677/* inherits documentation from base class */
8678double QCPAxis::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const

Callers

nothing calls this directly

Calls 4

containsMethod · 0.80
axisSelectionBoxMethod · 0.80
labelSelectionBoxMethod · 0.80

Tested by

no test coverage detected