#include <node.h>
List of all members.
Detailed Description
Graphical representation of a model node
Definition at line 59 of file node.h.
Constructor & Destructor Documentation
Node::Node |
( |
GraphWidget * |
graphWidget, |
|
|
bool |
_center, |
|
|
uint32_t |
_ip_addr, |
|
|
node * |
_node |
|
) |
| |
Constructor for Creating a new graphical ndoe
- Parameters:
-
graphWidget | the widget it is placed on |
_center | the center of this graphical node |
_ip_addre | the ip address of this node |
_node | the model node that this graphical node represents |
Definition at line 60 of file node.cpp.
Member Function Documentation
void Node::addEdge |
( |
Edge * |
edge | ) |
|
adds and edge to this node
- Parameters:
-
edge | the edge used to connect this node to another node |
Definition at line 85 of file node.cpp.
Updates the position of this node
Definition at line 207 of file node.cpp.
QRectF Node::boundingRect |
( |
| ) |
const |
Gets the bounding rectangle of this node
- Returns:
- the bounding rectangle of this node
Definition at line 220 of file node.cpp.
void Node::calculateForces |
( |
bool |
doPhysics | ) |
|
Calcualtes the forces, when physics are enabled
- Parameters:
-
doPhysics | whether or not do enable physics |
Definition at line 147 of file node.cpp.
QList< Edge * > Node::edges |
( |
| ) |
const |
Gets the list of edges
- Returns:
- QList with all of this graphical node's edges
Definition at line 104 of file node.cpp.
uint32_t Node::getIpAddr |
( |
| ) |
const |
Gets the ip address of the model node
- Returns:
- the ip address of the model node
Definition at line 113 of file node.cpp.
QString Node::getIpAddrQString |
( |
| ) |
const |
Gets the String representation of this nodes ip address
Definition at line 381 of file node.cpp.
node * Node::getNodePointer |
( |
| ) |
|
Gets the model node
- Returns:
- model node that it's representing
Definition at line 95 of file node.cpp.
QPointF Node::getPosition |
( |
| ) |
|
Gets the new position of this node
- Returns:
- the new postion of this node
Definition at line 373 of file node.cpp.
bool Node::isActive |
( |
| ) |
const |
Gets the active state of this node
- Returns:
- true if active
Definition at line 122 of file node.cpp.
QVariant Node::itemChange |
( |
GraphicsItemChange |
change, |
|
|
const QVariant & |
value |
|
) |
| [protected] |
Gets the change variant
- Parameters:
-
change | the graphical item change |
value | the address of the change |
- Returns:
- QVariant of the chang
Definition at line 314 of file node.cpp.
static bool Node::macEqual |
( |
mac_t |
m1, |
|
|
mac_t |
m2 |
|
) |
| [inline, static] |
compares two mac addresses
- Returns:
- true if they're equl
Definition at line 93 of file node.h.
void Node::mousePressEvent |
( |
QGraphicsSceneMouseEvent * |
event | ) |
[protected] |
Handles mouse presses
- Parameters:
-
event | the mouse press event |
Definition at line 333 of file node.cpp.
void Node::mouseReleaseEvent |
( |
QGraphicsSceneMouseEvent * |
event | ) |
[protected] |
Handles the mouse release event
- Parameters:
-
event | the mouse release event |
Definition at line 363 of file node.cpp.
void Node::paint |
( |
QPainter * |
painter, |
|
|
const QStyleOptionGraphicsItem * |
option, |
|
|
QWidget * |
widget |
|
) |
| |
Paints the grpahical node using the painter
- Parameters:
-
painter | used to paint this graphical node |
option | options for painting this node |
Definition at line 243 of file node.cpp.
Sets as active
Definition at line 138 of file node.cpp.
void Node::setInactive |
( |
| ) |
|
Sets the node as inactive
Definition at line 130 of file node.cpp.
void Node::settPosition |
( |
QPointF * |
np | ) |
|
Sets the position of this node
- Parameters:
-
Definition at line 390 of file node.cpp.
QPainterPath Node::shape |
( |
| ) |
const |
Gets the path used to draw this node
- Returns:
- the path used to draw this node
Definition at line 231 of file node.cpp.
int Node::type |
( |
| ) |
const [inline] |
the user type
Definition at line 68 of file node.h.
The documentation for this class was generated from the following files: