Krita Source Code Documentation
Loading...
Searching...
No Matches
CheckShapeMarkerPolicy Struct Reference

Public Types

typedef KoMarkerPointerType
 

Public Member Functions

 CheckShapeMarkerPolicy (KoFlake::MarkerPosition position)
 
bool compareTo (PointerType p1, PointerType p2) const
 
PointerType getProperty (KoShape *shape) const
 

Public Attributes

KoFlake::MarkerPosition m_position
 

Detailed Description

Definition at line 631 of file KoStrokeConfigWidget.cpp.

Member Typedef Documentation

◆ PointerType

Constructor & Destructor Documentation

◆ CheckShapeMarkerPolicy()

CheckShapeMarkerPolicy::CheckShapeMarkerPolicy ( KoFlake::MarkerPosition position)
inline

Definition at line 633 of file KoStrokeConfigWidget.cpp.

634 : m_position(position)
635 {
636 }
KoFlake::MarkerPosition m_position

Member Function Documentation

◆ compareTo()

bool CheckShapeMarkerPolicy::compareTo ( PointerType p1,
PointerType p2 ) const
inline

Definition at line 643 of file KoStrokeConfigWidget.cpp.

643 {
644 if ((!p1 || !p2) && p1 != p2) return false;
645 if (!p1 && p1 == p2) return true;
646
647 return p1 == p2 || *p1 == *p2;
648 }
QPointF p2
QPointF p1

References p1, and p2.

◆ getProperty()

PointerType CheckShapeMarkerPolicy::getProperty ( KoShape * shape) const
inline

Definition at line 639 of file KoStrokeConfigWidget.cpp.

639 {
640 KoPathShape *pathShape = dynamic_cast<KoPathShape*>(shape);
641 return pathShape ? pathShape->marker(m_position) : 0;
642 }
The position of a path point within a path shape.
Definition KoPathShape.h:63
KoMarker * marker(KoFlake::MarkerPosition pos) const

References m_position, and KoPathShape::marker().

Member Data Documentation

◆ m_position

KoFlake::MarkerPosition CheckShapeMarkerPolicy::m_position

Definition at line 650 of file KoStrokeConfigWidget.cpp.


The documentation for this struct was generated from the following file: