Référence de la classe KoPathPoint

A KoPathPoint represents a point in a path. Plus de détails...

#include <KoPathShape.h>

Graphe de collaboration de KoPathPoint:

[légende]
Liste de tous les membres

Types publics

enum  KoPointProperty {
  Normal = 0, CanHaveControlPoint1 = 1, CanHaveControlPoint2 = 2, HasControlPoint1 = 4,
  HasControlPoint2 = 8, StartSubpath = 16, CloseSubpath = 32, IsSmooth = 64,
  IsSymmetric = 128
}
enum  KoPointType { Node, ControlPoint1, ControlPoint2 }
 the type for identifying part of a KoPathPoint Plus de détails...

Fonctions membres publiques

 KoPathPoint (KoPathShape *path, const QPointF &point, KoPointProperties properties=Normal)
 Constructor.
 KoPathPoint (const KoPathPoint &pathPoint)
 Copy Constructor.
KoPathPointoperator= (const KoPathPoint &rhs)
 Assignment operator.
 ~KoPathPoint ()
 Destructor.
QPointF point () const
 return the position relative to the shape origin
QPointF controlPoint1 () const
 get the control point 1
QPointF controlPoint2 () const
 get the second control point
void setPoint (const QPointF &point)
 alter the point
void setControlPoint1 (const QPointF &point)
 Set the control point 1.
void setControlPoint2 (const QPointF &point)
 Set the control point 2.
void removeControlPoint1 ()
void removeControlPoint2 ()
KoPointProperties properties () const
 Get the properties of a point.
void setProperties (KoPointProperties properties)
 Set the properties of a point.
void setProperty (KoPointProperty property)
 Sets a single property of a point.
void unsetProperty (KoPointProperty property)
 Removes a property from the point.
bool activeControlPoint1 () const
 check if there is a controlPoint1
bool activeControlPoint2 () const
 check if there is a controlPoint2
void map (const QMatrix &matrix, bool mapGroup=false)
 apply matrix on the point
void paint (QPainter &painter, const QSizeF &size, bool selected)
void setParent (KoPathShape *parent)
 Sets the parent path shape.
KoPathShapeparent () const
 Get the path shape the point belongs to.
QRectF boundingRect () const
 Get the bounding rect of the point.
void reverse ()
 Reverses the path point.

Fonctions membres protégées

void removeFromGroup ()
void addToGroup (KoPointGroup *pointGroup)
KoPointGroupgroup ()

Attributs privés

KoPathShapem_shape
QPointF m_point
QPointF m_controlPoint1
QPointF m_controlPoint2
KoPointProperties m_properties
KoPointGroupm_pointGroup

Amis

class KoPointGroup
class KoPathShape

Description détaillée

A KoPathPoint represents a point in a path.

A KoPathPoint stores a point in a path. Additional to this point 2 control points are stored. controlPoint1 is used to describe the second point of a cubic bezier ending at the point. controlPoint2 is used to describe the first point of a cubic bezier curve starting at the point.

Définition à la ligne 51 du fichier KoPathShape.h.


Documentation des énumérations membres

enum KoPathPoint::KoPointProperty

Valeurs énumérées:
Normal  it has no control points
CanHaveControlPoint1  it can have a control point 1
CanHaveControlPoint2  it can have a control point 2
HasControlPoint1  it has a control point 1
HasControlPoint2  it has a control point 2
StartSubpath  it starts a new subpath by a moveTo command
CloseSubpath  it closes a subpath
IsSmooth  it is smooth, both control points on a line through the point
IsSymmetric  it is symmetric, like smooth but control points have same distance to point

Définition à la ligne 54 du fichier KoPathShape.h.

enum KoPathPoint::KoPointType

the type for identifying part of a KoPathPoint

Valeurs énumérées:
Node  the node point
ControlPoint1  the first control point
ControlPoint2  the second control point

Définition à la ligne 69 du fichier KoPathShape.h.


Documentation des contructeurs et destructeur

KoPathPoint::KoPathPoint ( KoPathShape path,
const QPointF &  point,
KoPointProperties  properties = Normal 
) [inline]

Constructor.

Paramètres:
path is a pointer to the path shape this point is used in
point the position relative to the shape origin
properties describing the point

Définition à la ligne 82 du fichier KoPathShape.h.

KoPathPoint::KoPathPoint ( const KoPathPoint pathPoint  ) 

