class LinePath


Definition#include <./linepath.h>
InheritsQObject (unknown) [public ], Uml [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Slots

Protected Methods

Protected Members


Detailed Description

 LinePath ()

LinePath

Constructor

 ~LinePath ()

~LinePath

Deconstructor

bool  operator== ( LinePath & rhs )

operator==

equal to (==) operator

LinePath &  operator= ( LinePath & rhs )

operator=

copy ( = ) operator

long  getClipSizeOf ()

getClipSizeOf

Returns the size of the serialize class

bool  serialize ( QDataStream * stream, bool archive)

serialize

Saves and loads the class information

QPoint  getPoint ( int pointIndex )

getPoint

Returns the point at the point index.

bool  setPoint ( int pointIndex, QPoint point )

setPoint

Sets the position of an already set point.

bool  isPoint ( int pointIndex, QPoint point, unsigned short delta = 0 )

isPoint

Checks, if we are at an end of the segment or somewhere in the middle. We use the delta, because with the mouse it is hard to find the exactly point.

bool  insertPoint ( int pointIndex, QPoint point )

insertPoint

Inserts a point at the given index.

bool  removePoint ( int pointIndex )

removePoint

Removes the point given by the index.

bool  setStartEndPoints ( QPoint start, QPoint end )

setStartEndPoints

Sets the start and end points.

int  count ()

count

Returns the amount of POINTS on the line. Includes start and end points.

int  onLinePath ( QPoint position )

onLinePath

Returns -1 if the given point is not on the line. else returns the line segment the point is on. Use the value to insert points at the point position.

void  setCanvas ( QCanvas * canvas )

setCanvas

Sets the canvas to be used.

void  setAssocType ( Uml::Association_Type type )

setAssocType

Sets the Association type.

void  update ()

update

Calls a group of methods to update the line. Used to save you calling multiple methods.

void  setAssociation ( AssociationWidget * association )

setAssociation

This will setup the class ready to display the line correctly. This MUST be called before you can use this class.

AssociationWidget *  getAssociation ()

getAssociation

Returns the Association this class is linked to.

void  setSelected ( bool select )

setSelected

Sets the status of whether the line is selected or not.

bool  saveToXMI ( QDomDocument & qDoc, QDomElement & qElement )

saveToXMI

bool  loadFromXMI ( QDomElement & qElement )

loadFromXMI

void  cleanup ()

cleanup

Removes and item created that are no longer needed.

QCanvas *  getCanvas ()

getCanvas

[protected]

Returns the canvas being used. Will return zero if the Association hasn't been set.

This class doesn't hold this information but is a wrapper method to stop calls to undefined variable like m_pAssociation.

Uml::Association_Type  getAssocType ()

getAssocType

[protected]

Returns the Association type. Returns Uml::at_Association if association hasn't been set.

This class doesn't hold this information but is a wrapper method to stop calls to undefined variable like m_pAssociation.

QColor  getLineColor ()

getLineColor

[protected]

Returns the Line Color to use. Returns black if association not set.

This class doesn't hold this information but is a wrapper method to stop calls to undefined variable like m_pAssociation.

void  moveSelected ( int pointIndex )

moveSelected

[protected]

Moves the selected canvas widgets.

void  setupSelected ()

setupSelected

[protected]

Sets up the selected canvases needed.

QPen  getPen ()

getPen

[protected]

Returns the type of pen to use depending on the type of Association.

void  calculateHead ()

calculateHead

[protected]

Calculates the head points.

void  createHeadLines ()

createHeadLines

[protected]

Creates the head lines to display the head.

void  updateHead ()

updateHead

[protected]

Updates the head lines. Call after calculating the new points.

void  setupParallelLine ()

setupParallelLine

[protected]

Creates the line objects to display the parallel line.

void  calculateParallelLine ()

calculateParallelLine

[protected]

Calculates the position of the parallel line.

void  updateParallelLine ()

updateParallelLine

[protected]

Updates the parallel line. Call after calculating the new position.

AssociationWidget * m_pAssociation

m_pAssociation

[protected]

LineList m_LineList

m_LineList

[protected]

RectList m_RectList

m_RectList

[protected]

LineList m_HeadList

m_HeadList

[protected]

LineList m_ParallelList

m_ParallelList

[protected]

bool m_bSelected

m_bSelected

[protected]

QPointArray m_PointArray

m_PointArray

[protected]

QPoint m_ArrowPointA

m_ArrowPointA

[protected]

QPoint m_ArrowPointB

m_ArrowPointB

[protected]

Contains calculated points used to draw the line head.

QPoint m_MidPoint

m_MidPoint

[protected]

Contains calculated points used to draw the line head.

QPoint m_FullPoint

m_FullPoint

[protected]

Contains calculated points used to draw the line head.

QPoint m_LastPoint

m_LastPoint

[protected]

Contains calculated points used to draw the line head.

QCanvasPolygon * m_pClearPoly

m_pClearPoly

[protected]

QCanvasEllipse * m_pEllipse

m_pEllipse

[protected]

QPointArray m_ParallelLines

m_ParallelLines

[protected]

bool m_bHeadCreated

m_bHeadCreated

[protected]

bool m_bParallelLineCreated

m_bParallelLineCreated

[protected]

void  setLineColor ( QColor color )

setLineColor

[slot]

Sets the line color used by the line.


Generated by: jr on radge on Wed Sep 25 00:11:47 2002, using kdoc 2.0a54.