OpenMS
2.8.0
|
An edge representing a data flow in TOPPAS. More...
#include <OpenMS/VISUAL/TOPPASEdge.h>
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. More... | |
Signals | |
void | somethingHasChanged () |
Emitted when something has changed. More... | |
Public Member Functions | |
TOPPASEdge () | |
Standard constructor. More... | |
TOPPASEdge (TOPPASVertex *from, const QPointF &hover_pos) | |
Constructor. More... | |
TOPPASEdge (const TOPPASEdge &rhs) | |
Copy constructor. More... | |
~TOPPASEdge () override | |
Destructor. More... | |
TOPPASEdge & | operator= (const TOPPASEdge &rhs) |
Assignment operator. More... | |
String | toString () |
for debug output More... | |
QRectF | boundingRect () const override |
Returns the bounding rectangle of this item. More... | |
QPainterPath | shape () const override |
Returns a more precise shape. More... | |
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override |
Paints the item. More... | |
QPointF | startPos () const |
Returns the start position of this edge. More... | |
QPointF | endPos () const |
Returns the end position of this edge. More... | |
void | setHoverPos (const QPointF &pos) |
Sets the position of the hovering end while edge is being created. More... | |
void | setSourceVertex (TOPPASVertex *tv) |
Sets the source vertex of this edge. More... | |
void | setTargetVertex (TOPPASVertex *tv) |
Sets the target vertex of this edge. More... | |
TOPPASVertex * | getSourceVertex () |
Returns the source vertex. More... | |
TOPPASVertex * | getTargetVertex () |
Returns the target vertex. More... | |
void | prepareResize () |
Call this before changing the item geometry. More... | |
void | setColor (const QColor &color) |
Sets the color. More... | |
EdgeStatus | getEdgeStatus () |
Returns the status of this edge. More... | |
void | setSourceOutParam (int out) |
Sets the source output parameter index. More... | |
int | getSourceOutParam () const |
Returns the source output parameter index. More... | |
QString | getSourceOutParamName () |
Returns the source output parameter name. More... | |
void | setTargetInParam (int in) |
Sets the target input parameter index. More... | |
int | getTargetInParam () const |
Returns the target input parameter index. More... | |
QString | getTargetInParamName () |
Returns the target input parameter index. More... | |
void | updateColor () |
Updates the edge color. More... | |
void | emitChanged () |
Emits the somethingHasChanged() signal. More... | |
void | showIOMappingDialog () |
Shows the I/O mapping dialog. More... | |
Protected Member Functions | |
reimplemented Qt events | |
void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *e) override |
void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) override |
helper methods of getEdgeStatus() | |
TOPPASVertex * | from_ |
Pointer to the source of this edge. More... | |
TOPPASVertex * | to_ |
Pointer to the target of this edge. More... | |
QPointF | hover_pos_ |
Position of hovering end while edge is being created. More... | |
QColor | color_ |
The color. More... | |
int | source_out_param_ |
The source output parameter index. More... | |
int | target_in_param_ |
The target input parameter index. More... | |
EdgeStatus | getToolToolStatus_ (TOPPASToolVertex *source, int source_param_index, TOPPASToolVertex *target, int target_param_index) |
EdgeStatus | getListToolStatus_ (TOPPASInputFileListVertex *source, TOPPASToolVertex *target, int target_param_index) |
QPointF | borderPoint_ (bool atTargetVertex=true) const |
point where the current edge touches the source or target (default) vertex More... | |
QPointF | nearestPoint_ (const QPointF &origin, const QList< QPointF > &list) const |
Returns the point in the list that is nearest to origin . More... | |
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.
enum EdgeStatus |
TOPPASEdge | ( | ) |
Standard constructor.
TOPPASEdge | ( | TOPPASVertex * | from, |
const QPointF & | hover_pos | ||
) |
Constructor.
TOPPASEdge | ( | const TOPPASEdge & | rhs | ) |
Copy constructor.
|
override |
Destructor.
|
protected |
point where the current edge touches the source or target (default) vertex
|
override |
Returns the bounding rectangle of this item.
|
overrideprotected |
void emitChanged | ( | ) |
Emits the somethingHasChanged() signal.
QPointF endPos | ( | ) | const |
Returns the end position of this edge.
EdgeStatus getEdgeStatus | ( | ) |
Returns the status of this edge.
|
protected |
int getSourceOutParam | ( | ) | const |
Returns the source output parameter index.
QString getSourceOutParamName | ( | ) |
Returns the source output parameter name.
TOPPASVertex* getSourceVertex | ( | ) |
Returns the source vertex.
int getTargetInParam | ( | ) | const |
Returns the target input parameter index.
QString getTargetInParamName | ( | ) |
Returns the target input parameter index.
TOPPASVertex* getTargetVertex | ( | ) |
Returns the target vertex.
|
protected |
|
overrideprotected |
|
protected |
Returns the point in the list
that is nearest to origin
.
TOPPASEdge& operator= | ( | const TOPPASEdge & | rhs | ) |
Assignment operator.
|
override |
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.
|
override |
Returns a more precise shape.
void showIOMappingDialog | ( | ) |
Shows the I/O mapping dialog.
|
signal |
Emitted when something has changed.
|
slot |
Called by the source vertex when it has changed.
QPointF startPos | ( | ) | const |
Returns the start position of this edge.
String toString | ( | ) |
for debug output
void updateColor | ( | ) |
Updates the edge color.
|
protected |
The color.
|
protected |
Pointer to the source of this edge.
|
protected |
Position of hovering end while edge is being created.
|
protected |
The source output parameter index.
|
protected |
The target input parameter index.
|
protected |
Pointer to the target of this edge.