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

Method QCPItemStraightLine

qcustomplot/qcustomplot.cpp:28083–28093  ·  view source on GitHub ↗

! Creates a straight line 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

28081 ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead.
28082*/
28083QCPItemStraightLine::QCPItemStraightLine(QCustomPlot *parentPlot) :
28084 QCPAbstractItem(parentPlot),
28085 point1(createPosition(QLatin1String("point1"))),
28086 point2(createPosition(QLatin1String("point2")))
28087{
28088 point1->setCoords(0, 0);
28089 point2->setCoords(1, 1);
28090
28091 setPen(QPen(Qt::black));
28092 setSelectedPen(QPen(Qt::blue,2));
28093}
28094
28095QCPItemStraightLine::~QCPItemStraightLine()
28096{

Callers

nothing calls this directly

Calls 1

setCoordsMethod · 0.80

Tested by

no test coverage detected