The base class of the different vertex classes. More...
#include <OpenMS/VISUAL/TOPPASVertex.h>
Classes | |
| struct | VertexRoundPackage |
| Info for one edge and round, to be passed to next node. More... | |
Public Types | |
| enum | DFS_COLOR { DFS_WHITE, DFS_GRAY, DFS_BLACK } |
The color of a vertex during depth-first search. More... | |
| enum | SUBSTREESTATUS { TV_ALLFINISHED, TV_UNFINISHED, TV_UNFINISHED_INBRANCH } |
The color of a vertex during depth-first search. More... | |
| typedef QList< TOPPASEdge * > | EdgeContainer |
| The container for in/out edges. | |
| typedef EdgeContainer::iterator | EdgeIterator |
| A mutable iterator for in/out edges. | |
| typedef EdgeContainer::const_iterator | ConstEdgeIterator |
| A const iterator for in/out edges. | |
| typedef std::map< Int, VertexRoundPackage > | RoundPackage |
| typedef RoundPackage::const_iterator | RoundPackageConstIt |
| typedef RoundPackage::iterator | RoundPackageIt |
| typedef std::vector< RoundPackage > | RoundPackages |
| all information a node needs to process all rounds | |
Public Slots | |
| virtual void | inEdgeHasChanged () |
| Called by an incoming edge when it has changed. | |
| virtual void | outEdgeHasChanged () |
| Called by an outgoing edge when it has changed. | |
Signals | |
| void | clicked () |
| Emitted when this item is clicked. | |
| void | released () |
| Emitted when this item is released. | |
| void | hoveringEdgePosChanged (const QPointF &new_pos) |
| Emitted when the position of the hovering edge changes. | |
| void | newHoveringEdge (const QPointF &pos) |
| Emitted when a new out edge is supposed to be created. | |
| void | finishHoveringEdge () |
| Emitted when the mouse is released after having dragged a new edge somewhere. | |
| void | somethingHasChanged () |
| Emitted when something has changed. | |
| void | itemDragged (qreal dx, qreal dy) |
| Emitted when the item is dragged. | |
| void | parameterChanged (const bool invalidates_running_pipeline) |
Public Member Functions | |
| TOPPASVertex () | |
| Default Constructor. | |
| TOPPASVertex (const TOPPASVertex &rhs) | |
| Copy constructor. | |
| virtual | ~TOPPASVertex () |
| Destructor. | |
| TOPPASVertex & | operator= (const TOPPASVertex &rhs) |
| Assignment operator. | |
| bool | buildRoundPackages (RoundPackages &pkg, String &error_msg) |
| bool | isUpstreamFinished () const |
| check if all upstream nodes are ready to go ( 'finished_' is true) | |
| virtual QRectF | boundingRect () const =0 |
| Returns the bounding rectangle of this item. | |
| virtual QPainterPath | shape () const =0 |
| Returns a more precise shape. | |
| virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)=0 |
| Paints the item. | |
| ConstEdgeIterator | outEdgesBegin () const |
| Returns begin() iterator of outgoing edges. | |
| ConstEdgeIterator | outEdgesEnd () const |
| Returns end() iterator of outgoing edges. | |
| ConstEdgeIterator | inEdgesBegin () const |
| Returns begin() iterator of incoming edges. | |
| ConstEdgeIterator | inEdgesEnd () const |
| Returns end() iterator of incoming edges. | |
| Size | incomingEdgesCount () |
| Returns the number of incoming edges. | |
| Size | outgoingEdgesCount () |
| Returns the number of outgoing edges. | |
| void | addInEdge (TOPPASEdge *edge) |
| Adds an incoming edge. | |
| void | addOutEdge (TOPPASEdge *edge) |
| Adds an outgoing edge. | |
| void | removeInEdge (TOPPASEdge *edge) |
| Removes an incoming edge. | |
| void | removeOutEdge (TOPPASEdge *edge) |
| Removes an outgoing edge. | |
| DFS_COLOR | getDFSColor () |
| Returns the DFS color of this node. | |
| void | setDFSColor (DFS_COLOR color) |
| Sets the DFS color of this node. | |
| TOPPASVertex * | getDFSParent () |
| Returns the DFS parent of this node. | |
| void | setDFSParent (TOPPASVertex *parent) |
| Sets the DFS parent of this node. | |
| TOPPASVertex::SUBSTREESTATUS | getSubtreeStatus () const |
| Checks if all tools in the subtree below this node are finished. | |
| bool | isTopoSortMarked () |
| Returns whether the vertex has been marked already (during topological sort). | |
| void | setTopoSortMarked (bool b) |
| (Un)marks the vertex (during topological sort) | |
| UInt | getTopoNr () |
| Returns the topological sort number. | |
| virtual void | setTopoNr (UInt nr) |
| Sets the topological sort number (overridden in tool and output vertices). | |
| virtual void | reset (bool reset_all_files=false) |
| Resets the status. | |
| virtual void | markUnreachable () |
| Marks this node (and everything further downstream) as unreachable. Overridden behavior in mergers. | |
| bool | isReachable () |
| Returns whether this node is reachable. | |
| bool | isFinished () const |
| Returns whether this node has already been processed during the current pipeline execution. | |
| virtual void | run () |
| virtual bool | invertRecylingMode () |
| invert status of recycling | |
| bool | isRecyclingEnabled () const |
| get status of recycling | |
| void | setRecycling (const bool is_enabled) |
| set status of recycling | |
| virtual String | getName () const =0 |
| QStringList | getFileNames (int param_index, int round) const |
| gets filenames for a certain output parameter (from this vertex), for a certain TOPPAS round | |
| QStringList | getFileNames () const |
| get all output files for all parameters for all rounds | |
| const RoundPackages & | getOutputFiles () const |
| bool | allInputsReady () |
| check if all upstream nodes are finished | |
Protected Member Functions | |
| virtual void | moveNewEdgeTo_ (const QPointF &pos) |
Moves the target pos of the edge which is just being created to pos. | |
| String | get3CharsNumber_ (UInt number) const |
Returns a three character string (i.e. 001 instead of 1) for the given number. | |
| void | debugOut_ (const String &) const |
Displays the debug output message, if TOPPAS_DEBUG is defined. | |
reimplemented Qt events | |
| void | mouseReleaseEvent (QGraphicsSceneMouseEvent *e) |
| void | mousePressEvent (QGraphicsSceneMouseEvent *e) |
| void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *e) |
| void | mouseMoveEvent (QGraphicsSceneMouseEvent *e) |
| void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) |
Protected Attributes | |
| EdgeContainer | in_edges_ |
| The list of incoming edges. | |
| EdgeContainer | out_edges_ |
| The list of outgoing edges. | |
| bool | edge_being_created_ |
| Indicates whether a new out edge is currently being created. | |
| QColor | pen_color_ |
| The color of the pen. | |
| QColor | brush_color_ |
| The color of the brush. | |
| DFS_COLOR | dfs_color_ |
| The DFS color of this node. | |
| TOPPASVertex * | dfs_parent_ |
| The DFS parent of this node. | |
| bool | topo_sort_marked_ |
| "marked" flag for topological sort | |
| UInt | topo_nr_ |
| The number in a topological sort of the entire graph. | |
| RoundPackages | output_files_ |
| Stores the current output file names for each output parameter. | |
| int | round_total_ |
| number of rounds this node will do ('Merge All' nodes will pass everything, thus do only one round) | |
| int | round_counter_ |
| currently finished number of rounds (TODO: do we need that?) | |
| bool | finished_ |
| Stores whether this node has already been processed during the current pipeline execution. | |
| bool | reachable_ |
| Indicates whether this node is reachable (i.e. there is an input node somewhere further upstream). | |
| bool | allow_output_recycling_ |
| shall subsequent tools be allowed to recycle the output of this node to match the number of rounds imposed by other parent nodes? | |
The base class of the different vertex classes.
This class contains the common functionality (such as event handling for mouse clicks and drags) and holds the common members of all different kinds of vertices (e.g., containers for all in and out edges, the vertex ID, the number of a topological sort of the whole graph, etc.)
| typedef EdgeContainer::const_iterator ConstEdgeIterator |
A const iterator for in/out edges.
| typedef QList<TOPPASEdge *> EdgeContainer |
The container for in/out edges.
| typedef EdgeContainer::iterator EdgeIterator |
A mutable iterator for in/out edges.
| typedef std::map<Int, VertexRoundPackage> RoundPackage |
all infos to process one round for a vertex (from all incoming vertices) indexing via "parameter_index" of adjacent edge (could later be param_name) -> filenames Index for input and output edges is (-1) implicitly, thus we need signed type warning: the index refers to either input OR output (depending on if this structure is used for input files storage or output files storage)
| typedef RoundPackage::const_iterator RoundPackageConstIt |
| typedef RoundPackage::iterator RoundPackageIt |
| typedef std::vector<RoundPackage> RoundPackages |
all information a node needs to process all rounds
| enum DFS_COLOR |
| enum SUBSTREESTATUS |
| TOPPASVertex | ( | ) |
Default Constructor.
| TOPPASVertex | ( | const TOPPASVertex & | rhs | ) |
Copy constructor.
| virtual ~TOPPASVertex | ( | ) | [virtual] |
Destructor.
| void addInEdge | ( | TOPPASEdge * | edge | ) |
Adds an incoming edge.
| void addOutEdge | ( | TOPPASEdge * | edge | ) |
Adds an outgoing edge.
| bool allInputsReady | ( | ) |
check if all upstream nodes are finished
Reimplemented in TOPPASMergerVertex.
| virtual QRectF boundingRect | ( | ) | const [pure virtual] |
Returns the bounding rectangle of this item.
Implemented in TOPPASInputFileListVertex, TOPPASMergerVertex, TOPPASOutputFileListVertex, and TOPPASToolVertex.
| bool buildRoundPackages | ( | RoundPackages & | pkg, | |
| String & | error_msg | |||
| ) |
get the round package for this node from upstream -- indices in 'RoundPackage' mapping are thus referring to incoming edges of this node returns false on failure
| void clicked | ( | ) | [signal] |
Emitted when this item is clicked.
| void contextMenuEvent | ( | QGraphicsSceneContextMenuEvent * | event | ) | [protected] |
| void debugOut_ | ( | const String & | ) | const [inline, protected] |
Displays the debug output message, if TOPPAS_DEBUG is defined.
| void finishHoveringEdge | ( | ) | [signal] |
Emitted when the mouse is released after having dragged a new edge somewhere.
Returns a three character string (i.e. 001 instead of 1) for the given number.
| DFS_COLOR getDFSColor | ( | ) |
Returns the DFS color of this node.
| TOPPASVertex* getDFSParent | ( | ) |
Returns the DFS parent of this node.
| QStringList getFileNames | ( | int | param_index, | |
| int | round | |||
| ) | const |
gets filenames for a certain output parameter (from this vertex), for a certain TOPPAS round
| QStringList getFileNames | ( | ) | const |
get all output files for all parameters for all rounds
| virtual String getName | ( | ) | const [pure virtual] |
Implemented in TOPPASInputFileListVertex, TOPPASMergerVertex, TOPPASOutputFileListVertex, and TOPPASToolVertex.
| const RoundPackages& getOutputFiles | ( | ) | const |
| TOPPASVertex::SUBSTREESTATUS getSubtreeStatus | ( | ) | const |
Checks if all tools in the subtree below this node are finished.
| UInt getTopoNr | ( | ) |
Returns the topological sort number.
Referenced by TOPPASBase::toolStarted().
| void hoveringEdgePosChanged | ( | const QPointF & | new_pos | ) | [signal] |
Emitted when the position of the hovering edge changes.
| Size incomingEdgesCount | ( | ) |
Returns the number of incoming edges.
| virtual void inEdgeHasChanged | ( | ) | [virtual, slot] |
Called by an incoming edge when it has changed.
Reimplemented in TOPPASOutputFileListVertex, and TOPPASToolVertex.
| ConstEdgeIterator inEdgesBegin | ( | ) | const |
Returns begin() iterator of incoming edges.
| ConstEdgeIterator inEdgesEnd | ( | ) | const |
Returns end() iterator of incoming edges.
| virtual bool invertRecylingMode | ( | ) | [virtual] |
invert status of recycling
Reimplemented in TOPPASToolVertex.
| bool isFinished | ( | ) | const |
Returns whether this node has already been processed during the current pipeline execution.
| bool isReachable | ( | ) |
Returns whether this node is reachable.
| bool isRecyclingEnabled | ( | ) | const |
get status of recycling
| bool isTopoSortMarked | ( | ) |
Returns whether the vertex has been marked already (during topological sort).
| bool isUpstreamFinished | ( | ) | const |
check if all upstream nodes are ready to go ( 'finished_' is true)
| void itemDragged | ( | qreal | dx, | |
| qreal | dy | |||
| ) | [signal] |
Emitted when the item is dragged.
| virtual void markUnreachable | ( | ) | [virtual] |
Marks this node (and everything further downstream) as unreachable. Overridden behavior in mergers.
Reimplemented in TOPPASMergerVertex.
| void mouseDoubleClickEvent | ( | QGraphicsSceneMouseEvent * | e | ) | [protected] |
Reimplemented in TOPPASInputFileListVertex, TOPPASMergerVertex, and TOPPASToolVertex.
| void mouseMoveEvent | ( | QGraphicsSceneMouseEvent * | e | ) | [protected] |
| void mousePressEvent | ( | QGraphicsSceneMouseEvent * | e | ) | [protected] |
| void mouseReleaseEvent | ( | QGraphicsSceneMouseEvent * | e | ) | [protected] |
| virtual void moveNewEdgeTo_ | ( | const QPointF & | pos | ) | [protected, virtual] |
Moves the target pos of the edge which is just being created to pos.
| void newHoveringEdge | ( | const QPointF & | pos | ) | [signal] |
Emitted when a new out edge is supposed to be created.
| TOPPASVertex& operator= | ( | const TOPPASVertex & | rhs | ) |
Assignment operator.
| virtual void outEdgeHasChanged | ( | ) | [virtual, slot] |
Called by an outgoing edge when it has changed.
Reimplemented in TOPPASInputFileListVertex, and TOPPASToolVertex.
| ConstEdgeIterator outEdgesBegin | ( | ) | const |
Returns begin() iterator of outgoing edges.
| ConstEdgeIterator outEdgesEnd | ( | ) | const |
Returns end() iterator of outgoing edges.
| Size outgoingEdgesCount | ( | ) |
Returns the number of outgoing edges.
| virtual void paint | ( | QPainter * | painter, | |
| const QStyleOptionGraphicsItem * | option, | |||
| QWidget * | widget | |||
| ) | [pure virtual] |
Paints the item.
Implemented in TOPPASInputFileListVertex, TOPPASMergerVertex, TOPPASOutputFileListVertex, and TOPPASToolVertex.
| void parameterChanged | ( | const bool | invalidates_running_pipeline | ) | [signal] |
Emitted if an INI parameter or recyling mode or whatever was edited by the user - depending on the current state of the tool an action is taken each node type decides itself if this will invalide the pipeline, depending on its internal status
| void released | ( | ) | [signal] |
Emitted when this item is released.
| void removeInEdge | ( | TOPPASEdge * | edge | ) |
Removes an incoming edge.
| void removeOutEdge | ( | TOPPASEdge * | edge | ) |
Removes an outgoing edge.
| virtual void reset | ( | bool | reset_all_files = false |
) | [virtual] |
Resets the status.
Reimplemented in TOPPASOutputFileListVertex, and TOPPASToolVertex.
| virtual void run | ( | ) | [virtual] |
run the tool (either ToolVertex, Merger, or OutputNode)
| NotImplemented |
Reimplemented in TOPPASInputFileListVertex, TOPPASMergerVertex, TOPPASOutputFileListVertex, and TOPPASToolVertex.
| void setDFSColor | ( | DFS_COLOR | color | ) |
Sets the DFS color of this node.
| void setDFSParent | ( | TOPPASVertex * | parent | ) |
Sets the DFS parent of this node.
| void setRecycling | ( | const bool | is_enabled | ) |
set status of recycling
| virtual void setTopoNr | ( | UInt | nr | ) | [virtual] |
Sets the topological sort number (overridden in tool and output vertices).
Reimplemented in TOPPASOutputFileListVertex, and TOPPASToolVertex.
| void setTopoSortMarked | ( | bool | b | ) |
(Un)marks the vertex (during topological sort)
| virtual QPainterPath shape | ( | ) | const [pure virtual] |
Returns a more precise shape.
Implemented in TOPPASInputFileListVertex, TOPPASMergerVertex, TOPPASOutputFileListVertex, and TOPPASToolVertex.
| void somethingHasChanged | ( | ) | [signal] |
Emitted when something has changed.
bool allow_output_recycling_ [protected] |
shall subsequent tools be allowed to recycle the output of this node to match the number of rounds imposed by other parent nodes?
QColor brush_color_ [protected] |
The color of the brush.
DFS_COLOR dfs_color_ [protected] |
The DFS color of this node.
TOPPASVertex* dfs_parent_ [protected] |
The DFS parent of this node.
bool edge_being_created_ [protected] |
Indicates whether a new out edge is currently being created.
bool finished_ [protected] |
Stores whether this node has already been processed during the current pipeline execution.
EdgeContainer in_edges_ [protected] |
The list of incoming edges.
EdgeContainer out_edges_ [protected] |
The list of outgoing edges.
RoundPackages output_files_ [protected] |
Stores the current output file names for each output parameter.
QColor pen_color_ [protected] |
The color of the pen.
bool reachable_ [protected] |
Indicates whether this node is reachable (i.e. there is an input node somewhere further upstream).
int round_counter_ [protected] |
currently finished number of rounds (TODO: do we need that?)
int round_total_ [protected] |
number of rounds this node will do ('Merge All' nodes will pass everything, thus do only one round)
bool topo_sort_marked_ [protected] |
"marked" flag for topological sort
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:58 using doxygen 1.7.1 |