libs/flake
KoSnapStrategy Class Reference
#include <KoSnapStrategy.h>

Public Types | |
| enum | SnapType { Orthogonal = 1, Node = 2, Extension = 4, Intersection = 8, Grid = 16, BoundingBox = 32, GuideLine = 64, Custom = 128 } |
Public Member Functions | |
| KoSnapStrategy (SnapType type) | |
| virtual | ~KoSnapStrategy () |
| virtual QPainterPath | decoration (const KoViewConverter &converter) const =0 |
| virtual bool | snap (const QPointF &mousePosition, KoSnapProxy *proxy, qreal maxSnapDistance)=0 |
| QPointF | snappedPosition () const |
| SnapType | type () const |
Static Public Member Functions | |
| static qreal | scalarProduct (const QPointF &p1, const QPointF &p2) |
| static qreal | squareDistance (const QPointF &p1, const QPointF &p2) |
Protected Member Functions | |
| void | setSnappedPosition (const QPointF &position) |
Detailed Description
Definition at line 32 of file KoSnapStrategy.h.
Member Enumeration Documentation
the different possible snap types
Definition at line 36 of file KoSnapStrategy.h.
Constructor & Destructor Documentation
| KoSnapStrategy::KoSnapStrategy | ( | KoSnapStrategy::SnapType | type | ) |
Definition at line 34 of file KoSnapStrategy.cpp.
| virtual KoSnapStrategy::~KoSnapStrategy | ( | ) | [inline, virtual] |
Definition at line 48 of file KoSnapStrategy.h.
Member Function Documentation
| virtual QPainterPath KoSnapStrategy::decoration | ( | const KoViewConverter & | converter | ) | const [pure virtual] |
returns the current snap strategy decoration
Implemented in OrthogonalSnapStrategy, NodeSnapStrategy, ExtensionSnapStrategy, IntersectionSnapStrategy, GridSnapStrategy, BoundingBoxSnapStrategy, and LineGuideSnapStrategy.
Definition at line 61 of file KoSnapStrategy.cpp.
| void KoSnapStrategy::setSnappedPosition | ( | const QPointF & | position | ) | [protected] |
sets the current snapped position
Definition at line 44 of file KoSnapStrategy.cpp.
| virtual bool KoSnapStrategy::snap | ( | const QPointF & | mousePosition, | |
| KoSnapProxy * | proxy, | |||
| qreal | maxSnapDistance | |||
| ) | [pure virtual] |
| QPointF KoSnapStrategy::snappedPosition | ( | ) | const |
returns the snapped position form the last call to snapToPoints
Definition at line 39 of file KoSnapStrategy.cpp.
Definition at line 54 of file KoSnapStrategy.cpp.
| KoSnapStrategy::SnapType KoSnapStrategy::type | ( | ) | const |
returns the strategies type
Definition at line 49 of file KoSnapStrategy.cpp.
The documentation for this class was generated from the following files:
