#include <KoPathShape.h>
Graphe de collaboration de KoPathPoint:
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. | |
KoPathPoint & | operator= (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. | |
KoPathShape * | parent () 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) |
KoPointGroup * | group () |
Attributs privés | |
KoPathShape * | m_shape |
QPointF | m_point |
QPointF | m_controlPoint1 |
QPointF | m_controlPoint2 |
KoPointProperties | m_properties |
KoPointGroup * | m_pointGroup |
Amis | |
class | KoPointGroup |
class | KoPathShape |
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.
Définition à la ligne 54 du fichier KoPathShape.h.
the type for identifying part of a KoPathPoint
Node | the node point |
ControlPoint1 | the first control point |
ControlPoint2 | the second control point |
Définition à la ligne 69 du fichier KoPathShape.h.
KoPathPoint::KoPathPoint | ( | KoPathShape * | path, | |
const QPointF & | point, | |||
KoPointProperties | properties = Normal | |||
) | [inline] |
Constructor.
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] |
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
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
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
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
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.
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.
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.
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.
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.
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.
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
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
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
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
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.
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.
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
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 :
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.
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().