OpenMS
TOPPASMergerVertex.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Johannes Veit $
6 // $Authors: Johannes Junker, Chris Bielow $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 // OpenMS_GUI config
12 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
13 
15 
16 namespace OpenMS
17 {
32 class OPENMS_GUI_DLLAPI TOPPASMergerVertex : public TOPPASVertex
33 {
34  Q_OBJECT
35 
36 public:
38  TOPPASMergerVertex() = default;
40  TOPPASMergerVertex(bool round_based);
42  TOPPASMergerVertex(const TOPPASMergerVertex& rhs) = default;
44  ~TOPPASMergerVertex() override = default;
47 
48  virtual std::unique_ptr<TOPPASVertex> clone() const override;
49 
51  String getName() const override;
53  void run() override;
55  bool roundBasedMode() const;
56  // documented in base class
57  void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override;
58  // documented in base class
59  QRectF boundingRect() const override;
60  // documented in base class
61  void markUnreachable() override;
62 
63 public slots:
64 
65 signals:
67  void mergeFailed(const QString message);
68 
69 protected:
70 
72  bool round_based_mode_{true};
73  };
74 }
75 
A more convenient string class.
Definition: String.h:34
A special vertex that allows to merge several inputs.
Definition: TOPPASMergerVertex.h:33
bool roundBasedMode() const
Determines whether this merger is merging round based or merging all inputs into one list.
virtual std::unique_ptr< TOPPASVertex > clone() const override
Make a copy of this vertex on the heap and return a pointer to it (useful for copying nodes)
TOPPASMergerVertex & operator=(const TOPPASMergerVertex &rhs)=default
Assignment operator.
TOPPASMergerVertex()=default
Default constructor.
void markUnreachable() override
Marks this node (and everything further downstream) as unreachable. Overridden behavior in mergers.
TOPPASMergerVertex(bool round_based)
Constructor.
~TOPPASMergerVertex() override=default
Destructor.
String getName() const override
returns "MergerVertex"
QRectF boundingRect() const override
Returns the bounding rectangle of this item.
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
void run() override
check if upstream nodes are finished and call downstream nodes
TOPPASMergerVertex(const TOPPASMergerVertex &rhs)=default
Copy constructor.
void mergeFailed(const QString message)
Emitted when merging upstream data failed.
The base class of the different vertex classes.
Definition: TOPPASVertex.h:78
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19