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

Method QCPItemText

qcustomplot/qcustomplot.cpp:28826–28850  ·  view source on GitHub ↗

! Creates a text 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

28824 ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead.
28825*/
28826QCPItemText::QCPItemText(QCustomPlot *parentPlot) :
28827 QCPAbstractItem(parentPlot),
28828 position(createPosition(QLatin1String("position"))),
28829 topLeft(createAnchor(QLatin1String("topLeft"), aiTopLeft)),
28830 top(createAnchor(QLatin1String("top"), aiTop)),
28831 topRight(createAnchor(QLatin1String("topRight"), aiTopRight)),
28832 right(createAnchor(QLatin1String("right"), aiRight)),
28833 bottomRight(createAnchor(QLatin1String("bottomRight"), aiBottomRight)),
28834 bottom(createAnchor(QLatin1String("bottom"), aiBottom)),
28835 bottomLeft(createAnchor(QLatin1String("bottomLeft"), aiBottomLeft)),
28836 left(createAnchor(QLatin1String("left"), aiLeft)),
28837 mText(QLatin1String("text")),
28838 mPositionAlignment(Qt::AlignCenter),
28839 mTextAlignment(Qt::AlignTop|Qt::AlignHCenter),
28840 mRotation(0)
28841{
28842 position->setCoords(0, 0);
28843
28844 setPen(Qt::NoPen);
28845 setSelectedPen(Qt::NoPen);
28846 setBrush(Qt::NoBrush);
28847 setSelectedBrush(Qt::NoBrush);
28848 setColor(Qt::black);
28849 setSelectedColor(Qt::blue);
28850}
28851
28852QCPItemText::~QCPItemText()
28853{

Callers

nothing calls this directly

Calls 1

setCoordsMethod · 0.80

Tested by

no test coverage detected