Krita Source Code Documentation
Loading...
Searching...
No Matches
KisSelectedShapesProxy Class Reference

#include <KisSelectedShapesProxy.h>

+ Inheritance diagram for KisSelectedShapesProxy:

Classes

struct  Private
 

Signals

void currentLayerChanged (const KoShapeLayer *layer)
 
void selectionChanged ()
 
void selectionContentChanged ()
 
- Signals inherited from KoSelectedShapesProxy
void currentLayerChanged (const KoShapeLayer *layer)
 
void selectionChanged ()
 
void selectionContentChanged ()
 

Public Member Functions

 KisSelectedShapesProxy (KoShapeManager *globalShapeManager)
 
KoSelectionselection () override
 
void setShapeManager (KoShapeManager *manager)
 
 ~KisSelectedShapesProxy () override
 
- Public Member Functions inherited from KoSelectedShapesProxy
bool isRequestingToBeEdited ()
 The shape wants to edited. This is used when a shape is passed between two different tools. This notifies the new tool that it needs to enter some extra edit mode.
 
 KoSelectedShapesProxy (QObject *parent=0)
 
void setRequestingToBeEdited (bool value)
 

Private Attributes

QScopedPointer< Privatem_d
 

Detailed Description

Definition at line 16 of file KisSelectedShapesProxy.h.

Constructor & Destructor Documentation

◆ KisSelectedShapesProxy()

KisSelectedShapesProxy::KisSelectedShapesProxy ( KoShapeManager * globalShapeManager)

Definition at line 22 of file KisSelectedShapesProxy.cpp.

23 : m_d(new Private())
24{
25 m_d->globalShapeManager = globalShapeManager;
26
27 connect(m_d->globalShapeManager->selection(),
28 SIGNAL(currentLayerChanged(const KoShapeLayer*)),
29 SIGNAL(currentLayerChanged(const KoShapeLayer*)));
30}
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
void currentLayerChanged(const KoShapeLayer *layer)
QScopedPointer< Private > m_d

References connect(), currentLayerChanged(), and m_d.

◆ ~KisSelectedShapesProxy()

KisSelectedShapesProxy::~KisSelectedShapesProxy ( )
override

Definition at line 32 of file KisSelectedShapesProxy.cpp.

33{
34
35}

Member Function Documentation

◆ currentLayerChanged

void KisSelectedShapesProxy::currentLayerChanged ( const KoShapeLayer * layer)
signal

◆ selection()

KoSelection * KisSelectedShapesProxy::selection ( )
overridevirtual

Returns a pointer to a currently active shape selection. Don't connect to the selection, unless you really know what you are doing. Use the signals provided by KoSelectedShapesProxy itself. They are guaranteed to be valid all the time.

Implements KoSelectedShapesProxy.

Definition at line 55 of file KisSelectedShapesProxy.cpp.

56{
57 return m_d->shapeManager ?
58 m_d->shapeManager->selection() :
59 m_d->globalShapeManager->selection();
60}

References m_d.

◆ selectionChanged

void KisSelectedShapesProxy::selectionChanged ( )
signal

◆ selectionContentChanged

void KisSelectedShapesProxy::selectionContentChanged ( )
signal

◆ setShapeManager()

void KisSelectedShapesProxy::setShapeManager ( KoShapeManager * manager)

Definition at line 37 of file KisSelectedShapesProxy.cpp.

38{
39 if (shapeManager != m_d->shapeManager) {
40 m_d->shapeManager = shapeManager;
41
42 m_d->shapeManagerConnections.clear();
43
44 if (m_d->shapeManager) {
45 m_d->shapeManagerConnections.addConnection(
46 m_d->shapeManager, SIGNAL(selectionChanged()), this, SIGNAL(selectionChanged()));
47 m_d->shapeManagerConnections.addConnection(
48 m_d->shapeManager, SIGNAL(selectionContentChanged()), this, SIGNAL(selectionContentChanged()));
49 }
50
51 Q_EMIT selectionChanged();
52 }
53}

References m_d, selectionChanged(), and selectionContentChanged().

Member Data Documentation

◆ m_d

QScopedPointer<Private> KisSelectedShapesProxy::m_d
private

Definition at line 36 of file KisSelectedShapesProxy.h.


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