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> 77 #include <QPainterPath> 78 #include <QtWidgets/QGraphicsSceneMouseEvent> 79 #include <QtWidgets/QGraphicsSceneContextMenuEvent> 80 #include <QtWidgets/QGraphicsItem> 81 #include <QtCore/QProcess> 82 #include <QtWidgets/QMenu> 83 #include <QStringList> 124 const QStringList&
get()
const;
125 const QString& operator[](
int i)
const;
129 void set(
const QStringList& filenames);
130 void set(
const QString& filename,
int i);
131 void push_back(
const QString& filename);
132 void append(
const QStringList& filenames);
135 QStringList getSuffixCounts()
const;
144 void check_(
const QString& filename);
179 TV_UNFINISHED_INBRANCH
191 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* ,
QWidget* ,
bool round_shape =
true);
196 bool buildRoundPackages(RoundPackages & pkg,
String & error_msg);
199 bool isUpstreamFinished()
const;
202 QRectF boundingRect()
const override = 0;
204 QPainterPath shape() const final;
206 ConstEdgeIterator outEdgesBegin() const;
208 ConstEdgeIterator outEdgesEnd() const;
210 ConstEdgeIterator inEdgesBegin() const;
212 ConstEdgeIterator inEdgesEnd() const;
214 Size incomingEdgesCount();
216 Size outgoingEdgesCount();
226 DFS_COLOR getDFSColor();
228 void setDFSColor(DFS_COLOR color);
232 bool isTopoSortMarked() const;
234 void setTopoSortMarked(
bool b);
236 UInt getTopoNr() const;
238 virtual
void setTopoNr(
UInt nr);
241 virtual
void reset(
bool reset_all_files = false);
243 virtual
void markUnreachable();
245 bool isReachable() const;
247 bool isFinished() const;
252 virtual
bool invertRecylingMode();
254 bool isRecyclingEnabled() const;
256 void setRecycling(const
bool is_enabled);
259 virtual
String getName() const = 0;
266 QStringList getFileNames(
int param_index,
int round) const;
269 QStringList getFileNames() const;
272 const RoundPackages & getOutputFiles() const;
276 bool allInputsReady() const;
282 virtual
void inEdgeHasChanged();
284 virtual
void outEdgeHasChanged();
293 void hoveringEdgePosChanged(const QPointF & new_pos);
295 void newHoveringEdge(const QPointF & pos);
297 void finishHoveringEdge();
299 void somethingHasChanged();
301 void itemDragged(qreal dx, qreal dy);
304 void parameterChanged(const
bool invalidates_running_pipeline);
313 bool edge_being_created_{
false};
315 QColor pen_color_{Qt::black};
317 QColor brush_color_{ Qt::lightGray};
321 bool topo_sort_marked_{
false};
327 int round_total_{-1};
329 int round_counter_{0};
331 bool finished_{
false};
333 bool reachable_{
true};
335 bool allow_output_recycling_{
false};
340 static int global_debug_indent_;
345 void mouseReleaseEvent(QGraphicsSceneMouseEvent * e)
override;
346 void mousePressEvent(QGraphicsSceneMouseEvent * e)
override;
347 void mouseDoubleClickEvent(QGraphicsSceneMouseEvent * e)
override;
348 void mouseMoveEvent(QGraphicsSceneMouseEvent * e)
override;
349 void contextMenuEvent(QGraphicsSceneContextMenuEvent * event)
override;
353 virtual void moveNewEdgeTo_(
const QPointF & pos);
365 for (
int i = 0; i < global_debug_indent_; ++i)
369 std::cout <<
"[" << topo_nr_ <<
"] " << message << std::endl;
Definition: TOPPASVertex.h:118
DFS_COLOR
The color of a vertex during depth-first search.
Definition: TOPPASVertex.h:167
RoundPackage::iterator RoundPackageIt
Definition: TOPPASVertex.h:161
A more convenient string class.
Definition: String.h:58
RoundPackage::const_iterator RoundPackageConstIt
Definition: TOPPASVertex.h:160
some direct downstream node is not done
Definition: TOPPASVertex.h:178
void debugOut_(const String &) const
Displays the debug output message, if TOPPAS_DEBUG is defined.
Definition: TOPPASVertex.h:358
The base class of the different vertex classes.
Definition: TOPPASVertex.h:100
std::map< Int, VertexRoundPackage > RoundPackage
Definition: TOPPASVertex.h:159
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
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:175
T round(T x)
Rounds the value.
Definition: MathFunctions.h:210
EdgeContainer::iterator EdgeIterator
A mutable iterator for in/out edges.
Definition: TOPPASVertex.h:111
TOPPASFilenames filenames
filenames passed from upstream node in this round
Definition: TOPPASVertex.h:151
Definition: TOPPASVertex.h:169
all downstream nodes are done (including the ones which are feed by a parallel subtree) ...
Definition: TOPPASVertex.h:177
std::vector< RoundPackage > RoundPackages
all information a node needs to process all rounds
Definition: TOPPASVertex.h:164
QStringList filenames_
filenames passed from upstream node in this round
Definition: TOPPASVertex.h:145
RoundPackages output_files_
Stores the current output file names for each output parameter.
Definition: TOPPASVertex.h:325
void append(const T &i, String &target)
Definition: StringConversions.h:118
QList< TOPPASEdge * > EdgeContainer
The container for in/out edges.
Definition: TOPPASVertex.h:109
Definition: TOPPASVertex.h:170
static String number(double d, UInt n)
Definition: StringUtils.h:217
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
EdgeContainer::const_iterator ConstEdgeIterator
A const iterator for in/out edges.
Definition: TOPPASVertex.h:113
Info for one edge and round, to be passed to next node.
Definition: TOPPASVertex.h:149
UInt topo_nr_
The number in a topological sort of the entire graph.
Definition: TOPPASVertex.h:323