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

Method QCPItemRect

qcustomplot/qcustomplot.cpp:28663–28681  ·  view source on GitHub ↗

! Creates a rectangle item and sets default values. The created item is automatically registered with \a parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead. */

Source from the content-addressed store, hash-verified

28661 ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead.
28662*/
28663QCPItemRect::QCPItemRect(QCustomPlot *parentPlot) :
28664 QCPAbstractItem(parentPlot),
28665 topLeft(createPosition(QLatin1String("topLeft"))),
28666 bottomRight(createPosition(QLatin1String("bottomRight"))),
28667 top(createAnchor(QLatin1String("top"), aiTop)),
28668 topRight(createAnchor(QLatin1String("topRight"), aiTopRight)),
28669 right(createAnchor(QLatin1String("right"), aiRight)),
28670 bottom(createAnchor(QLatin1String("bottom"), aiBottom)),
28671 bottomLeft(createAnchor(QLatin1String("bottomLeft"), aiBottomLeft)),
28672 left(createAnchor(QLatin1String("left"), aiLeft))
28673{
28674 topLeft->setCoords(0, 1);
28675 bottomRight->setCoords(1, 0);
28676
28677 setPen(QPen(Qt::black));
28678 setSelectedPen(QPen(Qt::blue,2));
28679 setBrush(Qt::NoBrush);
28680 setSelectedBrush(Qt::NoBrush);
28681}
28682
28683QCPItemRect::~QCPItemRect()
28684{

Callers

nothing calls this directly

Calls 1

setCoordsMethod · 0.80

Tested by

no test coverage detected