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

#include <KoSvgTextFlipShapeContourTypeCommand.h>

+ Inheritance diagram for KoSvgTextFlipShapeContourTypeCommand:

Classes

struct  Private
 

Public Member Functions

 KoSvgTextFlipShapeContourTypeCommand (KoSvgTextShape *textShape, KoShape *shape, KUndo2Command *parent=nullptr)
 
void redo () override
 
void undo () override
 
 ~KoSvgTextFlipShapeContourTypeCommand ()
 
- Public Member Functions inherited from KUndo2Command
QString actionText () const
 
virtual bool canAnnihilateWith (const KUndo2Command *other) const
 
const KUndo2Commandchild (int index) const
 
int childCount () const
 
virtual QTime endTime () const
 
KUndo2CommandExtraDataextraData () const
 
bool hasParent () const
 
virtual int id () const
 
virtual bool isMerged () const
 
 KUndo2Command (const KUndo2MagicString &text, KUndo2Command *parent=0)
 
 KUndo2Command (KUndo2Command *parent=0)
 
virtual QVector< KUndo2Command * > mergeCommandsVector () const
 
virtual bool mergeWith (const KUndo2Command *other)
 
virtual void redoMergedCommands ()
 
void setEndTime ()
 
virtual void setEndTime (const QTime &time)
 
void setExtraData (KUndo2CommandExtraData *data)
 
void setText (const KUndo2MagicString &text)
 
void setTime ()
 
virtual void setTime (const QTime &time)
 
virtual void setTimedID (int timedID)
 
KUndo2MagicString text () const
 
virtual QTime time () const
 
virtual int timedId () const
 
virtual bool timedMergeWith (KUndo2Command *other)
 
virtual void undoMergedCommands ()
 
virtual ~KUndo2Command ()
 

Private Attributes

QScopedPointer< Privated
 

Detailed Description

Definition at line 15 of file KoSvgTextFlipShapeContourTypeCommand.h.

Constructor & Destructor Documentation

◆ KoSvgTextFlipShapeContourTypeCommand()

KoSvgTextFlipShapeContourTypeCommand::KoSvgTextFlipShapeContourTypeCommand ( KoSvgTextShape * textShape,
KoShape * shape,
KUndo2Command * parent = nullptr )

Definition at line 25 of file KoSvgTextFlipShapeContourTypeCommand.cpp.

26 : KUndo2Command(parent)
27 , d(new Private(textShape, shape))
28{
29
30}
KUndo2Command(KUndo2Command *parent=0)

◆ ~KoSvgTextFlipShapeContourTypeCommand()

KoSvgTextFlipShapeContourTypeCommand::~KoSvgTextFlipShapeContourTypeCommand ( )

Definition at line 32 of file KoSvgTextFlipShapeContourTypeCommand.cpp.

33{
34
35}

Member Function Documentation

◆ redo()

void KoSvgTextFlipShapeContourTypeCommand::redo ( )
overridevirtual

Applies a change to the document. This function must be implemented in the derived class. Calling KUndo2QStack::push(), KUndo2QStack::undo() or KUndo2QStack::redo() from this function leads to undefined behavior.

The default implementation calls redo() on all child commands.

See also
undo()

Reimplemented from KUndo2Command.

Definition at line 37 of file KoSvgTextFlipShapeContourTypeCommand.cpp.

38{
39 KoShapeBulkActionLock lock(d->textShape);
40
41 d->textShape->addShapeContours({d->shape}, !(d->isInside));
42
44}
static void bulkShapesUpdate(const UpdatesList &updates)

References KoShapeBulkActionLock::bulkShapesUpdate(), d, and KoShapeBulkActionLock::unlock().

◆ undo()

void KoSvgTextFlipShapeContourTypeCommand::undo ( )
overridevirtual

Reverts a change to the document. After undo() is called, the state of the document should be the same as before redo() was called. This function must be implemented in the derived class. Calling KUndo2QStack::push(), KUndo2QStack::undo() or KUndo2QStack::redo() from this function leads to undefined behavior.

The default implementation calls undo() on all child commands in reverse order.

See also
redo()

Reimplemented from KUndo2Command.

Definition at line 46 of file KoSvgTextFlipShapeContourTypeCommand.cpp.

47{
48 KoShapeBulkActionLock lock(d->textShape);
49
50 d->textShape->addShapeContours({d->shape}, d->isInside);
51
53}

References KoShapeBulkActionLock::bulkShapesUpdate(), d, and KoShapeBulkActionLock::unlock().

Member Data Documentation

◆ d

QScopedPointer<Private> KoSvgTextFlipShapeContourTypeCommand::d
private

Definition at line 25 of file KoSvgTextFlipShapeContourTypeCommand.h.


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