Warning, file /office/calligra/libs/flake/KoShape_p.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the KDE project 0002 * Copyright (C) 2009 Thomas Zander <zander@kde.org> 0003 * Copyright (C) 2010 Boudewijn Rempt <boud@kogmbh.com> 0004 * 0005 * This library is free software; you can redistribute it and/or 0006 * modify it under the terms of the GNU Library General Public 0007 * License as published by the Free Software Foundation; either 0008 * version 2 of the License, or (at your option) any later version. 0009 * 0010 * This library is distributed in the hope that it will be useful, 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 * Library General Public License for more details. 0014 * 0015 * You should have received a copy of the GNU Library General Public License 0016 * along with this library; see the file COPYING.LIB. If not, write to 0017 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0018 * Boston, MA 02110-1301, USA. 0019 */ 0020 #ifndef KOSHAPEPRIVATE_H 0021 #define KOSHAPEPRIVATE_H 0022 0023 #include "KoShape.h" 0024 0025 #include <QPoint> 0026 #include <QPaintDevice> 0027 #include <QTransform> 0028 0029 #include <KoCanvasBase.h> 0030 0031 class KoBorder; 0032 0033 0034 class KoShapePrivate 0035 { 0036 public: 0037 explicit KoShapePrivate(KoShape *shape); 0038 virtual ~KoShapePrivate(); 0039 /** 0040 * Notify the shape that a change was done. To be used by inheriting shapes. 0041 * @param type the change type 0042 */ 0043 void shapeChanged(KoShape::ChangeType type); 0044 0045 void addShapeManager(KoShapeManager *manager); 0046 void removeShapeManager(KoShapeManager *manager); 0047 0048 /** 0049 * Fills the style stack and returns the value of the given style property (e.g fill, stroke). 0050 */ 0051 static QString getStyleProperty(const char *property, KoShapeLoadingContext &context); 0052 0053 /// Loads the shadow style 0054 KoShapeShadow *loadOdfShadow(KoShapeLoadingContext &context) const; 0055 0056 // Loads the border style. 0057 KoBorder *loadOdfBorder(KoShapeLoadingContext &context) const; 0058 0059 /// calls update on the shape where the stroke is. 0060 void updateStroke(); 0061 0062 // Members 0063 0064 KoShape *q_ptr; // Points the shape that owns this class. 0065 0066 mutable QSizeF size; // size in pt 0067 QString shapeId; 0068 QString name; ///< the shapes names 0069 0070 QTransform localMatrix; ///< the shapes local transformation matrix 0071 0072 KoConnectionPoints connectors; ///< glue point id to data mapping 0073 0074 KoShapeContainer *parent; 0075 QSet<KoShapeManager *> shapeManagers; 0076 QSet<KoShape *> toolDelegates; 0077 KoShapeUserData *userData; 0078 KoShapeApplicationData *appData; 0079 KoShapeStrokeModel *stroke; ///< points to a stroke, or 0 if there is no stroke 0080 QSharedPointer<KoShapeBackground> fill; ///< Stands for the background color / fill etc. 0081 QList<KoShape*> dependees; ///< list of shape dependent on this shape 0082 KoShapeShadow * shadow; ///< the current shape shadow 0083 KoBorder *border; ///< the current shape border 0084 KoClipPath * clipPath; ///< the current clip path 0085 QMap<QString, QString> additionalAttributes; 0086 QMap<QByteArray, QString> additionalStyleAttributes; 0087 QSet<KoEventAction *> eventActions; ///< list of event actions the shape has 0088 KoFilterEffectStack *filterEffectStack; ///< stack of filter effects applied to the shape 0089 qreal transparency; ///< the shapes transparency 0090 QString hyperLink; //hyperlink for this shape 0091 0092 static const int MaxZIndex = 32767; 0093 int zIndex : 16; // keep maxZIndex in sync! 0094 int runThrough : 16; 0095 int visible : 1; 0096 int printable : 1; 0097 int keepAspect : 1; 0098 int detectCollision : 1; 0099 0100 KoShape::TextRunAroundSide textRunAroundSide; 0101 qreal textRunAroundDistanceLeft; 0102 qreal textRunAroundDistanceTop; 0103 qreal textRunAroundDistanceRight; 0104 qreal textRunAroundDistanceBottom; 0105 qreal textRunAroundThreshold; 0106 KoShape::TextRunAroundContour textRunAroundContour; 0107 KoShapeAnchor *anchor; 0108 qreal minimumHeight; 0109 0110 /// Convert connection point position from shape coordinates, taking alignment into account 0111 void convertFromShapeCoordinates(KoConnectionPoint &point, const QSizeF &shapeSize) const; 0112 0113 /// Convert connection point position to shape coordinates, taking alignment into account 0114 void convertToShapeCoordinates(KoConnectionPoint &point, const QSizeF &shapeSize) const; 0115 0116 KoShape::AllowedInteractions allowedInteractions; 0117 0118 Q_DECLARE_PUBLIC(KoShape) 0119 }; 0120 0121 #endif