Copy Constructor.

Définition à la ligne 30 du fichier KoPathShape.cpp.

Références m_controlPoint1, m_controlPoint2, m_point, m_properties, et m_shape.

KoPathPoint::~KoPathPoint (  )  [inline]

Destructor.

Définition à la ligne 102 du fichier KoPathShape.h.


Documentation des fonctions membres

KoPathPoint & KoPathPoint::operator= ( const KoPathPoint rhs  ) 

Assignment operator.

Définition à la ligne 40 du fichier KoPathShape.cpp.

Références m_controlPoint1, m_controlPoint2, m_point, m_properties, et m_shape.

QPointF KoPathPoint::point (  )  const [inline]

return the position relative to the shape origin

Renvoie:
point

Définition à la ligne 109 du fichier KoPathShape.h.

Références m_point.

Référencé par KoPathShape::arcTo(), KoPathShape::closeMergeSubpath(), KoPointPropertyCommand::execute(), KoControlPointMoveCommand::execute(), KoPathShape::outline(), paint(), et KoPathShape::paintDebug().

Voici le graphe d'appel pour cette fonction :

QPointF KoPathPoint::controlPoint1 (  )  const [inline]

get the control point 1

This points is used for controlling a curve ending at this point

Renvoie:
control point 1 of this point

Définition à la ligne 118 du fichier KoPathShape.h.

Références m_controlPoint1.

Référencé par KoPathShape::closeMergeSubpath(), KoPointPropertyCommand::execute(), KoControlPointMoveCommand::execute(), KoPointPropertyCommand::KoPointPropertyCommand(), KoPathTool::mouseMoveEvent(), et paint().

Voici le graphe d'appel pour cette fonction :

QPointF KoPathPoint::controlPoint2 (  )  const [inline]

get the second control point

This points is used for controlling a curve starting at this point

Renvoie:
control point 2 of this point

Définition à la ligne 127 du fichier KoPathShape.h.

Références m_controlPoint2.

Référencé par KoPointPropertyCommand::execute(), KoControlPointMoveCommand::execute(), KoPointPropertyCommand::KoPointPropertyCommand(), KoPathTool::mouseMoveEvent(), KoPathShape::outline(), et paint().

Voici le graphe d'appel pour cette fonction :

void KoPathPoint::setPoint ( const QPointF &  point  ) 

alter the point

Paramètres:
point to set

Définition à la ligne 55 du fichier KoPathShape.cpp.

Références m_point, m_shape, et KoPathShape::update().

Voici le graphe d'appel pour cette fonction :

void KoPathPoint::setControlPoint1 ( const QPointF &  point  ) 

Set the control point 1.

Paramètres:
point to set

Définition à la ligne 61 du fichier KoPathShape.cpp.

Références HasControlPoint1, m_controlPoint1, m_properties, m_shape, et KoPathShape::update().

Référencé par KoPathShape::closeMergeSubpath(), KoPathShape::curveTo(), KoPointPropertyCommand::execute(), KoControlPointMoveCommand::execute(), KoPathShape::splitAt(), et KoPointPropertyCommand::unexecute().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

void KoPathPoint::setControlPoint2 ( const QPointF &  point  ) 

Set the control point 2.

Paramètres:
point to set

Définition à la ligne 68 du fichier KoPathShape.cpp.

Références HasControlPoint2, m_controlPoint2, m_properties, m_shape, et KoPathShape::update().

Référencé par KoPathShape::curveTo(), KoPointPropertyCommand::execute(), KoControlPointMoveCommand::execute(), KoPathShape::splitAt(), et KoPointPropertyCommand::unexecute().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

void KoPathPoint::removeControlPoint1 (  )  [inline]

Définition à la ligne 150 du fichier KoPathShape.h.

void KoPathPoint::removeControlPoint2 (  )  [inline]

Définition à la ligne 151 du fichier KoPathShape.h.

KoPointProperties KoPathPoint::properties (  )  const [inline]

Get the properties of a point.

Renvoie:
properties of the point

Définition à la ligne 158 du fichier KoPathShape.h.

Références m_properties.

Référencé par activeControlPoint1(), activeControlPoint2(), KoPathShape::arcTo(), KoPathShape::breakAt(), KoPathShape::closeMergeSubpath(), KoPathShape::closeSubpath(), KoControlPointMoveCommand::execute(), KoPointPropertyCommand::KoPointPropertyCommand(), KoPathTool::mouseMoveEvent(), KoPathTool::ActivePointHandle::mousePressEvent(), paint(), KoPathShape::paintDebug(), KoPathShape::removePoint(), et KoPathShape::reverseSubpath().

Voici le graphe d'appel pour cette fonction :

void KoPathPoint::setProperties ( KoPointProperties  properties  ) 

Set the properties of a point.

Paramètres:
properties the new properties

Définition à la ligne 75 du fichier KoPathShape.cpp.

Références CloseSubpath, HasControlPoint1, HasControlPoint2, IsSmooth, IsSymmetric, m_properties, m_shape, StartSubpath, et KoPathShape::update().

Référencé par KoPathShape::breakAt(), KoPathShape::closeMergeSubpath(), KoPathShape::closeSubpath(), KoPointPropertyCommand::execute(), KoPathShape::reverseSubpath(), KoPointPropertyCommand::unexecute(), et KoPathShape::updateLast().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

void KoPathPoint::setProperty ( KoPointProperty  property  ) 

Sets a single property of a point.

Paramètres:
property the property to set

Définition à la ligne 91 du fichier KoPathShape.cpp.

Références CanHaveControlPoint1, CanHaveControlPoint2, CloseSubpath, HasControlPoint1, HasControlPoint2, IsSmooth, IsSymmetric, m_properties, et StartSubpath.

Référencé par KoPathShape::breakAt().

Voici le graphe d'appel pour cette fonction :

void KoPathPoint::unsetProperty ( KoPointProperty  property  ) 

Removes a property from the point.

Paramètres:
property the property to remove

Définition à la ligne 133 du fichier KoPathShape.cpp.

Références CanHaveControlPoint1, CanHaveControlPoint2, CloseSubpath, HasControlPoint1, HasControlPoint2, IsSmooth, IsSymmetric, m_properties, et StartSubpath.

Référencé par KoPathShape::breakAt().

Voici le graphe d'appel pour cette fonction :

bool KoPathPoint::activeControlPoint1 (  )  const

check if there is a controlPoint1

Renvoie:
true when CanHaveControlPoint1 and HasControlPoint1 is set

false otherwise

Définition à la ligne 167 du fichier KoPathShape.cpp.

Références CanHaveControlPoint1, HasControlPoint1, et properties().

Référencé par boundingRect(), KoPathShape::closeMergeSubpath(), et paint().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

bool KoPathPoint::activeControlPoint2 (  )  const

check if there is a controlPoint2

Renvoie:
true when CanHaveControlPoint2 and HasControlPoint2 is set

false otherwise

Définition à la ligne 172 du fichier KoPathShape.cpp.

Références CanHaveControlPoint2, HasControlPoint2, et properties().

Référencé par boundingRect(), et paint().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

void KoPathPoint::map ( const QMatrix &  matrix,
bool  mapGroup = false 
)

apply matrix on the point

This does a matrix multiplication on all points of the point

Paramètres:
matrix which will be applied to all points
mapGroup true when the matrix should be also applied to all points of the group the point belongs to

Définition à la ligne 177 du fichier KoPathShape.cpp.

Références m_controlPoint1, m_controlPoint2, m_point, m_pointGroup, m_shape, KoPointGroup::map(), et KoPathShape::update().

Référencé par KoPathShape::combine(), KoPointRemoveCommand::execute(), KoPointMoveCommand::execute(), et KoPathShape::separate().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

void KoPathPoint::paint ( QPainter &  painter,
const QSizeF &  size,
bool  selected 
)

Paints the path point with the actual brush and pen

Paramètres:
painter used for painting the shape point
size the drawing size of the shape point

Définition à la ligne 192 du fichier KoPathShape.cpp.

Références activeControlPoint1(), activeControlPoint2(), controlPoint1(), controlPoint2(), IsSmooth, IsSymmetric, point(), et properties().

Référencé par KoPathTool::KoPathPointSelection::paint(), et KoPathTool::ActivePointHandle::paint().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

void KoPathPoint::setParent ( KoPathShape parent  ) 

Sets the parent path shape.

Paramètres:
parent the new parent path shape

Définition à la ligne 225 du fichier KoPathShape.cpp.

Références m_shape, et parent().

Voici le graphe d'appel pour cette fonction :

