11#include <klocalizedstring.h>
33 Q_ASSERT(
d->shapes.count() ==
d->previousPositions.count());
34 Q_ASSERT(
d->shapes.count() ==
d->newPositions.count());
44 Q_FOREACH (
KoShape *shape,
d->shapes) {
47 d->previousPositions << pos;
48 d->newPositions << pos + offset;
63 for (
int i = 0; i <
d->shapes.count(); i++) {
77 for (
int i = 0; i <
d->shapes.count(); i++) {
95 if (other->
d->shapes !=
d->shapes ||
96 other->
d->anchor !=
d->anchor) {
101 d->newPositions = other->
d->newPositions;
static void bulkShapesUpdate(const UpdatesList &updates)
The undo / redo command for shape moving.
void undo() override
revert the actions done in redo
QList< KoShape * > shapes
KoFlake::AnchorPosition anchor
~KoShapeMoveCommand() override
bool mergeWith(const KUndo2Command *command) override
void redo() override
redo the command
KoShapeMoveCommand(const QList< KoShape * > &shapes, QList< QPointF > &previousPositions, QList< QPointF > &newPositions, KoFlake::AnchorPosition anchor=KoFlake::Center, KUndo2Command *parent=0)
QList< QPointF > newPositions
QList< QPointF > previousPositions
QPointF absolutePosition(KoFlake::AnchorPosition anchor=KoFlake::Center) const
void setAbsolutePosition(const QPointF &newPosition, KoFlake::AnchorPosition anchor=KoFlake::Center)
KUndo2MagicString kundo2_i18n(const char *text)