Warning, file /office/calligra/libs/flake/KoSnapData.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 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 
0020 #ifndef KOSNAPDATA_H
0021 #define KOSNAPDATA_H
0022 
0023 #include <KoPathSegment.h>
0024 #include <flake_export.h>
0025 #include <QVector>
0026 
0027 /**
0028  * This class is used to provide additional data to the snap guide.
0029  *
0030  * Some shapes might have internal data it wants snapping support for,
0031  * i.e. the axis of a chart shape, the row of a table shape, etc.
0032  * As the data is internal and special to that shape, the snap guide
0033  * does not know about it and can therefore not provide any snapping
0034  * to it.
0035  * So the shape can put that data in form of points or segments into
0036  * that class which the snap guide can retrieve and use accordingly.
0037  */
0038 class FLAKE_EXPORT KoSnapData
0039 {
0040 public:
0041     KoSnapData();
0042     ~KoSnapData();
0043 
0044     /// Returns list of points to snap to
0045     QVector<QPointF> snapPoints() const;
0046 
0047     /// Sets list of points to snap to
0048     void setSnapPoints(const QVector<QPointF> &snapPoints);
0049 
0050     /// Returns list of segments to snap to
0051     QList<KoPathSegment> snapSegments() const;
0052 
0053     /// Sets list of segments to snap to
0054     void setSnapSegments(const QList<KoPathSegment> &snapSegments);
0055 
0056 private:
0057     QVector<QPointF> m_points;
0058     QList<KoPathSegment> m_segments;
0059 };
0060 
0061 #endif //KOSNAPDATA_H