OpenMS
PythonModuleRequirement.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: Chris Bielow $
6 // $Authors: Chris Bielow $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
12 
13 #include <QWidget>
14 
15 namespace Ui
16 {
18 }
19 
20 namespace OpenMS
21 {
22  namespace Internal
23  {
26  class OPENMS_GUI_DLLAPI PythonModuleRequirement : public QWidget
27  {
28  Q_OBJECT
29 
30  public:
31  explicit PythonModuleRequirement(QWidget* parent = nullptr);
33 
35  void setTitle(const QString& title);
36 
38  void setRequiredModules(const QStringList& m);
39 
41  void setFreeText(const QString& text);
42 
44  bool isReady() const { return is_ready_;};
45 
46 
47  signals:
49  void valueChanged(QStringList& valid_modules, QStringList& missing_modules);
50 
51 
52  public slots:
54  void validate(const QString& python_exe);
55 
56  private:
57  QStringList required_modules_;
58  QString info_text_;
59  bool is_ready_ = false;
60 
62  };
63 
64  } // ns Internal
65 } // ns OpenMS
66 
67 // this is required to allow Ui_SwathTabWidget (auto UIC'd from .ui) to have a PythonModuleRequirement member
OpenMS::Internal::PythonModuleRequirement PythonModuleRequirement
Definition: PythonModuleRequirement.h:68
Definition: PythonModuleRequirement.h:27
bool isReady() const
are all modules present?
Definition: PythonModuleRequirement.h:44
Ui::PythonModuleRequirement * ui_
Definition: PythonModuleRequirement.h:61
QString info_text_
additional text to display for the user
Definition: PythonModuleRequirement.h:58
QStringList required_modules_
list of modules which are needed (order might be important – know your Python...)
Definition: PythonModuleRequirement.h:57
void setFreeText(const QString &text)
some arbitrary description for the user to display statically
void setRequiredModules(const QStringList &m)
a list of python modules required for a certain functionality/script
PythonModuleRequirement(QWidget *parent=nullptr)
void setTitle(const QString &title)
change the label of the surrounding box
void valueChanged(QStringList &valid_modules, QStringList &missing_modules)
emitted whenever the requirement check was executed...
void validate(const QString &python_exe)
re-evaluate the presence of modules, based on a new python version
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Definition: FLASHDeconvWizardBase.h:37