KoPathShape* KoPathPoint::parent (  )  const [inline]

Get the path shape the point belongs to.

Renvoie:
the path shape the point belongs to

Définition à la ligne 222 du fichier KoPathShape.h.

Références m_shape.

Référencé par KoControlPointMoveCommand::execute(), KoPathTool::ActivePointHandle::mousePressEvent(), KoPathTool::ActivePointHandle::paint(), KoPathTool::KoPathPointSelection::remove(), et setParent().

Voici le graphe d'appel pour cette fonction :

QRectF KoPathPoint::boundingRect (  )  const

Get the bounding rect of the point.

This takes into account if there are controlpoints

Renvoie:
bounding rect in document coordinates

Définition à la ligne 232 du fichier KoPathShape.cpp.

Références activeControlPoint1(), activeControlPoint2(), m_controlPoint1, m_controlPoint2, m_point, m_shape, et KoPathShape::shapeToDocument().

Référencé par KoPathTool::KoPathPointSelection::remove(), KoPathTool::KoPathPointSelection::repaint(), et KoPathTool::ActivePointHandle::repaint().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

void KoPathPoint::reverse (  ) 

Reverses the path point.

The control points are swapped and the point properties are adjusted. The position dependent properties like StartSubpath and CloseSubpath are not changed.

Définition à la ligne 250 du fichier KoPathShape.cpp.

Références CanHaveControlPoint1, CanHaveControlPoint2, CloseSubpath, HasControlPoint1, HasControlPoint2, IsSmooth, IsSymmetric, m_controlPoint1, m_controlPoint2, m_properties, Normal, et StartSubpath.

void KoPathPoint::removeFromGroup (  )  [protected]

Définition à la ligne 271 du fichier KoPathShape.cpp.

Références m_pointGroup, et KoPointGroup::remove().

Référencé par addToGroup(), et KoPointGroup::remove().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

void KoPathPoint::addToGroup ( KoPointGroup pointGroup  )  [protected]

Définition à la ligne 278 du fichier KoPathShape.cpp.

Références m_pointGroup, et removeFromGroup().

Référencé par KoPointGroup::add().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

KoPointGroup* KoPathPoint::group (  )  [inline, protected]

Définition à la ligne 246 du fichier KoPathShape.h.

Références m_pointGroup.

Référencé par KoPathShape::paintDebug().

Voici le graphe d'appel pour cette fonction :


Documentation des fonctions amies et associées

friend class KoPointGroup [friend]

Définition à la ligne 242 du fichier KoPathShape.h.

friend class KoPathShape [friend]

Définition à la ligne 243 du fichier KoPathShape.h.


Documentation des données membres

KoPathShape* KoPathPoint::m_shape [private]

Définition à la ligne 248 du fichier KoPathShape.h.

Référencé par boundingRect(), KoPathPoint(), map(), operator=(), parent(), setControlPoint1(), setControlPoint2(), setParent(), setPoint(), et setProperties().

QPointF KoPathPoint::m_point [private]

Définition à la ligne 249 du fichier KoPathShape.h.

Référencé par boundingRect(), KoPathPoint(), map(), operator=(), point(), et setPoint().

QPointF KoPathPoint::m_controlPoint1 [private]

Définition à la ligne 250 du fichier KoPathShape.h.

Référencé par boundingRect(), controlPoint1(), KoPathPoint(), map(), operator=(), reverse(), et setControlPoint1().

QPointF KoPathPoint::m_controlPoint2 [private]

Définition à la ligne 251 du fichier KoPathShape.h.

Référencé par boundingRect(), controlPoint2(), KoPathPoint(), map(), operator=(), reverse(), et setControlPoint2().

KoPointProperties KoPathPoint::m_properties [private]

Définition à la ligne 252 du fichier KoPathShape.h.

Référencé par KoPathPoint(), operator=(), properties(), reverse(), setControlPoint1(), setControlPoint2(), setProperties(), setProperty(), et unsetProperty().

KoPointGroup* KoPathPoint::m_pointGroup [private]

Définition à la ligne 253 du fichier KoPathShape.h.

Référencé par addToGroup(), group(), map(), et removeFromGroup().


La documentation de cette classe a été générée à partir des fichiers suivants :
Généré le Wed Nov 22 23:47:42 2006 pour KPlato par  doxygen 1.5.1-p1