OpenMS
TOPPASInputFileListVertex.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 {
23 class OPENMS_GUI_DLLAPI TOPPASInputFileListVertex : public TOPPASVertex
24 {
25  Q_OBJECT
26 
27 public:
31  TOPPASInputFileListVertex(const QStringList& files);
35  ~TOPPASInputFileListVertex() override = default;
38 
39  virtual std::unique_ptr<TOPPASVertex> clone() const override;
40 
42  String getName() const override;
44  void setFilenames(const QStringList & files);
46  void run() override;
47  // documented in base class
48  void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget) override;
49  // documented in base class
50  QRectF boundingRect() const override;
58  const QString & getKey();
60  void setKey(const QString & key);
61 
62 public slots:
64  void outEdgeHasChanged() override;
65 
66 protected:
67 
69  QString key_;
70 
72  QString cwd_;
73 
75 
76  void mouseDoubleClickEvent(QGraphicsSceneMouseEvent * e) override;
78 
79  };
80 }
81 
A more convenient string class.
Definition: String.h:34
A vertex representing an input file list.
Definition: TOPPASInputFileListVertex.h:24
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)
void outEdgeHasChanged() override
Called by an outgoing edge when it has changed.
void openContainingFolder()
Opens the folders of the input files.
void setFilenames(const QStringList &files)
Sets the list of files.
const QString & getKey()
Returns the key (for applying resources from a resource file)
QString key_
The key of this input node (for applying resources from a resource file)
Definition: TOPPASInputFileListVertex.h:69
TOPPASInputFileListVertex(const TOPPASInputFileListVertex &rhs)=default
Copy constructor.
~TOPPASInputFileListVertex() override=default
Destructor.
void setKey(const QString &key)
Sets the key (for applying resources from a resource file)
TOPPASInputFileListVertex & operator=(const TOPPASInputFileListVertex &rhs)=default
Assignment operator.
void showFilesDialog()
Shows the dialog for editing the files.
QString cwd_
current working dir, i.e. the last position a file was added from
Definition: TOPPASInputFileListVertex.h:72
String getName() const override
returns "InputVertex"
TOPPASInputFileListVertex(const QStringList &files)
Constructor.
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *e) override
QRectF boundingRect() const override
Returns the bounding rectangle of this item.
TOPPASInputFileListVertex()=default
Default constructor.
bool fileNamesValid()
Checks if the given list of file names is valid.
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
void run() override
Starts all tools below this node.
The base class of the different vertex classes.
Definition: TOPPASVertex.h:78
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19