MCPcopy Create free account
hub / github.com/cutechess/cutechess / getPartAt

Method getPartAt

projects/gui/3rdparty/qcustomplot/qcustomplot.cpp:9361–9374  ·  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

9359 \see setSelectedParts, setSelectableParts, QCustomPlot::setInteractions
9360*/
9361QCPAxis::SelectablePart QCPAxis::getPartAt(const QPointF &pos) const
9362{
9363 if (!mVisible)
9364 return spNone;
9365
9366 if (mAxisPainter->axisSelectionBox().contains(pos.toPoint()))
9367 return spAxis;
9368 else if (mAxisPainter->tickLabelsSelectionBox().contains(pos.toPoint()))
9369 return spTickLabels;
9370 else if (mAxisPainter->labelSelectionBox().contains(pos.toPoint()))
9371 return spAxisLabel;
9372 else
9373 return spNone;
9374}
9375
9376/* inherits documentation from base class */
9377double QCPAxis::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const

Callers

nothing calls this directly

Calls 4

axisSelectionBoxMethod · 0.80
labelSelectionBoxMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected