Krita Source Code Documentation
Loading...
Searching...
No Matches
KoSnapData Class Reference

#include <KoSnapData.h>

Public Member Functions

 KoSnapData ()
 
void setSnapPoints (const QList< QPointF > &snapPoints)
 Sets list of points to snap to.
 
void setSnapSegments (const QList< KoPathSegment > &snapSegments)
 Sets list of segments to snap to.
 
QList< QPointF > snapPoints () const
 Returns list of points to snap to.
 
QList< KoPathSegmentsnapSegments () const
 Returns list of segments to snap to.
 
 ~KoSnapData ()
 

Private Attributes

QList< QPointF > m_points
 
QList< KoPathSegmentm_segments
 

Detailed Description

This class is used to provide additional data to the snap guide.

Some shapes might have internal data it wants snapping support for, i.e. the axis of a chart shape, the row of a table shape, etc. As the data is internal and special to that shape, the snap guide does not know about it and can therefore not provide any snapping to it. So the shape can put that data in form of points or segments into that class which the snap guide can retrieve and use accordingly.

Definition at line 25 of file KoSnapData.h.

Constructor & Destructor Documentation

◆ KoSnapData()

KoSnapData::KoSnapData ( )

Definition at line 11 of file KoSnapData.cpp.

12{
13}

◆ ~KoSnapData()

KoSnapData::~KoSnapData ( )

Definition at line 15 of file KoSnapData.cpp.

16{
17}

Member Function Documentation

◆ setSnapPoints()

void KoSnapData::setSnapPoints ( const QList< QPointF > & snapPoints)

Sets list of points to snap to.

Definition at line 24 of file KoSnapData.cpp.

25{
27}
QList< QPointF > m_points
Definition KoSnapData.h:44
QList< QPointF > snapPoints() const
Returns list of points to snap to.

References m_points, and snapPoints().

◆ setSnapSegments()

void KoSnapData::setSnapSegments ( const QList< KoPathSegment > & snapSegments)

Sets list of segments to snap to.

Definition at line 34 of file KoSnapData.cpp.

35{
37}
QList< KoPathSegment > snapSegments() const
Returns list of segments to snap to.
QList< KoPathSegment > m_segments
Definition KoSnapData.h:45

References m_segments, and snapSegments().

◆ snapPoints()

QList< QPointF > KoSnapData::snapPoints ( ) const

Returns list of points to snap to.

Definition at line 19 of file KoSnapData.cpp.

20{
21 return m_points;
22}

References m_points.

◆ snapSegments()

QList< KoPathSegment > KoSnapData::snapSegments ( ) const

Returns list of segments to snap to.

Definition at line 29 of file KoSnapData.cpp.

30{
31 return m_segments;
32}

References m_segments.

Member Data Documentation

◆ m_points

QList<QPointF> KoSnapData::m_points
private

Definition at line 44 of file KoSnapData.h.

◆ m_segments

QList<KoPathSegment> KoSnapData::m_segments
private

Definition at line 45 of file KoSnapData.h.


The documentation for this class was generated from the following files: