Warning, file /office/calligra/libs/flake/KoSnapProxy.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) 2008-2009 Jan Hambrecht <jaham@gmx.net>
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 KOSNAPPROXY_H
0020 #define KOSNAPPROXY_H
0021 
0022 
0023 class KoSnapGuide;
0024 class KoShape;
0025 class KoPathSegment;
0026 class KoCanvasBase;
0027 #include <QList>
0028 #include <QVector>
0029 #include "flake_export.h"
0030 
0031 class QPointF;
0032 class QRectF;
0033 /**
0034  * This class provides access to different shape related snap targets to snap strategies.
0035  */
0036 class FLAKE_EXPORT KoSnapProxy
0037 {
0038 public:
0039     explicit KoSnapProxy(KoSnapGuide *snapGuide);
0040 
0041     /// returns list of points in given rectangle in document coordinates
0042     QVector<QPointF> pointsInRect(const QRectF &rect) const;
0043 
0044     /// returns list of shape in given rectangle in document coordinates
0045     QList<KoShape*> shapesInRect(const QRectF &rect, bool omitEditedShape = false) const;
0046 
0047     /// returns list of points from given shape
0048     QVector<QPointF> pointsFromShape(KoShape *shape) const;
0049 
0050     /// returns list of points in given rectangle in document coordinates
0051     QList<KoPathSegment> segmentsInRect(const QRectF &rect) const;
0052 
0053     /// returns list of all shapes
0054     QList<KoShape*> shapes(bool omitEditedShape = false) const;
0055 
0056     /// returns canvas we are working on
0057     KoCanvasBase *canvas() const;
0058 
0059 private:
0060     KoSnapGuide *m_snapGuide;
0061 };
0062 
0063 #endif