Krita Source Code Documentation
Loading...
Searching...
No Matches
KoShapeFillResourceConnector::Private Struct Reference

Public Member Functions

void applyShapeColoring (KoFlake::FillVariant fillVariant, const KoColor &color)
 

Public Attributes

KoCanvasBasecanvas
 
KisSignalAutoConnectionsStore resourceManagerConnections
 

Detailed Description

Definition at line 23 of file KoShapeFillResourceConnector.cpp.

Member Function Documentation

◆ applyShapeColoring()

void KoShapeFillResourceConnector::Private::applyShapeColoring ( KoFlake::FillVariant fillVariant,
const KoColor & color )

Definition at line 75 of file KoShapeFillResourceConnector.cpp.

76{
78
79 if (selectedEditableShapes.isEmpty()) {
80 return;
81 }
82
83 KoShapeFillWrapper wrapper(selectedEditableShapes, fillVariant);
84 KUndo2Command *command = wrapper.setColor(color.toQColor()); // TODO: do the conversion in a better way!
85
86 if (command) {
87 canvas->addCommand(command);
88 }
89}
virtual void addCommand(KUndo2Command *command)=0
virtual KoSelectedShapesProxy * selectedShapesProxy() const =0
selectedShapesProxy() is a special interface for keeping a persistent connections to selectionChanged...
void toQColor(QColor *c) const
a convenience method for the above.
Definition KoColor.cpp:198
virtual KoSelection * selection()=0
const QList< KoShape * > selectedEditableShapes() const

References KoCanvasBase::addCommand(), canvas, KoSelection::selectedEditableShapes(), KoCanvasBase::selectedShapesProxy(), KoSelectedShapesProxy::selection(), KoShapeFillWrapper::setColor(), and KoColor::toQColor().

Member Data Documentation

◆ canvas

KoCanvasBase* KoShapeFillResourceConnector::Private::canvas

Definition at line 25 of file KoShapeFillResourceConnector.cpp.

◆ resourceManagerConnections

KisSignalAutoConnectionsStore KoShapeFillResourceConnector::Private::resourceManagerConnections

Definition at line 26 of file KoShapeFillResourceConnector.cpp.


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