44 #define __DEBUG_BEGIN_METHOD__ \ 46 for (int dbg_indnt_cntr = 0; dbg_indnt_cntr < global_debug_indent_; ++dbg_indnt_cntr) \ 50 std::cout << "BEGIN [" << topo_nr_ << "] " << OPENMS_PRETTY_FUNCTION << std::endl; \ 51 ++global_debug_indent_; \ 54 #define __DEBUG_END_METHOD__ \ 56 --global_debug_indent_; \ 57 if (global_debug_indent_ < 0) global_debug_indent_ = 0; \ 58 for (int dbg_indnt_cntr = 0; dbg_indnt_cntr < global_debug_indent_; ++dbg_indnt_cntr) \ 62 std::cout << "END [" << topo_nr_ << "] " << OPENMS_PRETTY_FUNCTION << std::endl; \ 65 #define __DEBUG_BEGIN_METHOD__ {} 66 #define __DEBUG_END_METHOD__ {} 72 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h> 78 #include <QPainterPath> 79 #include <QtWidgets/QGraphicsSceneMouseEvent> 80 #include <QtWidgets/QGraphicsSceneContextMenuEvent> 81 #include <QtWidgets/QGraphicsItem> 82 #include <QtCore/QProcess> 83 #include <QtWidgets/QMenu> 126 const QStringList&
get()
const;
127 const QString& operator[](
int i)
const;
131 void set(
const QStringList& filenames);
132 void set(
const QString& filename,
int i);
133 void push_back(
const QString& filename);
134 void append(
const QStringList& filenames);
144 void check_(
const QString& filename);
187 TV_UNFINISHED_INBRANCH
202 bool buildRoundPackages(RoundPackages & pkg,
String & error_msg);
205 bool isUpstreamFinished()
const;
208 QRectF boundingRect()
const override = 0;
210 QPainterPath shape()
const override = 0;
212 void paint(QPainter * painter,
const QStyleOptionGraphicsItem * option,
QWidget * widget)
override = 0;
214 ConstEdgeIterator outEdgesBegin()
const;
216 ConstEdgeIterator outEdgesEnd()
const;
218 ConstEdgeIterator inEdgesBegin()
const;
220 ConstEdgeIterator inEdgesEnd()
const;
222 Size incomingEdgesCount();
224 Size outgoingEdgesCount();
234 DFS_COLOR getDFSColor();
236 void setDFSColor(DFS_COLOR color);
244 bool isTopoSortMarked();
246 void setTopoSortMarked(
bool b);
250 virtual void setTopoNr(
UInt nr);
253 virtual void reset(
bool reset_all_files =
false);
255 virtual void markUnreachable();
259 bool isFinished()
const;
264 virtual bool invertRecylingMode();
266 bool isRecyclingEnabled()
const;
268 void setRecycling(
const bool is_enabled);
271 virtual String getName()
const = 0;
278 QStringList getFileNames(
int param_index,
int round)
const;
281 QStringList getFileNames()
const;
284 const RoundPackages & getOutputFiles()
const;
288 bool allInputsReady();
294 virtual void inEdgeHasChanged();
296 virtual void outEdgeHasChanged();
305 void hoveringEdgePosChanged(
const QPointF & new_pos);
307 void newHoveringEdge(
const QPointF & pos);
309 void finishHoveringEdge();
311 void somethingHasChanged();
313 void itemDragged(qreal dx, qreal dy);
316 void parameterChanged(
const bool invalidates_running_pipeline);
354 static int global_debug_indent_;
359 void mouseReleaseEvent(QGraphicsSceneMouseEvent * e)
override;
360 void mousePressEvent(QGraphicsSceneMouseEvent * e)
override;
361 void mouseDoubleClickEvent(QGraphicsSceneMouseEvent * e)
override;
362 void mouseMoveEvent(QGraphicsSceneMouseEvent * e)
override;
363 void contextMenuEvent(QGraphicsSceneContextMenuEvent * event)
override;
367 virtual void moveNewEdgeTo_(
const QPointF & pos);
379 for (
int i = 0; i < global_debug_indent_; ++i)
383 std::cout <<
"[" << topo_nr_ <<
"] " << message << std::endl;
TOPPASEdge * edge
edge that connects the upstream node to the current one
Definition: TOPPASVertex.h:157
Definition: TOPPASVertex.h:118
TOPPASFilenames filenames
filenames passed from upstream node in this round
Definition: TOPPASVertex.h:156
bool edge_being_created_
Indicates whether a new out edge is currently being created.
Definition: TOPPASVertex.h:325
QColor pen_color_
The color of the pen.
Definition: TOPPASVertex.h:327
DFS_COLOR
The color of a vertex during depth-first search.
Definition: TOPPASVertex.h:175
RoundPackage::iterator RoundPackageIt
Definition: TOPPASVertex.h:169
A more convenient string class.
Definition: String.h:57
RoundPackage::const_iterator RoundPackageConstIt
Definition: TOPPASVertex.h:168
bool finished_
Stores whether this node has already been processed during the current pipeline execution.
Definition: TOPPASVertex.h:345
Definition: TOPPASVertex.h:186
void debugOut_(const String &) const
Displays the debug output message, if TOPPAS_DEBUG is defined.
Definition: TOPPASVertex.h:372
The base class of the different vertex classes.
Definition: TOPPASVertex.h:100
std::map< Int, VertexRoundPackage > RoundPackage
Definition: TOPPASVertex.h:167
Info for one edge and round, to be passed to next node.
Definition: TOPPASVertex.h:148
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
bool allow_output_recycling_
shall subsequent tools be allowed to recycle the output of this node to match the number of rounds im...
Definition: TOPPASVertex.h:349
TOPPASVertex * dfs_parent_
The DFS parent of this node.
Definition: TOPPASVertex.h:333
DFS_COLOR dfs_color_
The DFS color of this node.
Definition: TOPPASVertex.h:331
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
An edge representing a data flow in TOPPAS.
Definition: TOPPASEdge.h:59
SUBSTREESTATUS
The color of a vertex during depth-first search.
Definition: TOPPASVertex.h:183
T round(T x)
Rounds the value.
Definition: MathFunctions.h:138
EdgeContainer::iterator EdgeIterator
A mutable iterator for in/out edges.
Definition: TOPPASVertex.h:112
EdgeContainer out_edges_
The list of outgoing edges.
Definition: TOPPASVertex.h:323
int round_total_
number of rounds this node will do ('Merge All' nodes will pass everything, thus do only one round) ...
Definition: TOPPASVertex.h:341
Definition: TOPPASVertex.h:177
Definition: TOPPASVertex.h:185
bool reachable_
Indicates whether this node is reachable (i.e. there is an input node somewhere further upstream) ...
Definition: TOPPASVertex.h:347
std::vector< RoundPackage > RoundPackages
all information a node needs to process all rounds
Definition: TOPPASVertex.h:172
QStringList filenames_
filenames passed from upstream node in this round
Definition: TOPPASVertex.h:145
EdgeContainer in_edges_
The list of incoming edges.
Definition: TOPPASVertex.h:321
RoundPackages output_files_
Stores the current output file names for each output parameter.
Definition: TOPPASVertex.h:339
TOPPASFilenames()
Definition: TOPPASVertex.h:121
QList< TOPPASEdge * > EdgeContainer
The container for in/out edges.
Definition: TOPPASVertex.h:110
Definition: TOPPASVertex.h:178
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
VertexRoundPackage()
Definition: TOPPASVertex.h:150
QColor brush_color_
The color of the brush.
Definition: TOPPASVertex.h:329
EdgeContainer::const_iterator ConstEdgeIterator
A const iterator for in/out edges.
Definition: TOPPASVertex.h:114
bool topo_sort_marked_
"marked" flag for topological sort
Definition: TOPPASVertex.h:335
UInt topo_nr_
The number in a topological sort of the entire graph.
Definition: TOPPASVertex.h:337
int round_counter_
currently finished number of rounds (TODO: do we need that?)
Definition: TOPPASVertex.h:343