Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

Edge Class Reference

#include <edge.hpp>

Collaboration diagram for Edge:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Edge (QWidget *parent, Node *origem, Node *destino)
 ~Edge ()
float trust ()
QString trustString ()
float combinedTrust ()
Nodesource ()
Nodetarget ()
QPoint start () const
QPoint end () const
QString sourceName ()
QString targetName ()
bool changed ()
void setChanged (bool alterado)
void setTrust (float confianca)
void setTrust (QString s_trust)
void setCombinedTrust (float combined)
void setSource (Node *origem)
void setTarget (Node *destino)
void setStart (QPoint inicio)
void setEnd (QPoint fim)
void processBends ()
void changeActive (QColor thisColor)
Node opposite (Node *an_end)
void draw (QPainter *painter)

Public Attributes

QPointArray vNodes
QPointArray arrowPoints
QPoint DL
QColor lineColor
QColor propLineColor

Protected Member Functions

void paintEvent (QPaintEvent *event)
void mousePressEvent (QMouseEvent *e)
void updateMask ()
void init ()

Protected Attributes

float p_trust
float p_combinedTrust
bool p_changed
Nodep_source
Nodep_target
QPoint p_start
QPoint p_end

Detailed Description

This class store all information about a connection between two propositions (even if it connects two models, the connection is, in fact, between two propositions.).

Definition at line 32 of file edge.hpp.


Constructor & Destructor Documentation

Edge::Edge QWidget *  parent,
Node origem,
Node destino
 

Default constructor. Connects node origem (start point) and node destino (end point). Parent Qwidget equals the nodes parent.

Definition at line 28 of file edge.cpp.

References init(), setSource(), setTarget(), source(), and target().

Here is the call graph for this function:

Edge::~Edge  ) 
 

Definition at line 39 of file edge.cpp.


Member Function Documentation

void Edge::changeActive QColor  thisColor  ) 
 

Definition at line 226 of file edge.cpp.

References PropositionGraph::edgeSelected(), lineColor, PropositionGraph::setEdgeSelected(), and source().

Referenced by mousePressEvent().

Here is the call graph for this function:

bool Edge::changed  )  [inline]
 

Definition at line 90 of file edge.hpp.

References p_changed.

float Edge::combinedTrust  )  [inline]
 

Returns combined trust value (p_combinedTrust) Combined trust represents the inference trust accounting the source node trust value. combinedTrust = nodetrust * edgetrust.

Definition at line 65 of file edge.hpp.

References p_combinedTrust.

void Edge::draw QPainter *  painter  ) 
 

Definition at line 209 of file edge.cpp.

References arrowPoints, lineColor, and vNodes.

Referenced by paintEvent().

QPoint Edge::end  )  const [inline]
 

Returns the graphical location of the ending point of the edge (p_end).

Definition at line 81 of file edge.hpp.

References p_end.

void Edge::init  )  [protected]
 

Class initialization

Definition at line 44 of file edge.cpp.

References lineColor, propLineColor, and setTrust().

Referenced by Edge().

Here is the call graph for this function:

void Edge::mousePressEvent QMouseEvent *  e  )  [protected]
 

Definition at line 240 of file edge.cpp.

References changeActive(), COLOR_EDGE_SELECTED, PropositionGraph::deleteEdge(), source(), Graph::status(), and STATUS_EDGE_DELETE.

Here is the call graph for this function:

Node Edge::opposite Node an_end  ) 
 

If you enter with the source node, this functions returns the target node and vice-versa

Definition at line 107 of file edge.cpp.

References source(), and target().

Here is the call graph for this function:

void Edge::paintEvent QPaintEvent *  event  )  [protected]
 

Definition at line 185 of file edge.cpp.

References draw().

Here is the call graph for this function:

void Edge::processBends  ) 
 

Process Bendpoints to produce a picewise cubic bezier curve and determine the edge bound box.

Definition at line 114 of file edge.cpp.

References arrowPoints, b, c, DL, h, target(), and vNodes.

Here is the call graph for this function:

void Edge::setChanged bool  alterado  ) 
 

Definition at line 62 of file edge.cpp.

References p_changed.

Referenced by setTrust().

void Edge::setCombinedTrust float  combined  ) 
 

Definition at line 82 of file edge.cpp.

References p_combinedTrust.

void Edge::setEnd QPoint  fim  ) 
 

