Krita Source Code Documentation
Loading...
Searching...
No Matches
KoShapeManager::ShapeInterface Struct Reference

#include <KoShapeManager.h>

Public Member Functions

void notifyShapeDestructed (KoShape *shape)
 
 ShapeInterface (KoShapeManager *_q)
 

Protected Attributes

KoShapeManagerq
 

Detailed Description

A special interface for KoShape to use during shape destruction. Don't use this interface directly unless you are KoShape.

Definition at line 245 of file KoShapeManager.h.

Constructor & Destructor Documentation

◆ ShapeInterface()

KoShapeManager::ShapeInterface::ShapeInterface ( KoShapeManager * _q)

Definition at line 442 of file KoShapeManager.cpp.

443 : q(_q)
444{
445}

Member Function Documentation

◆ notifyShapeDestructed()

void KoShapeManager::ShapeInterface::notifyShapeDestructed ( KoShape * shape)

Called by a shape when it is destructed. Please note that you cannot access any shape's method type or information during this call because the shape might be semi-destroyed.

Definition at line 447 of file KoShapeManager.cpp.

448{
449 QMutexLocker l1(&q->d->shapesMutex);
450 QMutexLocker l2(&q->d->treeMutex);
451
452 q->d->selection->deselect(shape);
453 q->d->aggregate4update.remove(shape);
454 q->d->compressedUpdatedShapes.remove(shape);
455
456 // we cannot access RTTI of the semi-destructed shape, so just
457 // unlink it lazily
458 if (q->d->tree.contains(shape)) {
459 q->d->tree.remove(shape);
460 }
461
462 q->d->shapes.removeAll(shape);
463}
Private *const d

References KoShapeManager::d, and KoShapeManager::q.

Member Data Documentation

◆ q

KoShapeManager* KoShapeManager::ShapeInterface::q
protected

Definition at line 256 of file KoShapeManager.h.


The documentation for this struct was generated from the following files: