Commit 6b00258f authored by Thomas Zander's avatar Thomas Zander

Convert KoShape to use a Q_D construction, in preparation of sharing the d pointer

between it and its ascendents.

svn path=/trunk/koffice/; revision=990516
parent 280b1be3
This diff is collapsed.
......@@ -57,6 +57,7 @@ class KoShapeControllerBase;
class KoDataCenter;
class KoShapeShadow;
class KoEventAction;
class KoShapePrivate;
......@@ -793,6 +794,8 @@ public:
void removeAdditionalStyleAttribute(const char * name);
/// constructor
KoShape(KoShapePrivate &);
/* ** loading saving helper methods */
/// attributes from ODF 1.1 chapter 9.2.15 Common Drawing Shape Attributes
......@@ -902,14 +905,14 @@ protected:
void notifyChangedShape(ChangeType type);
KoShapePrivate *d_ptr;
friend class KoShapeManager;
void addShapeManager(KoShapeManager * manager);
void removeShapeManager(KoShapeManager * manager);
class Private;
friend class Private;
Private * const d;
/* This file is part of the KDE project
* Copyright (C) 2009 Thomas Zander <>
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* Library General Public License for more details.
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
#include "KoShape.h"
class KoShapePrivate
KoShapePrivate(KoShape *shape);
void shapeChanged(KoShape::ChangeType type);
QSizeF size; // size in pt
QString shapeId;
QString name; ///< the shapes names
QMatrix localMatrix; ///< the shapes local transformation matrix
QVector<QPointF> connectors; // in pt
KoShapeContainer *parent;
QSet<KoShapeManager *> shapeManagers;
KoShapeUserData *userData;
KoShapeApplicationData *appData;
KoShapeBackground * fill; ///< Stands for the background color / fill etc.
KoShapeBorderModel *border; ///< points to a border, or 0 if there is no border
KoShape *me;
QList<KoShape*> dependees; ///< list of shape dependent on this shape
KoShapeShadow * shadow; ///< the current shape shadow
QMap<QByteArray, QString> additionalAttributes;
QMap<QByteArray, QString> additionalStyleAttributes;
QList<KoEventAction *> eventActions; ///< list of event actions the shape has
int zIndex : 14; // should be enough ;)
int visible : 1;
int printable : 1;
int geometryProtected : 1;
int keepAspect : 1;
int selectable : 1;
int detectCollision : 1;
int protectContent : 1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment