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 454 of file KoShapeManager.cpp.

455 : q(_q)
456{
457}

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 459 of file KoShapeManager.cpp.

460{
461 QMutexLocker l1(&q->d->shapesMutex);
462 QMutexLocker l2(&q->d->treeMutex);
463
464 q->d->selection->deselect(shape);
465 q->d->aggregate4update.remove(shape);
466 q->d->compressedUpdatedShapes.remove(shape);
467
468 // we cannot access RTTI of the semi-destructed shape, so just
469 // unlink it lazily
470 if (q->d->tree.contains(shape)) {
471 q->d->tree.remove(shape);
472 }
473
474 q->d->shapes.removeAll(shape);
475}
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: