18 #define __DEBUG_BEGIN_METHOD__ \
20 for (int dbg_indnt_cntr = 0; dbg_indnt_cntr < global_debug_indent_; ++dbg_indnt_cntr) \
24 std::cout << "BEGIN [" << topo_nr_ << "] " << OPENMS_PRETTY_FUNCTION << std::endl; \
25 ++global_debug_indent_; \
28 #define __DEBUG_END_METHOD__ \
30 --global_debug_indent_; \
31 if (global_debug_indent_ < 0) global_debug_indent_ = 0; \
32 for (int dbg_indnt_cntr = 0; dbg_indnt_cntr < global_debug_indent_; ++dbg_indnt_cntr) \
36 std::cout << "END [" << topo_nr_ << "] " << OPENMS_PRETTY_FUNCTION << std::endl; \
39 #define __DEBUG_BEGIN_METHOD__ {}
40 #define __DEBUG_END_METHOD__ {}
46 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
51 #include <QPainterPath>
52 #include <QtWidgets/QGraphicsSceneMouseEvent>
53 #include <QtWidgets/QGraphicsSceneContextMenuEvent>
54 #include <QtWidgets/QGraphicsItem>
55 #include <QtCore/QProcess>
56 #include <QtWidgets/QMenu>
57 #include <QStringList>
98 const QStringList&
get()
const;
103 void set(
const QStringList& filenames);
104 void set(
const QString& filename,
int i);
106 void append(
const QStringList& filenames);
153 TV_UNFINISHED_INBRANCH
165 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* ,
QWidget* ,
bool round_shape =
true);
206 bool isTopoSortMarked() const;
208 void setTopoSortMarked(
bool b);
212 virtual
void setTopoNr(
UInt nr);
215 virtual
void reset(
bool reset_all_files = false);
217 virtual
void markUnreachable();
219 bool isReachable() const;
221 bool isFinished() const;
226 virtual
bool invertRecylingMode();
228 bool isRecyclingEnabled() const;
230 void setRecycling(const
bool is_enabled);
240 QStringList getFileNames(
int param_index,
int round) const;
243 QStringList getFileNames() const;
250 bool allInputsReady() const;
256 virtual
void inEdgeHasChanged();
258 virtual
void outEdgeHasChanged();
267 void hoveringEdgePosChanged(const QPointF & new_pos);
269 void newHoveringEdge(const QPointF & pos);
271 void finishHoveringEdge();
273 void somethingHasChanged();
275 void itemDragged(qreal dx, qreal dy);
278 void parameterChanged(const
bool invalidates_running_pipeline);
287 bool edge_being_created_{
false};
289 QColor pen_color_{Qt::black};
291 QColor brush_color_{ Qt::lightGray};
295 bool topo_sort_marked_{
false};
301 int round_total_{-1};
303 int round_counter_{0};
305 bool finished_{
false};
307 bool reachable_{
true};
309 bool allow_output_recycling_{
false};
314 static int global_debug_indent_;
339 for (
int i = 0; i < global_debug_indent_; ++i)
343 std::cout <<
"[" << topo_nr_ <<
"] " << message << std::endl;
A more convenient string class.
Definition: String.h:34
An edge representing a data flow in TOPPAS.
Definition: TOPPASEdge.h:36
Definition: TOPPASVertex.h:93
TOPPASFilenames(const QStringList &filenames)
QStringList getSuffixCounts() const
void append(const QStringList &filenames)
void push_back(const QString &filename)
const QString & operator[](int i) const
void set(const QStringList &filenames)
TOPPASFilenames()=default
const QStringList & get() const
void set(const QString &filename, int i)
QStringList filenames_
filenames passed from upstream node in this round
Definition: TOPPASVertex.h:119
void check_(const QString &filename)
The base class of the different vertex classes.
Definition: TOPPASVertex.h:77
TOPPASVertex()
Default Constructor.
QPainterPath shape() const final
Returns a more precise shape.
TOPPASVertex(const TOPPASVertex &rhs)
Copy constructor.
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) override
RoundPackages output_files_
Stores the current output file names for each output parameter.
Definition: TOPPASVertex.h:299
bool isUpstreamFinished() const
check if all upstream nodes are ready to go ( 'finished_' is true)
std::map< Int, VertexRoundPackage > RoundPackage
Definition: TOPPASVertex.h:133
~TOPPASVertex() override=default
Destructor.
TOPPASVertex & operator=(const TOPPASVertex &rhs)
Assignment operator.
std::vector< RoundPackage > RoundPackages
all information a node needs to process all rounds
Definition: TOPPASVertex.h:138
bool buildRoundPackages(RoundPackages &pkg, String &error_msg)
SUBSTREESTATUS
The color of a vertex during depth-first search.
Definition: TOPPASVertex.h:150
@ TV_ALLFINISHED
all downstream nodes are done (including the ones which are feed by a parallel subtree)
Definition: TOPPASVertex.h:151
@ TV_UNFINISHED
some direct downstream node is not done
Definition: TOPPASVertex.h:152
QList< TOPPASEdge * > EdgeContainer
The container for in/out edges.
Definition: TOPPASVertex.h:83
EdgeContainer::const_iterator ConstEdgeIterator
A const iterator for in/out edges.
Definition: TOPPASVertex.h:87
String get3CharsNumber_(UInt number) const
Returns a three character string (i.e. 001 instead of 1) for the given number.
RoundPackage::iterator RoundPackageIt
Definition: TOPPASVertex.h:135
TOPPASFilenames filenames
filenames passed from upstream node in this round
Definition: TOPPASVertex.h:125
QRectF boundingRect() const override=0
Returns the bounding rectangle of this item.
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *e) override
void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *, bool round_shape=true)
base paint method for all derived classes. should be called first in child-class paint
void debugOut_(const String &) const
Displays the debug output message, if TOPPAS_DEBUG is defined.
Definition: TOPPASVertex.h:332
DFS_COLOR
The color of a vertex during depth-first search.
Definition: TOPPASVertex.h:142
@ DFS_GRAY
Definition: TOPPASVertex.h:144
@ DFS_WHITE
Definition: TOPPASVertex.h:143
EdgeContainer::iterator EdgeIterator
A mutable iterator for in/out edges.
Definition: TOPPASVertex.h:85
UInt topo_nr_
The number in a topological sort of the entire graph.
Definition: TOPPASVertex.h:297
void mouseReleaseEvent(QGraphicsSceneMouseEvent *e) override
void mouseMoveEvent(QGraphicsSceneMouseEvent *e) override
RoundPackage::const_iterator RoundPackageConstIt
Definition: TOPPASVertex.h:134
void mousePressEvent(QGraphicsSceneMouseEvent *e) override
virtual void moveNewEdgeTo_(const QPointF &pos)
Moves the target pos of the edge which is just being created to pos.
Info for one edge and round, to be passed to next node.
Definition: TOPPASVertex.h:124
unsigned int UInt
Unsigned integer type.
Definition: Types.h:68
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:101
T round(T x)
Rounds the value.
Definition: MathFunctions.h:184
static String number(double d, UInt n)
Definition: StringUtils.h:191
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22