...
 
Commits (10)
......@@ -21,13 +21,15 @@
#include <QRectF>
#include <QTransform>
#include <QPainter>
#include <QSharedData>
#include <KoShape.h>
#include "kis_algebra_2d.h"
#include <KoViewConverter.h>
#include <KoShapePainter.h>
struct Q_DECL_HIDDEN KoClipMask::Private {
struct Q_DECL_HIDDEN KoClipMask::Private : public QSharedData
{
Private() {}
Private(const Private &rhs)
: coordinates(rhs.coordinates),
......@@ -35,6 +37,7 @@ struct Q_DECL_HIDDEN KoClipMask::Private {
maskRect(rhs.maskRect),
extraShapeTransform(rhs.extraShapeTransform)
{
// XXX: Use KisDescendent<KoShape> instead of this
Q_FOREACH (KoShape *shape, rhs.shapes) {
KoShape *clonedShape = shape->cloneShape();
KIS_ASSERT_RECOVER(clonedShape) { continue; }
......@@ -68,11 +71,6 @@ KoClipMask::~KoClipMask()
{
}
KoClipMask::KoClipMask(const KoClipMask &rhs)
: m_d(new Private(*rhs.m_d))
{
}
KoClipMask *KoClipMask::clone() const
{
return new KoClipMask(*this);
......
......@@ -22,8 +22,8 @@
#include "kritaflake_export.h"
#include <KoFlakeCoordinateSystem.h>
#include <QScopedPointer>
#include <QList>
#include <QSharedDataPointer>
class KoShape;
class QRectF;
......@@ -59,10 +59,8 @@ public:
void drawMask(QPainter *painter, KoShape *shape);
private:
KoClipMask(const KoClipMask &rhs);
struct Private;
const QScopedPointer<Private> m_d;
QSharedDataPointer<Private> m_d;
};
#endif // KOCLIPMASK_H
......@@ -26,6 +26,7 @@
#include <QPainterPath>
#include <QPainter>
#include <QVarLengthArray>
#include <QSharedData>
#include <kis_algebra_2d.h>
......@@ -44,7 +45,7 @@ QTransform scaleFromPercent(const QSizeF &size)
return QTransform().scale(w/1.0, h/1.0);
}
class Q_DECL_HIDDEN KoClipPath::Private
class Q_DECL_HIDDEN KoClipPath::Private : public QSharedData
{
public:
Private()
......@@ -121,11 +122,6 @@ KoClipPath::KoClipPath(QList<KoShape*> clipShapes, KoFlake::CoordinateSystem coo
d->compileClipPath();
}
KoClipPath::KoClipPath(const KoClipPath &rhs)
: d(new Private(*rhs.d))
{
}
KoClipPath::~KoClipPath()
{
}
......
......@@ -24,6 +24,7 @@
#include <QScopedPointer>
#include <QList>
#include <QSharedDataPointer>
#include <qnamespace.h>
#include <KoFlakeCoordinateSystem.h>
......@@ -82,12 +83,9 @@ public:
/// Applies the clipping to the given painter
static void applyClipping(KoShape *clippedShape, QPainter &painter, const KoViewConverter &converter);
private:
KoClipPath(const KoClipPath &rhs);
private:
class Private;
const QScopedPointer<Private> d;
QSharedDataPointer<Private> d;
};
#endif // KOCLIPPATH_H
......@@ -20,6 +20,7 @@
#include "KoColorBackground.h"
#include "KoColorBackground_p.h"
#include "KoShapeSavingContext.h"
#include "KisSharedDescendent.h"
#include <KoOdfGraphicStyles.h>
#include <KoOdfLoadingContext.h>
#include <KoXmlNS.h>
......@@ -29,19 +30,19 @@
#include <QPainter>
KoColorBackground::KoColorBackground()
: KoShapeBackground(*(new KoColorBackgroundPrivate()))
: KoShapeBackground(KisSharedDescendent<KoShapeBackgroundPrivate>::of(KoColorBackgroundPrivate()))
{
}
KoColorBackground::KoColorBackground(KoShapeBackgroundPrivate &dd)
: KoShapeBackground(dd)
KoColorBackground::KoColorBackground(KisSharedDescendent<KoShapeBackgroundPrivate> &dd)
: KoShapeBackground(dd)
{
}
KoColorBackground::KoColorBackground(const QColor &color, Qt::BrushStyle style)
: KoShapeBackground(*(new KoColorBackgroundPrivate()))
: KoShapeBackground(KisSharedDescendent<KoShapeBackgroundPrivate>::of(KoColorBackgroundPrivate()))
{
Q_D(KoColorBackground);
SHARED_D(KoColorBackground);
if (style < Qt::SolidPattern || style >= Qt::LinearGradientPattern)
style = Qt::SolidPattern;
d->style = style;
......@@ -54,7 +55,7 @@ KoColorBackground::~KoColorBackground()
bool KoColorBackground::compareTo(const KoShapeBackground *other) const
{
Q_D(const KoColorBackground);
CONST_SHARED_D(KoColorBackground);
const KoColorBackground *bg = dynamic_cast<const KoColorBackground*>(other);
return bg && bg->color() == d->color;
......@@ -62,25 +63,25 @@ bool KoColorBackground::compareTo(const KoShapeBackground *other) const
QColor KoColorBackground::color() const
{
Q_D(const KoColorBackground);
CONST_SHARED_D(KoColorBackground);
return d->color;
}
void KoColorBackground::setColor(const QColor &color)
{
Q_D(KoColorBackground);
SHARED_D(KoColorBackground);
d->color = color;
}
Qt::BrushStyle KoColorBackground::style() const
{
Q_D(const KoColorBackground);
CONST_SHARED_D(KoColorBackground);
return d->style;
}
QBrush KoColorBackground::brush() const
{
Q_D(const KoColorBackground);
CONST_SHARED_D(KoColorBackground);
return QBrush(d->color, d->style);
}
......@@ -92,13 +93,13 @@ void KoColorBackground::paint(QPainter &painter, const KoViewConverter &/*conver
void KoColorBackground::fillStyle(KoGenStyle &style, KoShapeSavingContext &context)
{
Q_D(KoColorBackground);
SHARED_D(KoColorBackground);
KoOdfGraphicStyles::saveOdfFillStyle(style, context.mainStyles(), QBrush(d->color, d->style));
}
bool KoColorBackground::loadStyle(KoOdfLoadingContext & context, const QSizeF &)
{
Q_D(KoColorBackground);
SHARED_D(KoColorBackground);
KoStyleStack &styleStack = context.styleStack();
if (! styleStack.hasProperty(KoXmlNS::draw, "fill"))
return false;
......
......@@ -59,10 +59,9 @@ public:
// reimplemented from KoShapeBackground
bool loadStyle(KoOdfLoadingContext & context, const QSizeF &shapeSize) override;
protected:
KoColorBackground(KoShapeBackgroundPrivate &dd);
KoColorBackground(KisSharedDescendent<KoShapeBackgroundPrivate> &dd);
private:
Q_DECLARE_PRIVATE(KoColorBackground)
Q_DISABLE_COPY(KoColorBackground)
SHARED_DECLARE_PRIVATE(KoColorBackground)
};
#endif // KOCOLORBACKGROUND_H
This diff is collapsed.
......@@ -137,9 +137,15 @@ protected:
/// reimplemented
void shapeChanged(ChangeType type, KoShape *shape) override;
private:
QPointF escapeDirection(int handleId) const;
/// Populate the path list by a normal way
void normalPath(const qreal MinimumEscapeLength);
private:
Q_DECLARE_PRIVATE(KoConnectionShape)
class Private;
QSharedDataPointer<Private> d;
};
#endif
......@@ -19,16 +19,14 @@
#ifndef KOCONNECTIONSHAPEPRIVATE_P
#define KOCONNECTIONSHAPEPRIVATE_P
#include "KoParameterShape_p.h"
#include <QSharedData>
#include "KoConnectionShape.h"
class KoConnectionShapePrivate : public KoParameterShapePrivate
class KoConnectionShape::Private : public QSharedData
{
public:
explicit KoConnectionShapePrivate(KoConnectionShape *q);
explicit KoConnectionShapePrivate(const KoConnectionShapePrivate &rhs, KoConnectionShape *q);
/// Returns escape direction of given handle
QPointF escapeDirection(int handleId) const;
explicit Private();
explicit Private(const Private &rhs);
/// Checks if rays from given points into given directions intersect
bool intersects(const QPointF &p1, const QPointF &d1, const QPointF &p2, const QPointF &d2, QPointF &isect);
......@@ -36,9 +34,6 @@ public:
/// Returns perpendicular direction from given point p1 and direction d1 toward point p2
QPointF perpendicularDirection(const QPointF &p1, const QPointF &d1, const QPointF &p2);
/// Populate the path list by a normal way
void normalPath(const qreal MinimumEscapeLength);
qreal scalarProd(const QPointF &v1, const QPointF &v2) const;
qreal crossProd(const QPointF &v1, const QPointF &v2) const;
......@@ -54,7 +49,6 @@ public:
KoConnectionShape::Type connectionType;
bool forceUpdate;
bool hasCustomPath;
Q_DECLARE_PUBLIC(KoConnectionShape)
};
#endif
......@@ -44,18 +44,18 @@ public:
};
KoGradientBackground::KoGradientBackground(QGradient * gradient, const QTransform &matrix)
: KoShapeBackground(*(new KoGradientBackgroundPrivate()))
: KoShapeBackground(KisSharedDescendent<KoShapeBackgroundPrivate>::of(KoGradientBackgroundPrivate()))
{
Q_D(KoGradientBackground);
SHARED_D(KoGradientBackground);
d->gradient = gradient;
d->matrix = matrix;
Q_ASSERT(d->gradient);
}
KoGradientBackground::KoGradientBackground(const QGradient & gradient, const QTransform &matrix)
: KoShapeBackground(*(new KoGradientBackgroundPrivate()))
: KoShapeBackground(KisSharedDescendent<KoShapeBackgroundPrivate>::of(KoGradientBackgroundPrivate()))
{
Q_D(KoGradientBackground);
SHARED_D(KoGradientBackground);
d->gradient = KoFlake::cloneGradient(&gradient);
d->matrix = matrix;
Q_ASSERT(d->gradient);
......@@ -63,13 +63,13 @@ KoGradientBackground::KoGradientBackground(const QGradient & gradient, const QTr
KoGradientBackground::~KoGradientBackground()
{
Q_D(KoGradientBackground);
SHARED_D(KoGradientBackground);
delete d->gradient;
}
bool KoGradientBackground::compareTo(const KoShapeBackground *other) const
{
Q_D(const KoGradientBackground);
CONST_SHARED_D(KoGradientBackground);
const KoGradientBackground *otherGradient = dynamic_cast<const KoGradientBackground*>(other);
return otherGradient &&
......@@ -79,19 +79,19 @@ bool KoGradientBackground::compareTo(const KoShapeBackground *other) const
void KoGradientBackground::setTransform(const QTransform &matrix)
{
Q_D(KoGradientBackground);
SHARED_D(KoGradientBackground);
d->matrix = matrix;
}
QTransform KoGradientBackground::transform() const
{
Q_D(const KoGradientBackground);
CONST_SHARED_D(KoGradientBackground);
return d->matrix;
}
void KoGradientBackground::setGradient(const QGradient &gradient)
{
Q_D(KoGradientBackground);
SHARED_D(KoGradientBackground);
delete d->gradient;
d->gradient = KoFlake::cloneGradient(&gradient);
......@@ -100,13 +100,13 @@ void KoGradientBackground::setGradient(const QGradient &gradient)
const QGradient * KoGradientBackground::gradient() const
{
Q_D(const KoGradientBackground);
CONST_SHARED_D(KoGradientBackground);
return d->gradient;
}
void KoGradientBackground::paint(QPainter &painter, const KoViewConverter &/*converter*/, KoShapePaintingContext &/*context*/, const QPainterPath &fillPath) const
{
Q_D(const KoGradientBackground);
CONST_SHARED_D(KoGradientBackground);
if (!d->gradient) return;
if (d->gradient->coordinateMode() == QGradient::ObjectBoundingMode) {
......@@ -147,7 +147,7 @@ void KoGradientBackground::paint(QPainter &painter, const KoViewConverter &/*con
void KoGradientBackground::fillStyle(KoGenStyle &style, KoShapeSavingContext &context)
{
Q_D(KoGradientBackground);
SHARED_D(KoGradientBackground);
if (!d->gradient) return;
QBrush brush(*d->gradient);
brush.setTransform(d->matrix);
......@@ -156,7 +156,7 @@ void KoGradientBackground::fillStyle(KoGenStyle &style, KoShapeSavingContext &co
bool KoGradientBackground::loadStyle(KoOdfLoadingContext &context, const QSizeF &shapeSize)
{
Q_D(KoGradientBackground);
SHARED_D(KoGradientBackground);
KoStyleStack &styleStack = context.styleStack();
if (! styleStack.hasProperty(KoXmlNS::draw, "fill"))
return false;
......
......@@ -70,10 +70,8 @@ public:
void fillStyle(KoGenStyle &style, KoShapeSavingContext &context) override;
/// reimplemented from KoShapeBackground
bool loadStyle(KoOdfLoadingContext &context, const QSizeF &shapeSize) override;
private:
Q_DECLARE_PRIVATE(KoGradientBackground)
Q_DISABLE_COPY(KoGradientBackground)
SHARED_DECLARE_PRIVATE(KoGradientBackground)
};
#endif // KOGRADIENTBACKGROUND_H
......@@ -54,13 +54,13 @@ public:
};
KoHatchBackground::KoHatchBackground()
: KoColorBackground(*(new KoHatchBackgroundPrivate()))
: KoColorBackground(KisSharedDescendent<KoShapeBackgroundPrivate>::of(KoHatchBackgroundPrivate()))
{
}
void KoHatchBackground::paint(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &context, const QPainterPath &fillPath) const
{
Q_D(const KoHatchBackground);
CONST_SHARED_D(KoHatchBackground);
if (d->color.isValid()) {
// paint background color if set by using the color background
KoColorBackground::paint(painter, converter, context, fillPath);
......@@ -127,7 +127,7 @@ void KoHatchBackground::paint(QPainter &painter, const KoViewConverter &converte
void KoHatchBackground::fillStyle(KoGenStyle &style, KoShapeSavingContext &context)
{
Q_D(KoHatchBackground);
SHARED_D(KoHatchBackground);
KoGenStyle::Type type = style.type();
KoGenStyle::PropertyType propertyType = (type == KoGenStyle::GraphicStyle || type == KoGenStyle::GraphicAutoStyle ||
......@@ -145,7 +145,7 @@ void KoHatchBackground::fillStyle(KoGenStyle &style, KoShapeSavingContext &conte
QString KoHatchBackground::saveHatchStyle(KoShapeSavingContext &context) const
{
Q_D(const KoHatchBackground);
CONST_SHARED_D(KoHatchBackground);
KoGenStyle hatchStyle(KoGenStyle::HatchStyle /*no family name*/);
hatchStyle.addAttribute("draw:display-name", d->name);
hatchStyle.addAttribute("draw:color", d->lineColor.name());
......@@ -172,7 +172,7 @@ QString KoHatchBackground::saveHatchStyle(KoShapeSavingContext &context) const
bool KoHatchBackground::loadStyle(KoOdfLoadingContext &context, const QSizeF &shapeSize)
{
// <draw:hatch draw:name="hatchStyle3" draw:color="#000000" draw:display-name="#000000 Vertical" draw:distance="0.102cm" draw:rotation="900" draw:style="single"/>
Q_D(KoHatchBackground);
SHARED_D(KoHatchBackground);
Q_UNUSED(shapeSize);
KoStyleStack &styleStack = context.styleStack();
......
......@@ -51,8 +51,8 @@ public:
private:
QString saveHatchStyle(KoShapeSavingContext &context) const;
Q_DECLARE_PRIVATE(KoHatchBackground)
Q_DISABLE_COPY(KoHatchBackground)
private:
SHARED_DECLARE_PRIVATE(KoHatchBackground)
};
#endif /* KOHATCHBACKGROUND_H */
......@@ -65,7 +65,7 @@ public:
KoOdfGradientBackground::KoOdfGradientBackground()
: KoShapeBackground(*(new KoOdfGradientBackgroundPrivate()))
: KoShapeBackground(KisSharedDescendent<KoShapeBackgroundPrivate>::of(KoOdfGradientBackgroundPrivate()))
{
}
......@@ -84,7 +84,7 @@ bool KoOdfGradientBackground::compareTo(const KoShapeBackground *other) const
bool KoOdfGradientBackground::loadOdf(const KoXmlElement& e)
{
Q_D(KoOdfGradientBackground);
SHARED_D(KoOdfGradientBackground);
d->style = e.attributeNS(KoXmlNS::draw, "style", QString());
//TODO: support ellipsoid here too
if ((d->style != "rectangular") && (d->style != "square")) {
......@@ -109,7 +109,7 @@ bool KoOdfGradientBackground::loadOdf(const KoXmlElement& e)
void KoOdfGradientBackground::saveOdf(KoGenStyle& styleFill, KoGenStyles& mainStyles) const
{
Q_D(const KoOdfGradientBackground);
CONST_SHARED_D(KoOdfGradientBackground);
KoGenStyle::Type type = styleFill.type();
KoGenStyle::PropertyType propertyType = (type == KoGenStyle::GraphicStyle || type == KoGenStyle::GraphicAutoStyle ||
......@@ -139,7 +139,7 @@ void KoOdfGradientBackground::saveOdf(KoGenStyle& styleFill, KoGenStyles& mainSt
void KoOdfGradientBackground::paint(QPainter& painter, const KoViewConverter &/*converter*/, KoShapePaintingContext &/*context*/, const QPainterPath& fillPath) const
{
Q_D(const KoOdfGradientBackground);
CONST_SHARED_D(KoOdfGradientBackground);
QImage buffer;
......@@ -169,7 +169,7 @@ void KoOdfGradientBackground::fillStyle(KoGenStyle& style, KoShapeSavingContext&
bool KoOdfGradientBackground::loadStyle(KoOdfLoadingContext& context, const QSizeF& shapeSize)
{
Q_UNUSED(shapeSize);
Q_D(KoOdfGradientBackground);
SHARED_D(KoOdfGradientBackground);
KoStyleStack &styleStack = context.styleStack();
if (!styleStack.hasProperty(KoXmlNS::draw, "fill")) {
......@@ -197,7 +197,7 @@ bool KoOdfGradientBackground::loadStyle(KoOdfLoadingContext& context, const QSiz
void KoOdfGradientBackground::renderSquareGradient(QImage& buffer) const
{
Q_D(const KoOdfGradientBackground);
CONST_SHARED_D(KoOdfGradientBackground);
buffer.fill(d->startColor.rgba());
QPainter painter(&buffer);
......@@ -261,7 +261,7 @@ void KoOdfGradientBackground::renderSquareGradient(QImage& buffer) const
void KoOdfGradientBackground::renderRectangleGradient(QImage& buffer) const
{
Q_D(const KoOdfGradientBackground);
CONST_SHARED_D(KoOdfGradientBackground);
buffer.fill(d->startColor.rgba());
QPainter painter(&buffer);
......@@ -377,7 +377,7 @@ void KoOdfGradientBackground::renderRectangleGradient(QImage& buffer) const
void KoOdfGradientBackground::debug() const
{
Q_D(const KoOdfGradientBackground);
CONST_SHARED_D(KoOdfGradientBackground);
debugFlake << "cx,cy: "<< d->cx << d->cy;
debugFlake << "style" << d->style;
debugFlake << "colors" << d->startColor << d->endColor;
......
......@@ -57,10 +57,8 @@ private:
private:
void debug() const;
private:
Q_DECLARE_PRIVATE(KoOdfGradientBackground)
Q_DISABLE_COPY(KoOdfGradientBackground)
SHARED_DECLARE_PRIVATE(KoOdfGradientBackground)
};
#endif
......@@ -26,26 +26,28 @@
#include <QPainter>
#include <FlakeDebug.h>
KoParameterShapePrivate::KoParameterShapePrivate(KoParameterShape *shape)
: KoPathShapePrivate(shape)
KoParameterShape::Private::Private()
: QSharedData()
, parametric(true)
{
}
KoParameterShapePrivate::KoParameterShapePrivate(const KoParameterShapePrivate &rhs, KoParameterShape *q)
: KoPathShapePrivate(rhs, q)
KoParameterShape::Private::Private(const Private &rhs)
: QSharedData()
, parametric(rhs.parametric)
, handles(rhs.handles)
{
}
KoParameterShape::KoParameterShape()
: KoPathShape(new KoParameterShapePrivate(this))
: KoPathShape()
, d(new Private)
{
}
KoParameterShape::KoParameterShape(KoParameterShapePrivate *dd)
: KoPathShape(dd)
KoParameterShape::KoParameterShape(const KoParameterShape &rhs)
: KoPathShape(rhs)
, d(rhs.d)
{
}
......@@ -55,7 +57,7 @@ KoParameterShape::~KoParameterShape()
void KoParameterShape::moveHandle(int handleId, const QPointF & point, Qt::KeyboardModifiers modifiers)
{
Q_D(KoParameterShape);
if (handleId >= d->handles.size()) {
warnFlake << "handleId out of bounds";
return;
......@@ -72,7 +74,7 @@ void KoParameterShape::moveHandle(int handleId, const QPointF & point, Qt::Keybo
int KoParameterShape::handleIdAt(const QRectF & rect) const
{
Q_D(const KoParameterShape);
int handle = -1;
for (int i = 0; i < d->handles.size(); ++i) {
......@@ -86,13 +88,13 @@ int KoParameterShape::handleIdAt(const QRectF & rect) const
QPointF KoParameterShape::handlePosition(int handleId) const
{
Q_D(const KoParameterShape);
return d->handles.value(handleId);
}
void KoParameterShape::paintHandles(KisHandlePainterHelper &handlesHelper)
{
Q_D(KoParameterShape);
QList<QPointF>::const_iterator it(d->handles.constBegin());
for (; it != d->handles.constEnd(); ++it) {
......@@ -102,13 +104,13 @@ void KoParameterShape::paintHandles(KisHandlePainterHelper &handlesHelper)
void KoParameterShape::paintHandle(KisHandlePainterHelper &handlesHelper, int handleId)
{
Q_D(KoParameterShape);
handlesHelper.drawGradientHandle(d->handles[handleId]);
}
void KoParameterShape::setSize(const QSizeF &newSize)
{
Q_D(KoParameterShape);
QTransform matrix(resizeMatrix(newSize));
for (int i = 0; i < d->handles.size(); ++i) {
......@@ -120,7 +122,7 @@ void KoParameterShape::setSize(const QSizeF &newSize)
QPointF KoParameterShape::normalize()
{
Q_D(KoParameterShape);
QPointF offset(KoPathShape::normalize());
QTransform matrix;
matrix.translate(-offset.x(), -offset.y());
......@@ -134,33 +136,33 @@ QPointF KoParameterShape::normalize()
bool KoParameterShape::isParametricShape() const
{
Q_D(const KoParameterShape);
return d->parametric;
}
void KoParameterShape::setParametricShape(bool parametric)
{
Q_D(KoParameterShape);
d->parametric = parametric;
update();
}
QList<QPointF> KoParameterShape::handles() const
{
Q_D(const KoParameterShape);
return d->handles;
}
void KoParameterShape::setHandles(const QList<QPointF> &handles)
{
Q_D(KoParameterShape);
d->handles = handles;
d->shapeChanged(ParameterChanged);
shapeChangedPriv(ParameterChanged);
}
int KoParameterShape::handleCount() const
{
Q_D(const KoParameterShape);
return d->handles.count();
}
......@@ -135,7 +135,7 @@ protected:
void setHandles(const QList<QPointF> &handles);
/// constructor
KoParameterShape(KoParameterShapePrivate *);
KoParameterShape(const KoParameterShape &rhs);
/**
* @brief Updates the internal state of a KoParameterShape.
......@@ -155,8 +155,9 @@ protected:
*/
virtual void updatePath(const QSizeF &size) = 0;
protected:
Q_DECLARE_PRIVATE(KoParameterShape)
private:
class Private;
QSharedDataPointer<Private> d;
};
#endif /* KOPARAMETERSHAPE_H */
......@@ -23,18 +23,19 @@
#include "kritaflake_export.h"
#include <KoParameterShape.h>
#include "KoPathShape_p.h"
#include <QList>
#include <QPointF>
#include <QSharedData>
class KoParameterShape;
class KRITAFLAKE_EXPORT KoParameterShapePrivate : public KoPathShapePrivate
class KRITAFLAKE_EXPORT KoParameterShape::Private : public QSharedData
{
public:
explicit KoParameterShapePrivate(KoParameterShape *shape);
explicit KoParameterShapePrivate(const KoParameterShapePrivate &rhs, KoParameterShape *q);
explicit Private();
explicit Private(const KoParameterShape::Private &rhs);
virtual ~Private() = default;
bool parametric;
......
This diff is collapsed.
......@@ -475,16 +475,13 @@ public:
protected:
void notifyPointsChanged();
private:
protected:
/// constructor: to be used in cloneShape(), not in descendants!
/// \internal
/// XXX private?
KoPathShape(const KoPathShape &rhs);
protected:
/// constructor:to be used in descendant shapes
/// \internal
KoPathShape(KoPathShapePrivate *);
/// reimplemented
QString saveStyle(KoGenStyle &style, KoShapeSavingContext &context) const override;
/// reimplemented
......@@ -515,7 +512,21 @@ protected:
QTransform resizeMatrix( const QSizeF &newSize ) const;
private:
Q_DECLARE_PRIVATE(KoPathShape)
/// close-merges specified subpath
void closeMergeSubpathPriv(KoSubpath *subpath);
/// closes specified subpath
void closeSubpathPriv(KoSubpath *subpath);
void updateLastPriv(KoPathPoint **lastPoint);
protected:
const KoSubpathList &subpaths() const;
/// XXX: refactor this using setter?
KoSubpathList &subpaths();
void map(const QTransform &matrix);
private:
class Private;
QSharedDataPointer<Private> d;
};
Q_DECLARE_METATYPE(KoPathShape*)
......
......@@ -20,14 +20,15 @@
#define KOPATHSHAPEPRIVATE_H
#include "KoPathShape.h"
#include "KoTosContainer_p.h"
#include "KoMarker.h"
class KoPathShapePrivate : public KoTosContainerPrivate
#include <QSharedData>
class KoPathShape::Private : public QSharedData
{
public:
explicit KoPathShapePrivate(KoPathShape *q);
explicit KoPathShapePrivate(const KoPathShapePrivate &rhs, KoPathShape *q);
explicit Private();
explicit Private(const Private &rhs);
QRectF handleRect(const QPointF &p, qreal radius) const;
/// Applies the viewbox transformation defined in the given element
......@@ -35,13 +36,6 @@ public:
void map(const QTransform &matrix);
void updateLast(KoPathPoint **lastPoint);
/// closes specified subpath
void closeSubpath(KoSubpath *subpath);
/// close-merges specified subpath
void closeMergeSubpath(KoSubpath *subpath);
/**
* @brief Saves the node types
*
......@@ -89,8 +83,6 @@ public:
Qt::FillRule fillRule;
Q_DECLARE_PUBLIC(KoPathShape)
KoSubpathList subpaths;
QMap<KoFlake::MarkerPosition, QExplicitlySharedDataPointer<KoMarker>> markersNew;
......
......@@ -133,9 +133,9 @@ public:
KoPatternBackground::KoPatternBackground(KoImageCollection *imageCollection)
: KoShapeBackground(*(new KoPatternBackgroundPrivate()))
: KoShapeBackground(KisSharedDescendent<KoShapeBackgroundPrivate>::of(KoPatternBackgroundPrivate()))
{
Q_D(KoPatternBackground);
SHARED_D(KoPatternBackground);
d->imageCollection = imageCollection;
Q_ASSERT(d->imageCollection);
}
......@@ -152,19 +152,19 @@ bool KoPatternBackground::compareTo(const KoShapeBackground *other) const
void KoPatternBackground::setTransform(const QTransform &matrix)
{
Q_D(KoPatternBackground);
SHARED_D(KoPatternBackground);
d->matrix = matrix;
}
QTransform KoPatternBackground::transform() const
{
Q_D(const KoPatternBackground);
CONST_SHARED_D(KoPatternBackground);
return d->matrix;
}
void KoPatternBackground::setPattern(const QImage &pattern)
{
Q_D(KoPatternBackground);
SHARED_D(KoPatternBackground);
delete d->imageData;
if (d->imageCollection) {
d->imageData = d->imageCollection->createImageData(pattern);
......@@ -173,7 +173,7 @@ void KoPatternBackground::setPattern(const QImage &pattern)
void KoPatternBackground::setPattern(KoImageData *imageData)
{
Q_D(KoPatternBackground);
SHARED_D(KoPatternBackground);
delete d->imageData;
d->imageData = imageData;
......@@ -181,7 +181,7 @@ void KoPatternBackground::setPattern(KoImageData *imageData)
QImage KoPatternBackground::pattern() const
{
Q_D(const KoPatternBackground);
CONST_SHARED_D(KoPatternBackground);
if (d->imageData)
return d->imageData->image();
return QImage();
......@@ -189,37 +189,37 @@ QImage KoPatternBackground::pattern() const
void KoPatternBackground::setRepeat(PatternRepeat repeat)
{
Q_D(KoPatternBackground);
SHARED_D(KoPatternBackground);
d->repeat = repeat;
}
KoPatternBackground::PatternRepeat KoPatternBackground::repeat() const
{
Q_D(const KoPatternBackground);
CONST_SHARED_D(KoPatternBackground);
return d->repeat;
}
KoPatternBackground::ReferencePoint KoPatternBackground::referencePoint() const
{
Q_D(const KoPatternBackground);
CONST_SHARED_D(KoPatternBackground);
return d->refPoint;
}
void KoPatternBackground::setReferencePoint(ReferencePoint referencePoint)
{
Q_D(KoPatternBackground);
SHARED_D(KoPatternBackground);
d->refPoint = referencePoint;
}
QPointF KoPatternBackground::referencePointOffset() const
{
Q_D(const KoPatternBackground);
CONST_SHARED_D(KoPatternBackground);
return d->refPointOffsetPercent;
}
void KoPatternBackground::setReferencePointOffset(const QPointF &offset)
{
Q_D(KoPatternBackground);
SHARED_D(KoPatternBackground);
qreal ox = qMax(qreal(0.0), qMin(qreal(100.0), offset.x()));
qreal oy = qMax(qreal(0.0), qMin(qreal(100.0), offset.y()));
......@@ -228,38 +228,38 @@ void KoPatternBackground::setReferencePointOffset(const QPointF &offset)
QPointF KoPatternBackground::tileRepeatOffset() const
{
Q_D(const KoPatternBackground);
CONST_SHARED_D(KoPatternBackground);
return d->tileRepeatOffsetPercent;
}
void KoPatternBackground::setTileRepeatOffset(const QPointF &offset)
{
Q_D(KoPatternBackground);
SHARED_D(KoPatternBackground);
d->tileRepeatOffsetPercent = offset;
}
QSizeF KoPatternBackground::patternDisplaySize() const
{
Q_D(const KoPatternBackground);
CONST_SHARED_D(KoPatternBackground);
return d->targetSize();
}
void KoPatternBackground::setPatternDisplaySize(const QSizeF &size)
{
Q_D(KoPatternBackground);
SHARED_D(KoPatternBackground);
d->targetImageSizePercent = QSizeF();
d->targetImageSize = size;
}
QSizeF KoPatternBackground::patternOriginalSize() const
{
Q_D(const KoPatternBackground);
CONST_SHARED_D(KoPatternBackground);
return d->imageData->imageSize();
}
void KoPatternBackground::paint(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &/*context*/, const QPainterPath &fillPath) const
{
Q_D(const KoPatternBackground);
CONST_SHARED_D(KoPatternBackground);
if (! d->imageData)
return;
......@@ -311,7 +311,7 @@ void KoPatternBackground::paint(QPainter &painter, const KoViewConverter &conver
void KoPatternBackground::fillStyle(KoGenStyle &style, KoShapeSavingContext &context)
{
Q_D(KoPatternBackground);
SHARED_D(KoPatternBackground);
if (! d->imageData)
return;
......@@ -373,7 +373,7 @@ void KoPatternBackground::fillStyle(KoGenStyle &style, KoShapeSavingContext &con
bool KoPatternBackground::loadStyle(KoOdfLoadingContext &context, const QSizeF &)
{
Q_D(KoPatternBackground);
SHARED_D(KoPatternBackground);
KoStyleStack &styleStack = context.styleStack();
if (! styleStack.hasProperty(KoXmlNS::draw, "fill"))
return false;
......@@ -477,7 +477,7 @@ bool KoPatternBackground::loadStyle(KoOdfLoadingContext &context, const QSizeF &
QRectF KoPatternBackground::patternRectFromFillSize(const QSizeF &size)
{
Q_D(KoPatternBackground);
SHARED_D(KoPatternBackground);
QRectF rect;
switch (d->repeat) {
......
......@@ -121,8 +121,7 @@ public:
/// Returns the bounding rect of the pattern image based on the given fill size
QRectF patternRectFromFillSize(const QSizeF &size);
private:
Q_DECLARE_PRIVATE(KoPatternBackground)
Q_DISABLE_COPY(KoPatternBackground)
SHARED_DECLARE_PRIVATE(KoPatternBackground)
};
#endif // KOPATTERNBACKGROUND_H
......@@ -34,13 +34,20 @@
#include "kis_debug.h"
KoSelection::KoSelection(QObject *parent)
: QObject(parent),
KoShape(new KoSelectionPrivate(this))
: QObject(parent)
, KoShape()
, d(new Private)
{
Q_D(KoSelection);
connect(&d->selectionChangedCompressor, SIGNAL(timeout()), SIGNAL(selectionChanged()));
}
KoSelection::KoSelection(const KoSelection &rhs)
: QObject()
, KoShape(rhs)
, d(rhs.d)
{
}
KoSelection::~KoSelection()
{
}
......@@ -82,7 +89,6 @@ QRectF KoSelection::boundingRect() const
void KoSelection::select(KoShape *shape)
{
Q_D(KoSelection);
KIS_SAFE_ASSERT_RECOVER_RETURN(shape != this);
KIS_SAFE_ASSERT_RECOVER_RETURN(shape);
......@@ -114,7 +120,6 @@ void KoSelection::select(KoShape *shape)
void KoSelection::deselect(KoShape *shape)
{
Q_D(KoSelection);
if (!d->selectedShapes.contains(shape))
return;
......@@ -130,7 +135,6 @@ void KoSelection::deselect(KoShape *shape)
void KoSelection::deselectAll()
{
Q_D(KoSelection);
if (d->selectedShapes.isEmpty())
return;
......@@ -148,13 +152,11 @@ void KoSelection::deselectAll()
int KoSelection::count() const
{
Q_D(const KoSelection);
return d->selectedShapes.size();
}
bool KoSelection::hitTest(const QPointF &position) const
{
Q_D(const KoSelection);
Q_FOREACH (KoShape *shape, d->selectedShapes) {
if (shape->isVisible()) continue;
......@@ -166,7 +168,6 @@ bool KoSelection::hitTest(const QPointF &position) const
const QList<KoShape*> KoSelection::selectedShapes() const
{
Q_D(const KoSelection);
return d->selectedShapes;
}
......@@ -210,7 +211,6 @@ const QList<KoShape *> KoSelection::selectedEditableShapesAndDelegates() const
bool KoSelection::isSelected(const KoShape *shape) const
{
Q_D(const KoSelection);
if (shape == this)
return true;
......@@ -224,20 +224,17 @@ bool KoSelection::isSelected(const KoShape *shape) const
KoShape *KoSelection::firstSelectedShape() const
{
Q_D(const KoSelection);
return !d->selectedShapes.isEmpty() ? d->selectedShapes.first() : 0;
}
void KoSelection::setActiveLayer(KoShapeLayer *layer)
{
Q_D(KoSelection);
d->activeLayer = layer;
emit currentLayerChanged(layer);
}
KoShapeLayer* KoSelection::activeLayer() const
{
Q_D(const KoSelection);
return d->activeLayer;
}
......
......@@ -159,7 +159,12 @@ private:
void saveOdf(KoShapeSavingContext &) const override;
bool loadOdf(const KoXmlElement &, KoShapeLoadingContext &) override;
Q_DECLARE_PRIVATE_D(KoShape::d_ptr, KoSelection)
protected:
KoSelection(const KoSelection &rhs);
private:
class Private;
QSharedDataPointer<Private> d;
};
#endif
......@@ -19,26 +19,28 @@
#ifndef KOSELECTIONPRIVATE_H
#define KOSELECTIONPRIVATE_H
#include "KoShape_p.h"
#include <QSharedData>
#include "kis_thread_safe_signal_compressor.h"
class KoShapeGroup;
class KoSelectionPrivate : public KoShapePrivate
class KoSelection::Private : public QSharedData
{
public:
explicit KoSelectionPrivate(KoSelection *parent)
: KoShapePrivate(parent),
activeLayer(0),
selectionChangedCompressor(1, KisSignalCompressor::FIRST_INACTIVE)
explicit Private()
: activeLayer(0)
, selectionChangedCompressor(1, KisSignalCompressor::FIRST_INACTIVE)
{}
explicit Private(const Private &rhs)
: activeLayer(0)
, selectionChangedCompressor(1, KisSignalCompressor::FIRST_INACTIVE)
{
}
QList<KoShape*> selectedShapes;
KoShapeLayer *activeLayer;
KisThreadSafeSignalCompressor selectionChangedCompressor;
Q_DECLARE_PUBLIC(KoSelection)
};
#endif
This diff is collapsed.
......@@ -30,6 +30,7 @@
#include <QSharedPointer>
#include <QSet>
#include <QMetaType>
#include <QSharedDataPointer>
#include <KoXmlReaderForward.h>
......@@ -49,7 +50,6 @@ class KoShapeSavingContext;
class KoShapeLoadingContext;
class KoGenStyle;
class KoShapeShadow;
class KoShapePrivate;
class KoFilterEffectStack;
class KoSnapData;
class KoClipPath;
......@@ -60,6 +60,7 @@ class KoBorder;
struct KoInsets;
class KoShapeBackground;
class KisHandlePainterHelper;
class KoShapeManager;
/**
* Base class for all flake shapes. Shapes extend this class
......@@ -1177,12 +1178,6 @@ public:
*/
void setHyperLink(const QString &hyperLink);
/**
* \internal
* Returns the private object for use within the flake lib
*/
KoShapePrivate *priv();
public:
struct KRITAFLAKE_EXPORT ShapeChangeListener {
......@@ -1191,7 +1186,6 @@ public:
private:
friend class KoShape;
friend class KoShapePrivate;
void registerShape(KoShape *shape);
void unregisterShape(KoShape *shape);
void notifyShapeChangedImpl(ChangeType type, KoShape *shape);
......@@ -1202,12 +1196,15 @@ public:
void addShapeChangeListener(ShapeChangeListener *listener);
void removeShapeChangeListener(ShapeChangeListener *listener);
protected:
QList<ShapeChangeListener *> listeners() const;
void setSizeImpl(const QSizeF &size) const;
public:
static QList<KoShape*> linearizeSubtree(const QList<KoShape*> &shapes);
protected:
/// constructor
KoShape(KoShapePrivate *);
KoShape(const KoShape &rhs);
/* ** loading saving helper methods */
/// attributes from ODF 1.1 chapter 9.2.15 Common Drawing Shape Attributes
......@@ -1294,10 +1291,21 @@ protected:
/// return the current matrix that contains the rotation/scale/position of this shape
QTransform transform() const;
KoShapePrivate *d_ptr;
private:
class Private;
QSharedDataPointer<Private> d;
protected:
/**
* Notify the shape that a change was done. To be used by inheriting shapes.
* @param type the change type
*/
void shapeChangedPriv(KoShape::ChangeType type);
private:
Q_DECLARE_PRIVATE(KoShape)
void addShapeManager(KoShapeManager *manager);
void removeShapeManager(KoShapeManager *manager);
friend class KoShapeManager;
};
Q_DECLARE_METATYPE(KoShape*)
......
......@@ -29,21 +29,20 @@ KoShapeBackgroundPrivate::~KoShapeBackgroundPrivate()
{
}
KoShapeBackground::KoShapeBackground(KoShapeBackgroundPrivate &dd)
:d_ptr(&dd)
KoShapeBackground::KoShapeBackground(KisSharedDescendent<KoShapeBackgroundPrivate> &dd)
: d_ptr(&dd)
{
}
KoShapeBackground::KoShapeBackground()
: d_ptr(new KoShapeBackgroundPrivate())
: d_ptr(KisSharedDescendent<KoShapeBackgroundPrivate>::pointerOf(KoShapeBackgroundPrivate()))
{
}
KoShapeBackground::~KoShapeBackground()
{
delete d_ptr;
}
bool KoShapeBackground::hasTransparency() const
......
......@@ -23,6 +23,9 @@
#include "kritaflake_export.h"
#include <QtGlobal>
#include <QSharedDataPointer>
#include <KisSharedDescendent.h>
class QSizeF;
class QPainter;
......@@ -63,13 +66,13 @@ public:
/// load background from odf styles
virtual bool loadStyle(KoOdfLoadingContext &context, const QSizeF &shapeSize) = 0;
virtual explicit operator bool() const { return true; }
protected:
KoShapeBackground(KoShapeBackgroundPrivate &);
KoShapeBackgroundPrivate *d_ptr;
KoShapeBackground(KisSharedDescendent<KoShapeBackgroundPrivate> &);
QSharedDataPointer<KisSharedDescendent<KoShapeBackgroundPrivate> > d_ptr;
private:
Q_DECLARE_PRIVATE(KoShapeBackground)
SHARED_DECLARE_PRIVATE(KoShapeBackground)
};
#endif // KOSHAPEBACKGROUND_H
......@@ -32,53 +32,39 @@
#include "kis_painting_tweaks.h"
#include "kis_assert.h"
KoShapeContainerPrivate::KoShapeContainerPrivate(KoShapeContainer *q)
: KoShapePrivate(q),
shapeInterface(q),
KoShapeContainer::Private::Private(KoShapeContainer *q)
: shapeInterface(q),
model(0)
{
}
KoShapeContainerPrivate::~KoShapeContainerPrivate()
KoShapeContainer::Private::~Private()
{
delete model;
}
KoShapeContainerPrivate::KoShapeContainerPrivate(const KoShapeContainerPrivate &rhs, KoShapeContainer *q)
: KoShapePrivate(rhs, q),
shapeInterface(q),
model(0)
KoShapeContainer::Private::Private(const KoShapeContainer::Private &rhs, KoShapeContainer *q)
: shapeInterface(q)
, model(0)
{
Q_UNUSED(rhs);
}
KoShapeContainer::KoShapeContainer(KoShapeContainerModel *model)
: KoShape(new KoShapeContainerPrivate(this))
: KoShape()
, d(new Private(this))
{
Q_D(KoShapeContainer);
d->model = model;
}
KoShapeContainer::KoShapeContainer(KoShapeContainerPrivate *dd)
: KoShape(dd)
KoShapeContainer::KoShapeContainer(const KoShapeContainer &rhs)
: KoShape(rhs)
, d(new Private(*(rhs.d.data()), this))
{
Q_D(KoShapeContainer);
// HACK ALERT: the shapes are copied inside the model,
// but we still need to connect the to the
// hierarchy here!
if (d->model) {
Q_FOREACH (KoShape *shape, d->model->shapes()) {
if (shape) { // Note: shape can be 0 because not all shapes
// implement cloneShape, e.g. the text shape.
shape->setParent(this);
}
}
}
}
KoShapeContainer::~KoShapeContainer()
{
Q_D(KoShapeContainer);
if (d->model) {
d->model->deleteOwnedShapes();
}
......@@ -94,9 +80,8 @@ void KoShapeContainer::removeShape(KoShape *shape)
shape->setParent(0);
}
int KoShapeContainer::shapeCount() const
int KoShapeContainer::shapeCount() const
{
Q_D(const KoShapeContainer);
if (d->model == 0)
return 0;
return d->model->count();
......@@ -104,7 +89,6 @@ int KoShapeContainer::shapeCount() const
void KoShapeContainer::setClipped(const KoShape *child, bool clipping)
{
Q_D(KoShapeContainer);
if (d->model == 0)
return;
d->model->setClipped(child, clipping);
......@@ -112,7 +96,6 @@ void KoShapeContainer::setClipped(const KoShape *child, bool clipping)
void KoShapeContainer::setInheritsTransform(const KoShape *shape, bool inherit)
{
Q_D(KoShapeContainer);
if (d->model == 0)
return;
d->model->setInheritsTransform(shape, inherit);
......@@ -120,7 +103,6 @@ void KoShapeContainer::setInheritsTransform(const KoShape *shape, bool inherit)
bool KoShapeContainer::inheritsTransform(const KoShape *shape) const
{
Q_D(const KoShapeContainer);
if (d->model == 0)
return false;
return d->model->inheritsTransform(shape);
......@@ -139,7 +121,6 @@ void KoShapeContainer::paint(QPainter &painter, const KoViewConverter &converter
void KoShapeContainer::shapeChanged(ChangeType type, KoShape* shape)
{
Q_UNUSED(shape);
Q_D(KoShapeContainer);
if (d->model == 0)
return;
if (!(type == RotationChanged || type == ScaleChanged || type == ShearChanged
......@@ -152,7 +133,6 @@ void KoShapeContainer::shapeChanged(ChangeType type, KoShape* shape)
bool KoShapeContainer::isClipped(const KoShape *child) const
{
Q_D(const KoShapeContainer);
if (d->model == 0) // throw exception??
return false;
return d->model->isClipped(child);
......@@ -160,7 +140,6 @@ bool KoShapeContainer::isClipped(const KoShape *child) const
void KoShapeContainer::update() const
{
Q_D(const KoShapeContainer);
KoShape::update();
if (d->model)
Q_FOREACH (KoShape *shape, d->model->shapes())
......@@ -169,7 +148,6 @@ void KoShapeContainer::update() const
QList<KoShape*> KoShapeContainer::shapes() const
{
Q_D(const KoShapeContainer);
if (d->model == 0)
return QList<KoShape*>();
......@@ -178,13 +156,32 @@ QList<KoShape*> KoShapeContainer::shapes() const
KoShapeContainerModel *KoShapeContainer::model() const
{
Q_D(const KoShapeContainer);
return d->model;
}
void KoShapeContainer::setModel(KoShapeContainerModel *model)
{
d->model = model;
}
void KoShapeContainer::setModelInit(KoShapeContainerModel *model)
{
setModel(model);
// HACK ALERT: the shapes are copied inside the model,
// but we still need to connect the to the
// hierarchy here!
if (d->model) {
Q_FOREACH (KoShape *shape, d->model->shapes()) {
if (shape) { // Note: shape can be 0 because not all shapes
// implement cloneShape, e.g. the text shape.
shape->setParent(this);
}
}
}
}
KoShapeContainer::ShapeInterface *KoShapeContainer::shapeInterface()
{
Q_D(KoShapeContainer);
return &d->shapeInterface;
}
......@@ -195,7 +192,7 @@ KoShapeContainer::ShapeInterface::ShapeInterface(KoShapeContainer *_q)
void KoShapeContainer::ShapeInterface::addShape(KoShape *shape)
{
KoShapeContainerPrivate * const d = q->d_func();
KoShapeContainer::Private * const d = q->d.data();
KIS_SAFE_ASSERT_RECOVER_RETURN(shape);
......@@ -218,7 +215,7 @@ void KoShapeContainer::ShapeInterface::addShape(KoShape *shape)
void KoShapeContainer::ShapeInterface::removeShape(KoShape *shape)
{
KoShapeContainerPrivate * const d = q->d_func();
KoShapeContainer::Private * const d = q->d.data();
KIS_SAFE_ASSERT_RECOVER_RETURN(shape);
KIS_SAFE_ASSERT_RECOVER_RETURN(d->model);
......
......@@ -197,6 +197,18 @@ public:
*/
KoShapeContainerModel *model() const;
protected:
/**
* set the model for this container
*/
void setModel(KoShapeContainerModel *model);
/**
* set the model, and take control of all its children
*/
void setModelInit(KoShapeContainerModel *model);
public:
/**
* A special interface for KoShape to use during setParent call. Don't use
......@@ -232,6 +244,8 @@ public:
ShapeInterface* shapeInterface();
protected:
KoShapeContainer(const KoShapeContainer &rhs);
/**
* This hook is for inheriting classes that need to do something on adding/removing
* of children.
......@@ -242,11 +256,9 @@ protected:
void shapeChanged(ChangeType type, KoShape *shape = 0) override;
/// constructor
KoShapeContainer(KoShapeContainerPrivate *);
private:
Q_DECLARE_PRIVATE(KoShapeContainer)
class Private;
QScopedPointer<Private> d;
};
#endif
......@@ -19,22 +19,23 @@
#ifndef KOSHAPECONTAINERPRIVATE_H
#define KOSHAPECONTAINERPRIVATE_H
#include "KoShape_p.h"
#include "KoShapeContainer.h"
#include "kritaflake_export.h"
#include <QSharedData>
class KoShapeContainerModel;
/**
* \internal used private d-pointer class for the \a KoShapeContainer class.
*/
class KRITAFLAKE_EXPORT KoShapeContainerPrivate : public KoShapePrivate
class KRITAFLAKE_EXPORT KoShapeContainer::Private : public QSharedData
{
public:
explicit KoShapeContainerPrivate(KoShapeContainer *q);
~KoShapeContainerPrivate() override;
explicit Private(KoShapeContainer *q);
virtual ~Private