Krita Source Code Documentation
Loading...
Searching...
No Matches
KoSelection::Private::LayerShapeGeometryProtectedListener Class Reference

#include <KoSelection_p.h>

+ Inheritance diagram for KoSelection::Private::LayerShapeGeometryProtectedListener:

Public Member Functions

 LayerShapeGeometryProtectedListener (KoSelection *parent)
 
void notifyShapeChanged (KoShape::ChangeType type, KoShape *shape) override
 
- Public Member Functions inherited from KoShape::ShapeChangeListener
virtual ~ShapeChangeListener ()
 

Private Attributes

KoSelection * m_parent
 

Detailed Description

Definition at line 18 of file KoSelection_p.h.

Constructor & Destructor Documentation

◆ LayerShapeGeometryProtectedListener()

KoSelection::Private::LayerShapeGeometryProtectedListener::LayerShapeGeometryProtectedListener ( KoSelection * parent)
inline

Definition at line 21 of file KoSelection_p.h.

23 {
24 }
KoShapeContainer * parent() const
Definition KoShape.cpp:860

Member Function Documentation

◆ notifyShapeChanged()

void KoSelection::Private::LayerShapeGeometryProtectedListener::notifyShapeChanged ( KoShape::ChangeType type,
KoShape * shape )
overridevirtual

Implements KoShape::ShapeChangeListener.

Definition at line 22 of file KoSelection.cpp.

23{
25
26 if (type == KoShape::Deleted) {
27 m_parent->d->activeLayer = nullptr;
28 Q_EMIT m_parent->currentLayerChanged(m_parent->d->activeLayer);
29 } else if (type == KoShape::GeometryProtectedChanged) {
30 // we should reemit the signal with the same value
31 // to make sure all the clients see the geometry
32 // lock change
33 Q_EMIT m_parent->currentLayerChanged(m_parent->d->activeLayer);
34 }
35}
QScopedPointer< Private > d
void currentLayerChanged(const KoShapeLayer *layer)
emitted when the current layer is changed
KoShapeLayer * activeLayer() const
@ GeometryProtectedChanged
used after a setPosition()
Definition KoShape.h:113
@ Deleted
the shape was deleted
Definition KoShape.h:101
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:128

References KoSelection::activeLayer(), KoSelection::currentLayerChanged(), KoSelection::d, KoShape::Deleted, KoShape::GeometryProtectedChanged, KIS_SAFE_ASSERT_RECOVER_RETURN, and m_parent.

Member Data Documentation

◆ m_parent

KoSelection* KoSelection::Private::LayerShapeGeometryProtectedListener::m_parent
private

Definition at line 29 of file KoSelection_p.h.


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