Definition at line 102 of file edge.cpp.

References p_end.

void Edge::setSource Node origem  ) 
 

Definition at line 87 of file edge.cpp.

References p_source.

Referenced by Edge().

void Edge::setStart QPoint  inicio  ) 
 

Definition at line 97 of file edge.cpp.

References p_start.

void Edge::setTarget Node destino  ) 
 

Definition at line 92 of file edge.cpp.

References p_target.

Referenced by Edge().

void Edge::setTrust QString  s_trust  ) 
 

Definition at line 77 of file edge.cpp.

References setTrust().

Here is the call graph for this function:

void Edge::setTrust float  confianca  ) 
 

Definition at line 67 of file edge.cpp.

References lineColor, p_trust, propLineColor, setChanged(), and trust2rgb().

Referenced by Dot::callDot(), PropositionGraph::connect(), Proposition::connect(), init(), and setTrust().

Here is the call graph for this function:

Node* Edge::source  )  [inline]
 

Returns the source node of the edge.

Definition at line 69 of file edge.hpp.

References p_source.

Referenced by changeActive(), PropositionGraph::deleteEdge(), Edge(), mousePressEvent(), opposite(), and sourceName().

QString Edge::sourceName  ) 
 

Returns the internal name of the edge source node.

Definition at line 52 of file edge.cpp.

References source().

Here is the call graph for this function:

QPoint Edge::start  )  const [inline]
 

Returns the graphical location of the starting point of the edge (p_start).

Definition at line 77 of file edge.hpp.

References p_start.

Node* Edge::target  )  [inline]
 

Returns the target node of the edge.

Definition at line 73 of file edge.hpp.

References p_target.

Referenced by PropositionGraph::deleteEdge(), Edge(), opposite(), processBends(), and targetName().

QString Edge::targetName  ) 
 

Returns the internal name of the edge target node.

Definition at line 57 of file edge.cpp.

References target().

Here is the call graph for this function:

float Edge::trust  )  [inline]
 

Returns trust value : (p_trust). The trust level of a edge reflects the level of confidence related to the edge inference. If (origem is TRUE) then (destino is a good guess). The trust level tells how good is the guess. Trust must be in the interval (0,1].

Definition at line 50 of file edge.hpp.

References p_trust.

QString Edge::trustString  )  [inline]
 

Returns trust value in QString format

Definition at line 54 of file edge.hpp.

References p_trust, and r.

void Edge::updateMask  )  [protected]
 

Definition at line 192 of file edge.cpp.

References arrowPoints, TRUE, and vNodes.


Member Data Documentation

QPointArray Edge::arrowPoints
 

Definition at line 104 of file edge.hpp.

Referenced by draw(), processBends(), and updateMask().

QPoint Edge::DL
 

Definition at line 106 of file edge.hpp.

Referenced by processBends().

QColor Edge::lineColor
 

Definition at line 120 of file edge.hpp.

Referenced by changeActive(), draw(), init(), and setTrust().

bool Edge::p_changed [protected]
 

Definition at line 131 of file edge.hpp.

Referenced by changed(), and setChanged().

float Edge::p_combinedTrust [protected]
 

Definition at line 130 of file edge.hpp.

Referenced by combinedTrust(), and setCombinedTrust().

QPoint Edge::p_end [protected]
 

Definition at line 135 of file edge.hpp.

Referenced by end(), and setEnd().

Node* Edge::p_source [protected]
 

Definition at line 132 of file edge.hpp.

Referenced by setSource(), and source().

QPoint Edge::p_start [protected]
 

Definition at line 134 of file edge.hpp.

Referenced by setStart(), and start().

Node* Edge::p_target [protected]
 

Definition at line 133 of file edge.hpp.

Referenced by setTarget(), and target().

float Edge::p_trust [protected]
 

Definition at line 129 of file edge.hpp.

Referenced by setTrust(), trust(), and trustString().

QColor Edge::propLineColor
 

Definition at line 121 of file edge.hpp.

Referenced by init(), and setTrust().

QPointArray Edge::vNodes
 

Node used as bendpoints to Bezier representation of edge.

Definition at line 103 of file edge.hpp.

Referenced by draw(), processBends(), and updateMask().


The documentation for this class was generated from the following files: Untitled Document Pesquisa Psi SourceForge.net Logo