Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes

TOPPASEdge Class Reference
[TOPPAS]

An edge representing a data flow in TOPPAS. More...

#include <OpenMS/VISUAL/TOPPASEdge.h>

Inheritance diagram for TOPPASEdge:
QObject QGraphicsItem

List of all members.

Public Types

enum  EdgeStatus {
  ES_VALID, ES_NO_TARGET_PARAM, ES_NO_SOURCE_PARAM, ES_FILE_EXT_MISMATCH,
  ES_MERGER_EXT_MISMATCH, ES_MERGER_WITHOUT_TOOL, ES_NOT_READY_YET, ES_TOOL_API_CHANGED,
  ES_UNKNOWN
}
 

The status of this edge.

More...

Public Slots

void sourceHasChanged ()
 Called by the source vertex when it has changed.

Signals

void somethingHasChanged ()
 Emitted when something has changed.

Public Member Functions

 TOPPASEdge ()
 Standard constructor.
 TOPPASEdge (TOPPASVertex *from, const QPointF &hover_pos)
 Constructor.
 TOPPASEdge (const TOPPASEdge &rhs)
 Copy constructor.
virtual ~TOPPASEdge ()
 Destructor.
TOPPASEdgeoperator= (const TOPPASEdge &rhs)
 Assignment operator.
QRectF boundingRect () const
 Returns the bounding rectangle of this item.
QPainterPath shape () const
 Returns a more precise shape.
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 Paints the item.
QPointF startPos () const
 Returns the start position of this edge.
QPointF endPos () const
 Returns the end position of this edge.
void setHoverPos (const QPointF &pos)
 Sets the position of the hovering end while edge is being created.
void setSourceVertex (TOPPASVertex *tv)
 Sets the source vertex of this edge.
void setTargetVertex (TOPPASVertex *tv)
 Sets the target vertex of this edge.
TOPPASVertexgetSourceVertex ()
 Returns the source vertex.
TOPPASVertexgetTargetVertex ()
 Returns the target vertex.
void prepareResize ()
 Call this before changing the item geometry.
void setColor (const QColor &color)
 Sets the color.
EdgeStatus getEdgeStatus ()
 Returns the status of this edge.
void setSourceOutParam (int out)
 Sets the source output parameter index.
int getSourceOutParam ()
 Returns the source output parameter index.
void setTargetInParam (int in)
 Sets the target input parameter index.
int getTargetInParam ()
 Returns the target input parameter index.
void updateColor ()
 Updates the edge color.
void emitChanged ()
 Emits the somethingHasChanged() signal.
void showIOMappingDialog ()
 Shows the I/O mapping dialog.

Protected Member Functions

QPointF nearestPoint_ (const QPointF &origin, const QList< QPointF > &list) const
 Returns the point in the list that is nearest to origin.
reimplemented Qt events

void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *e)
void contextMenuEvent (QGraphicsSceneContextMenuEvent *event)
helper methods of getEdgeStatus()

EdgeStatus getToolToolStatus_ (TOPPASToolVertex *source, int source_param_index, TOPPASToolVertex *target, int target_param_index)
EdgeStatus getListToolStatus_ (TOPPASInputFileListVertex *source, TOPPASToolVertex *target, int target_param_index)

Protected Attributes

TOPPASVertexfrom_
 Pointer to the source of this edge.
TOPPASVertexto_
 Pointer to the target of this edge.
QPointF hover_pos_
 Position of hovering end while edge is being created.
QColor color_
 The color.
int source_out_param_
 The source output parameter index.
int target_in_param_
 The target input parameter index.

Detailed Description

An edge representing a data flow in TOPPAS.

Like all TOPPASVertex classes, TOPPASEdge is a subclass of QGraphicsItem and thus implements methods to draw itself and to react on incoming events such as mouse clicks. It holds the data needed to represent an edge between two vertices of a TOPPAS workflow.


Member Enumeration Documentation

enum EdgeStatus

The status of this edge.

Enumerator:
ES_VALID 
ES_NO_TARGET_PARAM 
ES_NO_SOURCE_PARAM 
ES_FILE_EXT_MISMATCH 
ES_MERGER_EXT_MISMATCH 
ES_MERGER_WITHOUT_TOOL 
ES_NOT_READY_YET 
ES_TOOL_API_CHANGED 
ES_UNKNOWN 

Constructor & Destructor Documentation

TOPPASEdge (  ) 

Standard constructor.

TOPPASEdge ( TOPPASVertex from,
const QPointF &  hover_pos 
)

Constructor.

TOPPASEdge ( const TOPPASEdge rhs  ) 

Copy constructor.

virtual ~TOPPASEdge (  )  [virtual]

Destructor.


Member Function Documentation

QRectF boundingRect (  )  const

Returns the bounding rectangle of this item.

void contextMenuEvent ( QGraphicsSceneContextMenuEvent *  event  )  [protected]
void emitChanged (  ) 

Emits the somethingHasChanged() signal.

QPointF endPos (  )  const

Returns the end position of this edge.

EdgeStatus getEdgeStatus (  ) 

Returns the status of this edge.

EdgeStatus getListToolStatus_ ( TOPPASInputFileListVertex source,
TOPPASToolVertex target,
int  target_param_index 
) [protected]
int getSourceOutParam (  ) 

Returns the source output parameter index.

TOPPASVertex* getSourceVertex (  ) 

Returns the source vertex.

int getTargetInParam (  ) 

Returns the target input parameter index.

TOPPASVertex* getTargetVertex (  ) 

Returns the target vertex.

EdgeStatus getToolToolStatus_ ( TOPPASToolVertex source,
int  source_param_index,
TOPPASToolVertex target,
int  target_param_index 
) [protected]
void mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  e  )  [protected]
QPointF nearestPoint_ ( const QPointF &  origin,
const QList< QPointF > &  list 
) const [protected]

Returns the point in the list that is nearest to origin.

TOPPASEdge& operator= ( const TOPPASEdge rhs  ) 

Assignment operator.

void paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget widget 
)

Paints the item.

void prepareResize (  ) 

Call this before changing the item geometry.

void setColor ( const QColor &  color  ) 

Sets the color.

void setHoverPos ( const QPointF &  pos  ) 

Sets the position of the hovering end while edge is being created.

void setSourceOutParam ( int  out  ) 

Sets the source output parameter index.

void setSourceVertex ( TOPPASVertex tv  ) 

Sets the source vertex of this edge.

void setTargetInParam ( int  in  ) 

Sets the target input parameter index.

void setTargetVertex ( TOPPASVertex tv  ) 

Sets the target vertex of this edge.

QPainterPath shape (  )  const

Returns a more precise shape.

void showIOMappingDialog (  ) 

Shows the I/O mapping dialog.

void somethingHasChanged (  )  [signal]

Emitted when something has changed.

void sourceHasChanged (  )  [slot]

Called by the source vertex when it has changed.

QPointF startPos (  )  const

Returns the start position of this edge.

void updateColor (  ) 

Updates the edge color.


Member Data Documentation

QColor color_ [protected]

The color.

TOPPASVertex* from_ [protected]

Pointer to the source of this edge.

QPointF hover_pos_ [protected]

Position of hovering end while edge is being created.

int source_out_param_ [protected]

The source output parameter index.

int target_in_param_ [protected]

The target input parameter index.

TOPPASVertex* to_ [protected]

Pointer to the target of this edge.


OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:58 using doxygen 1.7.1