Warning, file /office/calligra/libs/textlayout/KoTextShapeContainerModel.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) 2007 Thomas Zander <zander@kde.org> 0003 * 0004 * This library is free software; you can redistribute it and/or 0005 * modify it under the terms of the GNU Library General Public 0006 * License as published by the Free Software Foundation; either 0007 * version 2 of the License, or (at your option) any later version. 0008 * 0009 * This library is distributed in the hope that it will be useful, 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 * Library General Public License for more details. 0013 * 0014 * You should have received a copy of the GNU Library General Public License 0015 * along with this library; see the file COPYING.LIB. If not, write to 0016 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 * Boston, MA 02110-1301, USA. 0018 */ 0019 #ifndef KOTEXTSHAPECONTAINERMODEL_H 0020 #define KOTEXTSHAPECONTAINERMODEL_H 0021 0022 #include <KoShapeContainerModel.h> 0023 0024 #include "kotextlayout_export.h" 0025 0026 class KoShapeAnchor; 0027 class KoShapeContainer; 0028 0029 /** 0030 * A model to position children of the text shape. 0031 * All anchored frames are children of the text shape, and they get positioned 0032 * by the text layouter. 0033 */ 0034 class KOTEXTLAYOUT_EXPORT KoTextShapeContainerModel : public KoShapeContainerModel 0035 { 0036 public: 0037 /// constructor 0038 KoTextShapeContainerModel(); 0039 ~KoTextShapeContainerModel() override; 0040 0041 /// reimplemented from KoShapeContainerModel 0042 void add(KoShape *child) override; 0043 /// reimplemented from KoShapeContainerModel 0044 void remove(KoShape *child) override; 0045 /// reimplemented from KoShapeContainerModel 0046 void setClipped(const KoShape *child, bool clipping) override; 0047 /// reimplemented from KoShapeContainerModel 0048 bool isClipped(const KoShape *child) const override; 0049 /// reimplemented from KoShapeContainerModel 0050 int count() const override; 0051 /// reimplemented from KoShapeContainerModel 0052 QList<KoShape*> shapes() const override; 0053 /// reimplemented from KoShapeContainerModel 0054 void containerChanged(KoShapeContainer *container, KoShape::ChangeType type) override; 0055 /// reimplemented from KoShapeContainerModel 0056 void proposeMove(KoShape *child, QPointF &move) override; 0057 /// reimplemented from KoShapeContainerModel 0058 void childChanged(KoShape *child, KoShape::ChangeType type) override; 0059 /// reimplemented from KoShapeContainerModel 0060 bool isChildLocked(const KoShape *child) const override; 0061 /// reimplemented from KoShapeContainerModel 0062 void setInheritsTransform(const KoShape *shape, bool inherit) override; 0063 /// reimplemented from KoShapeContainerModel 0064 bool inheritsTransform(const KoShape *shape) const override; 0065 0066 /// each child that is added due to being anchored in the text has an anchor; register it for rules based placement. 0067 void addAnchor(KoShapeAnchor *anchor); 0068 /// When a shape is removed or stops being anchored, remove it. 0069 void removeAnchor(KoShapeAnchor *anchor); 0070 0071 private: 0072 // reset child position and relayout shape to which this shape is linked 0073 void relayoutInlineObject(KoShape *child); 0074 0075 class Private; 0076 Private * const d; 0077 }; 0078 0079 #endif