MCPcopy Create free account
hub / github.com/Linloir/GraphBuilder / MyGraphicsVexItem

Method MyGraphicsVexItem

graph_view.cpp:346–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344unsigned int MyGraphicsVexItem::internalID = 0;
345
346MyGraphicsVexItem::MyGraphicsVexItem(QPointF _center, qreal _r, int nameID, QGraphicsItem *parent) :
347 QGraphicsEllipseItem(_center.x() - 0.5, _center.y() - 0.5, 1, 1, parent),
348 center(_center),
349 radius(_r){
350 id = internalID++;
351 nameText = QString::asprintf("V%d", nameID);
352 nameTag = new QGraphicsSimpleTextItem;
353 nameTag->setPos(center + QPointF(radius, - radius - QFontMetrics(nameFont).height()));
354 nameTag->setFont(nameFont);
355 nameTag->setText(nameText);
356 nameTag->setZValue(this->zValue());
357 this->setPen(Qt::NoPen);
358 this->setBrush(regBrush);
359}
360
361void MyGraphicsVexItem::showAnimation(){
362 //stopAnimation();

Callers

nothing calls this directly

Calls 1

setTextMethod · 0.45

Tested by

no test coverage detected