Edge Class Reference
#include <edge.h>
List of all members.
Detailed Description
This class is an edge on the graph. it holds the orientation, the from and the to nodes,auto and has a name, value and color properties. you can change all properties by 'edge.propertyName = new property' and access it's value by 'edge.propertyName' . new properties can be added on the fly via edge.addProp(propertyname) , and accessed by edge.propertyName.
Definition at line 42 of file edge.h.
Constructor & Destructor Documentation
Edge::Edge |
( |
Graph * |
parent, |
|
|
Node * |
from, |
|
|
Node * |
to, |
|
|
QGraphicsSvgItem * |
cFrom, |
|
|
QGraphicsSvgItem * |
cTo | |
|
) |
| | |
default constructor, an edge connects two nodes. parent
a Graph from
the first node to
the second node
Definition at line 28 of file edge.cpp.
default destructor
Definition at line 60 of file edge.cpp.
Member Function Documentation
void Edge::addDynamicProperty |
( |
QString |
Property, |
|
|
QVariant |
value | |
|
) |
| | [slot] |
Add a property to this edge
- Parameters:
-
| property | Name of property - Parameters:
-
| value | Value of the property. value shoud be different of QVariant::Invalid. |
|
Definition at line 126 of file edge.cpp.
void Edge::changed |
( |
|
) |
[signal] |
emmited when a node connected to this edge changes, or when this edge changes.
const QString Edge::color |
( |
|
) |
const [inline, slot] |
gets the color attribute of the edge
- Returns:
- the string value of the edge.
Definition at line 174 of file edge.h.
QGraphicsSvgItem* Edge::connectorFrom |
( |
|
) |
const [inline, slot] |
return connector edges is from
- Returns:
- QGraphicsSvgItem of connector
Definition at line 124 of file edge.h.
QGraphicsSvgItem* Edge::connectorTo |
( |
|
) |
const [inline, slot] |
return connector edges is to
- Returns:
- QGraphicsSvgItem of connector
Definition at line 132 of file edge.h.
Node* Edge::from |
( |
|
) |
const [inline, slot] |
return the first node of this edge
- Returns:
- Node* pointer for the first node of this edge.
Definition at line 108 of file edge.h.
QString Edge::fromConnector |
( |
|
) |
[slot] |
QString Edge::fromNode |
( |
|
) |
[slot] |
Graph* Edge::graph |
( |
|
) |
[inline] |
void Edge::hideName |
( |
bool |
b |
) |
[slot] |
void Edge::hideValue |
( |
bool |
b |
) |
[slot] |
const QString& Edge::name |
( |
|
) |
const [inline, slot] |
returns the name attribute of the edge.
- Returns:
- the name of the edge.
Definition at line 157 of file edge.h.
int Edge::relativeIndex |
( |
|
) |
const [inline] |
relative index is the index that this edge has relative to the nodes that it's bound to. eg. if the nodes have 2 or more edges connecteds between them, it will have a unique identifier relative to that nodes
- Returns:
- the relativeIndex identifier.
Definition at line 79 of file edge.h.
remove this node from the graph
Definition at line 76 of file edge.cpp.
void Edge::removed |
( |
|
) |
[signal] |
emmited when this edge is removed.
void Edge::removeDynamicProperty |
( |
QString |
property |
) |
[slot] |
Remove property arg1 from this edge. If property arg1 don't exist in this edge, nothing is made.
- Parameters:
-
| arg1 | name os property to remove |
Definition at line 135 of file edge.cpp.
void Edge::setColor |
( |
const QString & |
s |
) |
[inline, slot] |
sets the color attribute of the edge s
the new color of the edge in the format "#000000" or by it's english name ("red" for example)
Definition at line 182 of file edge.h.
void Edge::setName |
( |
const QString & |
s |
) |
[inline, slot] |
sets the name attribute of the edge s
the new name of this edge
Definition at line 165 of file edge.h.
void Edge::setStyle |
( |
const QString & |
s |
) |
[inline, slot] |
void Edge::setValue |
( |
const QString & |
s |
) |
[inline, slot] |
sets the value attribute of this edge s
the new value of this edge.
Definition at line 148 of file edge.h.
void Edge::setWidth |
( |
double |
w |
) |
[inline, slot] |
bool Edge::showName |
( |
|
) |
[slot] |
bool Edge::showValue |
( |
|
) |
[slot] |
const QString& Edge::style |
( |
|
) |
const [inline, slot] |
Node* Edge::to |
( |
|
) |
const [inline, slot] |
return the second node of this edge
- Returns:
- Node* pointer for the second node of this edge.
Definition at line 116 of file edge.h.
QString Edge::toConnector |
( |
|
) |
[slot] |
QString Edge::toNode |
( |
|
) |
[slot] |
const QString& Edge::value |
( |
|
) |
const [inline, slot] |
return the value of this edge
- Returns:
- the value of the edge.
Definition at line 140 of file edge.h.
qreal Edge::width |
( |
|
) |
const [inline, slot] |
Property Documentation
QString Edge::color [read, write] |
all properties are accessible from the scripting engine via .propertyName
this property holds the color attribute.
Definition at line 49 of file edge.h.
QString Edge::name [read, write] |
this property holds the name of the edge.
Definition at line 55 of file edge.h.
QString Edge::style [read, write] |
this property holds the style of the edge
Definition at line 61 of file edge.h.
QString Edge::value [read, write] |
this property hold the value attribute
Definition at line 52 of file edge.h.
double Edge::width [read, write] |
this property holds the width of the edge
Definition at line 58 of file edge.h.
The documentation for this class was generated from the following files:
- creator/plugins/kparts/codeeditorpart/Core/edge.h
- creator/plugins/kparts/codeeditorpart/Core/edge.cpp