MCPcopy Create free account
hub / github.com/collin80/SavvyCAN / setTypeY

Method setTypeY

qcustomplot.cpp:11606–11627  ·  view source on GitHub ↗

! This method sets the position type of the Y coordinate to \a type. For a detailed description of what a position type is, see the documentation of \ref setType. \see setType, setTypeX */

Source from the content-addressed store, hash-verified

11604 \see setType, setTypeX
11605*/
11606void QCPItemPosition::setTypeY(QCPItemPosition::PositionType type)
11607{
11608 if (mPositionTypeY != type)
11609 {
11610 // if switching from or to coordinate type that isn't valid (e.g. because axes or axis rect
11611 // were deleted), don't try to recover the pixelPosition() because it would output a qDebug warning.
11612 bool retainPixelPosition = true;
11613 if ((mPositionTypeY == ptPlotCoords || type == ptPlotCoords) && (!mKeyAxis || !mValueAxis))
11614 retainPixelPosition = false;
11615 if ((mPositionTypeY == ptAxisRectRatio || type == ptAxisRectRatio) && (!mAxisRect))
11616 retainPixelPosition = false;
11617
11618 QPointF pixel;
11619 if (retainPixelPosition)
11620 pixel = pixelPosition();
11621
11622 mPositionTypeY = type;
11623
11624 if (retainPixelPosition)
11625 setPixelPosition(pixel);
11626 }
11627}
11628
11629/*!
11630 Sets the parent of this QCPItemPosition to \a parentAnchor. This means the position will now

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected