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

API docs go here. More...

#include <KoShapeRunAroundCommand.h>

+ Inheritance diagram for KoShapeRunAroundCommand:

Public Member Functions

 KoShapeRunAroundCommand (KoShape *shape, KoShape::TextRunAroundSide side, int runThrough, qreal distanceLeft, qreal distanceTop, qreal distanceRight, qreal distanceBottom, qreal threshold, KoShape::TextRunAroundContour contour, KUndo2Command *parent=0)
 
 Private (KoShape *s, KoShape::TextRunAroundSide side, int runThrough, qreal distanceLeft, qreal distanceTop, qreal distanceRight, qreal distanceBottom, qreal threshold, KoShape::TextRunAroundContour contour)
 
void redo () override
 redo the command
 
void undo () override
 revert the actions done in redo
 
 ~KoShapeRunAroundCommand () override
 
- 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 ()
 

Public Attributes

KoShape::TextRunAroundContour newContour
 
qreal newDistanceBottom
 
qreal newDistanceLeft
 
qreal newDistanceRight
 
qreal newDistanceTop
 
int newRunThrough
 
KoShape::TextRunAroundSide newSide
 
qreal newThreshold
 
KoShape::TextRunAroundContour oldContour
 
qreal oldDistanceBottom
 
qreal oldDistanceLeft
 
qreal oldDistanceRight
 
qreal oldDistanceTop
 
int oldRunThrough
 
KoShape::TextRunAroundSide oldSide
 
qreal oldThreshold
 
KoShapeshape
 

Private Attributes

Private *const d
 
- Private Attributes inherited from Private
KisCanvas2canvas
 
int displayedFrame
 
int intendedFrame
 

Additional Inherited Members

- Private Member Functions inherited from Private
 Private (KisCanvas2 *c)
 

Detailed Description

API docs go here.

Definition at line 12 of file KoShapeRunAroundCommand.cpp.

Constructor & Destructor Documentation

◆ KoShapeRunAroundCommand()

KoShapeRunAroundCommand::KoShapeRunAroundCommand ( KoShape * shape,
KoShape::TextRunAroundSide side,
int runThrough,
qreal distanceLeft,
qreal distanceTop,
qreal distanceRight,
qreal distanceBottom,
qreal threshold,
KoShape::TextRunAroundContour contour,
KUndo2Command * parent = 0 )

Definition at line 54 of file KoShapeRunAroundCommand.cpp.

55: KUndo2Command(parent)
56, d(new Private(shape, side, runThrough, distanceLeft, distanceTop, distanceRight, distanceBottom, threshold, contour))
57{
58 setText(kundo2_i18n("Change Shape RunAround"));
59}
void setText(const KUndo2MagicString &text)
KUndo2Command(KUndo2Command *parent=0)
KUndo2MagicString kundo2_i18n(const char *text)

References kundo2_i18n(), and KUndo2Command::setText().

◆ ~KoShapeRunAroundCommand()

KoShapeRunAroundCommand::~KoShapeRunAroundCommand ( )
override

Definition at line 61 of file KoShapeRunAroundCommand.cpp.

62{
63 delete d;
64}

References d.

Member Function Documentation

◆ Private()

KoShapeRunAroundCommand::Private ( KoShape * s,
KoShape::TextRunAroundSide side,
int runThrough,
qreal distanceLeft,
qreal distanceTop,
qreal distanceRight,
qreal distanceBottom,
qreal threshold,
KoShape::TextRunAroundContour contour )
inline

Definition at line 15 of file KoShapeRunAroundCommand.cpp.

16 : shape(s)
17 , newSide(side)
18 , newRunThrough(runThrough)
19 , newDistanceLeft(distanceLeft)
20 , newDistanceTop(distanceTop)
21 , newDistanceRight(distanceRight)
22 , newDistanceBottom(distanceBottom)
23 , newThreshold(threshold)
24 , newContour(contour)
33 {}
KoShape::TextRunAroundSide oldSide
KoShape::TextRunAroundContour newContour
KoShape::TextRunAroundContour oldContour
KoShape::TextRunAroundSide newSide
TextRunAroundContour textRunAroundContour() const
Definition KoShape.cpp:908
int runThrough() const
Definition KoShape.cpp:962
qreal textRunAroundDistanceTop() const
Definition KoShape.cpp:858
qreal textRunAroundDistanceRight() const
Definition KoShape.cpp:878
qreal textRunAroundDistanceBottom() const
Definition KoShape.cpp:888
qreal textRunAroundThreshold() const
Definition KoShape.cpp:898
TextRunAroundSide textRunAroundSide() const
Definition KoShape.cpp:831
qreal textRunAroundDistanceLeft() const
Definition KoShape.cpp:868

◆ redo()

void KoShapeRunAroundCommand::redo ( )
overridevirtual

redo the command

Reimplemented from KUndo2Command.

