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

Public Member Functions

 Private (KoSvgTextShape *_text, QList< KoShape * > _shapes, KoSvgTextReorderShapeInsideCommand::MoveShapeType _type)
 

Public Attributes

KoSvgTextShapeMementoSP memento
 
QList< int > oldIndices
 
QList< KoShape * > shapes
 
KoSvgTextShapetextShape
 
KoSvgTextReorderShapeInsideCommand::MoveShapeType type
 

Detailed Description

Definition at line 11 of file KoSvgTextReorderShapeInsideCommand.cpp.

Constructor & Destructor Documentation

◆ Private()

KoSvgTextReorderShapeInsideCommand::Private::Private ( KoSvgTextShape * _text,
QList< KoShape * > _shapes,
KoSvgTextReorderShapeInsideCommand::MoveShapeType _type )
inline

Definition at line 12 of file KoSvgTextReorderShapeInsideCommand.cpp.

13 : textShape(_text)
15 , shapes(_shapes)
16 , type(_type)
17 {
18 std::sort(shapes.begin(), shapes.end(), [this](KoShape *a, KoShape *b)
19 {
20 return this->textShape->shapesInside().indexOf(a) < this->textShape->shapesInside().indexOf(b);
21 });
22 Q_FOREACH(KoShape *shape, shapes) {
23 oldIndices.append(textShape->shapesInside().indexOf(shape));
24 }
25 }
KoSvgTextShapeMementoSP getMemento()
Get a memento holding the current textdata and layout info.
QList< KoShape * > shapesInside
KoSvgTextReorderShapeInsideCommand::MoveShapeType type

References oldIndices, shapes, KoSvgTextShape::shapesInside, and textShape.

Member Data Documentation

◆ memento

KoSvgTextShapeMementoSP KoSvgTextReorderShapeInsideCommand::Private::memento

Definition at line 28 of file KoSvgTextReorderShapeInsideCommand.cpp.

◆ oldIndices

QList<int> KoSvgTextReorderShapeInsideCommand::Private::oldIndices

Definition at line 30 of file KoSvgTextReorderShapeInsideCommand.cpp.

◆ shapes

QList<KoShape *> KoSvgTextReorderShapeInsideCommand::Private::shapes

Definition at line 29 of file KoSvgTextReorderShapeInsideCommand.cpp.

◆ textShape

KoSvgTextShape* KoSvgTextReorderShapeInsideCommand::Private::textShape

Definition at line 27 of file KoSvgTextReorderShapeInsideCommand.cpp.

◆ type

KoSvgTextReorderShapeInsideCommand::MoveShapeType KoSvgTextReorderShapeInsideCommand::Private::type

Definition at line 31 of file KoSvgTextReorderShapeInsideCommand.cpp.


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