OpenMS
TOPPASResource.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Johannes Veit $
6 // $Authors: Johannes Junker $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 // OpenMS_GUI config
12 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
13 
14 #include <QtCore/QString>
15 #include <QtCore/QStringList>
16 #include <QtCore/QUrl>
17 #include <QtCore/QObject>
18 
19 namespace OpenMS
20 {
28  class OPENMS_GUI_DLLAPI TOPPASResource :
29  QObject
30  {
31  Q_OBJECT
32 
33 public:
34 
36  TOPPASResource(const QString & file);
38  TOPPASResource(const QUrl & url);
42  ~TOPPASResource() override;
46  void writeToFile(const QString & file_name);
48  const QString & getLocalFile() const;
50  const QUrl & getURL() const;
52  void fromLocalFile(const QString & file);
53 
55  static QStringList supported_schemes;
56 
57 protected:
58 
60  QUrl url_;
62  QString file_name_;
63  };
64 }
65 
Represents a data resource for TOPPAS workflows.
Definition: TOPPASResource.h:30
~TOPPASResource() override
Destructor.
const QString & getLocalFile() const
Returns the file name of the local file, or "" if it has not been written yet.
TOPPASResource(const QUrl &url)
Constructor from URL.
const QUrl & getURL() const
Returns the URL of this resource.
static QStringList supported_schemes
Supported schemes.
Definition: TOPPASResource.h:55
TOPPASResource(const QString &file)
Constructor.
QString file_name_
The name of the local file.
Definition: TOPPASResource.h:62
void writeToFile(const QString &file_name)
Writes this resource to the local file file.
void fromLocalFile(const QString &file)
Sets the URL of this resource from file.
TOPPASResource & operator=(const TOPPASResource &rhs)
Assignment operator.
QUrl url_
The URL of this resource.
Definition: TOPPASResource.h:60
TOPPASResource(const TOPPASResource &rhs)
Copy constructor.
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19