Definition at line 66 of file KoShapeRunAroundCommand.cpp.

67{
69 d->shape->setTextRunAroundSide(d->newSide, KoShape::Background);
70 d->shape->setRunThrough(d->newRunThrough);
71 d->shape->setTextRunAroundDistanceLeft(d->newDistanceLeft);
72 d->shape->setTextRunAroundDistanceTop(d->newDistanceTop);
73 d->shape->setTextRunAroundDistanceRight(d->newDistanceRight);
74 d->shape->setTextRunAroundDistanceBottom(d->newDistanceBottom);
75 d->shape->setTextRunAroundThreshold(d->newThreshold);
76 d->shape->setTextRunAroundContour(d->newContour);
77 d->shape->notifyChanged();
78}
virtual void redo()
@ Background
Definition KoShape.h:141

References KoShape::Background, d, and KUndo2Command::redo().

◆ undo()

void KoShapeRunAroundCommand::undo ( )
overridevirtual

revert the actions done in redo

Reimplemented from KUndo2Command.

Definition at line 80 of file KoShapeRunAroundCommand.cpp.

81{
83 d->shape->setTextRunAroundSide(d->oldSide, KoShape::Background);
84 d->shape->setRunThrough(d->oldRunThrough);
85 d->shape->setTextRunAroundDistanceLeft(d->oldDistanceLeft);
86 d->shape->setTextRunAroundDistanceTop(d->oldDistanceTop);
87 d->shape->setTextRunAroundDistanceRight(d->oldDistanceRight);
88 d->shape->setTextRunAroundDistanceBottom(d->oldDistanceBottom);
89 d->shape->setTextRunAroundThreshold(d->oldThreshold);
90 d->shape->setTextRunAroundContour(d->oldContour);
91 d->shape->notifyChanged();
92}
virtual void undo()

References KoShape::Background, d, and KUndo2Command::undo().

Member Data Documentation

◆ d

Private* const KoShapeRunAroundCommand::d
private

Definition at line 29 of file KoShapeRunAroundCommand.h.

◆ newContour

KoShape::TextRunAroundContour KoShapeRunAroundCommand::newContour

Definition at line 43 of file KoShapeRunAroundCommand.cpp.

◆ newDistanceBottom

qreal KoShapeRunAroundCommand::newDistanceBottom

Definition at line 41 of file KoShapeRunAroundCommand.cpp.

◆ newDistanceLeft

qreal KoShapeRunAroundCommand::newDistanceLeft

Definition at line 38 of file KoShapeRunAroundCommand.cpp.

◆ newDistanceRight

qreal KoShapeRunAroundCommand::newDistanceRight

Definition at line 40 of file KoShapeRunAroundCommand.cpp.

◆ newDistanceTop

qreal KoShapeRunAroundCommand::newDistanceTop

Definition at line 39 of file KoShapeRunAroundCommand.cpp.

◆ newRunThrough

int KoShapeRunAroundCommand::newRunThrough

Definition at line 37 of file KoShapeRunAroundCommand.cpp.

◆ newSide

KoShape::TextRunAroundSide KoShapeRunAroundCommand::newSide

Definition at line 36 of file KoShapeRunAroundCommand.cpp.

◆ newThreshold

qreal KoShapeRunAroundCommand::newThreshold

Definition at line 42 of file KoShapeRunAroundCommand.cpp.

◆ oldContour

KoShape::TextRunAroundContour KoShapeRunAroundCommand::oldContour

Definition at line 51 of file KoShapeRunAroundCommand.cpp.

◆ oldDistanceBottom

qreal KoShapeRunAroundCommand::oldDistanceBottom

Definition at line 49 of file KoShapeRunAroundCommand.cpp.

◆ oldDistanceLeft

qreal KoShapeRunAroundCommand::oldDistanceLeft

Definition at line 46 of file KoShapeRunAroundCommand.cpp.

◆ oldDistanceRight

qreal KoShapeRunAroundCommand::oldDistanceRight

Definition at line 48 of file KoShapeRunAroundCommand.cpp.

◆ oldDistanceTop

qreal KoShapeRunAroundCommand::oldDistanceTop

Definition at line 47 of file KoShapeRunAroundCommand.cpp.

◆ oldRunThrough

int KoShapeRunAroundCommand::oldRunThrough

Definition at line 45 of file KoShapeRunAroundCommand.cpp.

◆ oldSide

KoShape::TextRunAroundSide KoShapeRunAroundCommand::oldSide

Definition at line 44 of file KoShapeRunAroundCommand.cpp.

◆ oldThreshold

qreal KoShapeRunAroundCommand::oldThreshold

Definition at line 50 of file KoShapeRunAroundCommand.cpp.

◆ shape

KoShape* KoShapeRunAroundCommand::shape

Definition at line 35 of file KoShapeRunAroundCommand.cpp.


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