MCPcopy Create free account
hub / github.com/Adaptix-Framework/AdaptixC2 / itemChange

Method itemChange

AdaptixClient/Source/UI/Graph/GraphItem.cpp:194–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194QVariant GraphItem::itemChange( GraphicsItemChange change, const QVariant& value )
195{
196 if ( change == ItemPositionChange ) {
197 if ( this->note ) {
198 QRectF rect = this->boundingRect();
199 QRectF noteRect = this->note->boundingRect();
200 QPointF pos = value.toPointF();
201 QPointF posRect = QPointF( pos.x() + (rect.width() - noteRect.width()) / 2, pos.y() + rect.height() - 10);
202
203 this->note->setPos(posRect);
204 }
205 }
206 else if ( change == ItemPositionHasChanged ) {
207 this->adjust();
208 }
209
210 return QGraphicsItem::itemChange( change, value );
211}

Callers

nothing calls this directly

Calls 7

adjustMethod · 0.95
setPosMethod · 0.80
boundingRectMethod · 0.45
xMethod · 0.45
widthMethod · 0.45
yMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected