Node Class Reference

#include <node.h>

Inheritance diagram for Node:
QObject

List of all members.

Public Types

enum  EdgeLists { In, Out, Self }

Public Slots

NodeList adjacent_nodes () const
EdgeList adjacent_edges () const
EdgeList edges (Node *n)
EdgeList in_edges () const
EdgeList out_edges () const
EdgeList self_edges () const
void setX (int x)
 Properties:
void setY (int y)
void setWidth (double w)
void setPos (qreal x, qreal y)
qreal x () const
qreal y () const
qreal width () const
void setColor (const QString &s)
const QString & color () const
void setName (const QString &s)
const QString & name () const
bool begin () const
bool end () const
void setBegin (bool begin=true)
void setEnd (bool end=true)
void setValue (const QVariant v)
void setValue (const QString &s)
void setValueHeader (const QString &s)
const QString valueHeader ()
const QVariant value () const
const QPixmap & image () const
void setImage (const QPixmap &p)
void setMaxInEdges (const int &m)
const int & maxInEdges () const
void setMaxOutEdges (const int &m)
const int & maxOutEdges () const
void setMaxSelfEdges (const int &m)
const int & maxSelfEdges () const
void setIcon (const QString &s)
const QString & icon () const
const QString & iconPackage () const
void setIconPackage (const QString &s)
void hideName (bool b)
void hideImage (bool b)
void hideValue (bool b)
void setType (QString type)
QString type ()
QGraphicsSvgItem * nodeItem ()
void setNodeItem (QGraphicsSvgItem *ni)
void addDynamicProperty (QString property, QVariant value)
void removeDynamicProperty (QString property)

Signals

void removed ()
void changed ()

Public Member Functions

 Node (Graph *parent)
 ~Node ()
void addInEdge (Edge *e)
void addOutEdge (Edge *e)
void addSelfEdge (Edge *e)
void removeEdge (Edge *e, int edgeList)
void removeEdge (Edge *e, EdgeList &list)
void remove ()
void startChange ()
void endChange ()
bool showName ()
bool showImage ()
bool showValue ()
bool inEdgesCapacityReached () const
bool outEdgesCapacityReached () const
bool selfEdgesCapacityReached () const
Graphgraph ()

Properties

qreal x
qreal y
qreal width
QString name
QString color
bool begin
bool end
QVariant value
QPixmap image
int maxInEdges
int maxOutEdges
int maxSelfEdges
QString iconPackage
QString icon

Detailed Description

Definition at line 37 of file node.h.


Member Enumeration Documentation

Enumerator:
In 
Out 
Self 

Definition at line 64 of file node.h.


Constructor & Destructor Documentation

Node::Node ( Graph parent  ) 

Definition at line 30 of file node.cpp.

Node::~Node (  ) 

Definition at line 57 of file node.cpp.


Member Function Documentation

void Node::addDynamicProperty ( QString  property,
QVariant  value 
) [slot]

Add a property to this node

Parameters:
property Name of property
Parameters:
value Value of the property. arg2 shoud be different of QVariant::Invalid.

Definition at line 526 of file node.cpp.

void Node::addInEdge ( Edge e  ) 

Definition at line 192 of file node.cpp.

void Node::addOutEdge ( Edge e  ) 

Definition at line 197 of file node.cpp.

void Node::addSelfEdge ( Edge e  ) 

Definition at line 202 of file node.cpp.

EdgeList Node::adjacent_edges (  )  const [slot]

Definition at line 174 of file node.cpp.

QList< Node * > Node::adjacent_nodes (  )  const [slot]

Definition at line 148 of file node.cpp.

bool Node::begin (  )  const [slot]
void Node::changed (  )  [signal]
const QString& Node::color (  )  const [slot]
EdgeList Node::edges ( Node n  )  [slot]

Definition at line 247 of file node.cpp.

bool Node::end (  )  const [slot]
void Node::endChange (  ) 

Definition at line 520 of file node.cpp.

Graph* Node::graph (  )  [inline]

Definition at line 74 of file node.h.

void Node::hideImage ( bool  b  )  [slot]

Definition at line 89 of file node.cpp.

void Node::hideName ( bool  b  )  [slot]

Definition at line 95 of file node.cpp.

void Node::hideValue ( bool  b  )  [slot]

Definition at line 101 of file node.cpp.

const QString& Node::icon (  )  const [slot]
const QString& Node::iconPackage (  )  const [slot]
const QPixmap& Node::image (  )  const [slot]
EdgeList Node::in_edges (  )  const [slot]

Definition at line 207 of file node.cpp.

bool Node::inEdgesCapacityReached (  )  const

Definition at line 300 of file node.cpp.

const int& Node::maxInEdges (  )  const [slot]
const int& Node::maxOutEdges (  )  const [slot]
const int& Node::maxSelfEdges (  )  const [slot]
const QString& Node::name (  )  const [slot]
QGraphicsSvgItem * Node::nodeItem (  )  [slot]

Definition at line 128 of file node.cpp.

EdgeList Node::out_edges (  )  const [slot]

Definition at line 212 of file node.cpp.

bool Node::outEdgesCapacityReached (  )  const

Definition at line 307 of file node.cpp.

void Node::remove (  ) 

Definition at line 271 of file node.cpp.

void Node::removed (  )  [signal]
void Node::removeDynamicProperty ( QString  property  )  [slot]

Remove property arg1 from this node. If property arg1 don't exist in this node, nothing is made.

Parameters:
property name os property to remove

Definition at line 535 of file node.cpp.

void Node::removeEdge ( Edge e,
EdgeList list 
)

Definition at line 242 of file node.cpp.

void Node::removeEdge ( Edge e,
int  edgeList 
)

Definition at line 226 of file node.cpp.

EdgeList Node::self_edges (  )  const [slot]

Definition at line 217 of file node.cpp.

bool Node::selfEdgesCapacityReached (  )  const

Definition at line 314 of file node.cpp.

void Node::setBegin ( bool  begin = true  )  [slot]

Definition at line 437 of file node.cpp.

void Node::setColor ( const QString &  s  )  [slot]

Definition at line 353 of file node.cpp.

void Node::setEnd ( bool  end = true  )  [slot]

Definition at line 466 of file node.cpp.

void Node::setIcon ( const QString &  s  )  [slot]

Definition at line 107 of file node.cpp.

void Node::setIconPackage ( const QString &  s  )  [slot]

Definition at line 113 of file node.cpp.

void Node::setImage ( const QPixmap &  p  )  [slot]

Definition at line 409 of file node.cpp.

void Node::setMaxInEdges ( const int &  m  )  [slot]

Definition at line 367 of file node.cpp.

void Node::setMaxOutEdges ( const int &  m  )  [slot]

Definition at line 381 of file node.cpp.

void Node::setMaxSelfEdges ( const int &  m  )  [slot]

Definition at line 395 of file node.cpp.

void Node::setName ( const QString &  s  )  [slot]

Definition at line 423 of file node.cpp.

void Node::setNodeItem ( QGraphicsSvgItem *  ni  )  [slot]

Definition at line 133 of file node.cpp.

void Node::setPos ( qreal  x,
qreal  y 
) [slot]

Definition at line 332 of file node.cpp.

void Node::setType ( QString  type  )  [slot]

Definition at line 118 of file node.cpp.

void Node::setValue ( const QString &  s  )  [slot]

Definition at line 507 of file node.cpp.

void Node::setValue ( const QVariant  v  )  [slot]

Definition at line 498 of file node.cpp.

void Node::setValueHeader ( const QString &  s  )  [inline, slot]

Definition at line 104 of file node.h.

void Node::setWidth ( double  w  )  [slot]
void Node::setX ( int  x  )  [slot]

Properties:

Definition at line 277 of file node.cpp.

void Node::setY ( int  y  )  [slot]

Definition at line 291 of file node.cpp.

bool Node::showImage (  ) 

Definition at line 84 of file node.cpp.

bool Node::showName (  ) 

Definition at line 74 of file node.cpp.

bool Node::showValue (  ) 

Definition at line 79 of file node.cpp.

void Node::startChange (  ) 

Definition at line 515 of file node.cpp.

QString Node::type (  )  [slot]

Definition at line 123 of file node.cpp.

const QVariant Node::value (  )  const [slot]
const QString Node::valueHeader (  )  [inline, slot]

Definition at line 108 of file node.h.

qreal Node::width (  )  const [slot]
qreal Node::x (  )  const [slot]
qreal Node::y (  )  const [slot]

Property Documentation

bool Node::begin [read, write]

Definition at line 45 of file node.h.

const QString & Node::color [read, write]

Definition at line 44 of file node.h.

bool Node::end [read, write]

Definition at line 46 of file node.h.

const QString & Node::icon [read, write]

Definition at line 53 of file node.h.

const QString & Node::iconPackage [read, write]

Definition at line 52 of file node.h.

const QPixmap & Node::image [read, write]

Definition at line 48 of file node.h.

const int & Node::maxInEdges [read, write]

Definition at line 49 of file node.h.

const int & Node::maxOutEdges [read, write]

Definition at line 50 of file node.h.

const int & Node::maxSelfEdges [read, write]

Definition at line 51 of file node.h.

const QString & Node::name [read, write]

Definition at line 43 of file node.h.

const QVariant Node::value [read, write]

Definition at line 47 of file node.h.

qreal Node::width [read, write]

Definition at line 42 of file node.h.

qreal Node::x [read, write]

Definition at line 40 of file node.h.

qreal Node::y [read, write]

Definition at line 41 of file node.h.


The documentation for this class was generated from the following files:
Generated on Mon Dec 27 13:13:41 2010 for Gluon by  doxygen 1.6.3