20template <
typename ModifyFunction>
24 if (shapes.isEmpty())
return 0;
28 Q_FOREACH(
KoShape *shape, shapes) {
30 qSharedPointerDynamicCast<KoShapeStroke>(shape->
stroke()) :
38 modifyFunction(newStroke);
40 newStrokes << newStroke;
46template <
class Policy>
49 if (shapes.size() == 1)
return true;
51 typename Policy::PointerType bg =
52 policy.getProperty(shapes.first());
54 Q_FOREACH (
KoShape *shape, shapes) {
55 typename Policy::PointerType otherBg = policy.getProperty(shape);
60 (bg && otherBg && policy.compareTo(bg, otherBg))
70template <
class Policy>
73 return compareShapePropertiesEqual<Policy>(shapes, Policy());
QSharedPointer< KoShapeStroke > KoShapeStrokeSP
The undo / redo command for setting the shape stroke.
virtual KoShapeStrokeModelSP stroke() const
QSharedPointer< T > toQShared(T *ptr)
auto modifyShapesStrokes(QList< KoShape * > shapes, ModifyFunction modifyFunction) -> decltype(modifyFunction(KoShapeStrokeSP()),(KUndo2Command *)(0))
bool compareShapePropertiesEqual(const QList< KoShape * > shapes, const Policy &policy)