Changeset View
Changeset View
Standalone View
Standalone View
libs/flake/commands/KoShapeReorderCommand.h
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Line(s) | 48 | public: | |||
---|---|---|---|---|---|
67 | 67 | | |||
68 | /** | 68 | /** | ||
69 | * Create a new KoShapeReorderCommand by calculating the new indexes required to move the shapes | 69 | * Create a new KoShapeReorderCommand by calculating the new indexes required to move the shapes | ||
70 | * according to the move parameter. | 70 | * according to the move parameter. | ||
71 | * @param shapes all the shapes that should be moved. | 71 | * @param shapes all the shapes that should be moved. | ||
72 | * @param manager the shapeManager that contains all the shapes that could have their indexes changed. | 72 | * @param manager the shapeManager that contains all the shapes that could have their indexes changed. | ||
73 | * @param move the moving type. | 73 | * @param move the moving type. | ||
74 | * @param parent the parent command for grouping purposes. | 74 | * @param parent the parent command for grouping purposes. | ||
75 | * @return command for reording the shapes or 0 if no reordering happened | 75 | * @return command for reordering the shapes or 0 if no reordering happened | ||
76 | */ | 76 | */ | ||
77 | static KoShapeReorderCommand *createCommand(const QList<KoShape*> &shapes, KoShapeManager *manager, | 77 | static KoShapeReorderCommand *createCommand(const QList<KoShape*> &shapes, KoShapeManager *manager, | ||
78 | MoveShapeType move, KUndo2Command *parent = 0); | 78 | MoveShapeType move, KUndo2Command *parent = 0); | ||
79 | 79 | | |||
80 | /** | 80 | /** | ||
81 | * @brief mergeInShape adjust zIndex of all the \p shapes and \p newShape to | 81 | * @brief mergeInShape adjust zIndex of all the \p shapes and \p newShape to | ||
82 | * avoid collisions between \p shapes and \p newShape. | 82 | * avoid collisions between \p shapes and \p newShape. | ||
83 | * | 83 | * | ||
84 | * Note1: \p newShape may or may not be contained in \p shapes, there | 84 | * Note1: \p newShape may or may not be contained in \p shapes, there | ||
85 | * is no difference. | 85 | * is no difference. | ||
86 | * Note2: the collisions inside \p shapes are ignored. They are just | 86 | * Note2: the collisions inside \p shapes are ignored. They are just | ||
87 | * adjusted to avoid collisions with \p newShape only | 87 | * adjusted to avoid collisions with \p newShape only | ||
88 | * @param parent the parent command for grouping purposes. | 88 | * @param parent the parent command for grouping purposes. | ||
89 | * @return command for reording the shapes or 0 if no reordering happened | 89 | * @return command for reordering the shapes or 0 if no reordering happened | ||
90 | */ | 90 | */ | ||
91 | static KoShapeReorderCommand *mergeInShape(QList<KoShape*> shapes, KoShape *newShape, | 91 | static KoShapeReorderCommand *mergeInShape(QList<KoShape*> shapes, KoShape *newShape, | ||
92 | KUndo2Command *parent = 0); | 92 | KUndo2Command *parent = 0); | ||
93 | 93 | | |||
94 | /** | 94 | /** | ||
95 | * Recalculates the attached z-indexes of \p shapes so that all indexes go | 95 | * Recalculates the attached z-indexes of \p shapes so that all indexes go | ||
96 | * strictly in ascending order and no shapes have repetitive indexes. The | 96 | * strictly in ascending order and no shapes have repetitive indexes. The | ||
97 | * physical order of the shapes in the array is not changed, on the indexes | 97 | * physical order of the shapes in the array is not changed, on the indexes | ||
Show All 33 Lines |