OpenMS
FLASHDeconvTabWidget.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2023.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Jihyung Kim $
32 // $Authors: Jihyung Kim $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
37 // OpenMS_GUI config
43 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
45 #include <QTabWidget> // our base class
46 #include <utility> // for std::pair
47 #include <vector>
48 
49 namespace Ui
50 {
51  class FLASHDeconvTabWidget;
52 }
53 
54 namespace OpenMS
55 {
56  class InputFile;
57  class OutputDirectory;
58  class ParamEditor;
59 
60 
61  namespace Internal
62  {
63  class FLASHDeconvTabWidget;
64 
66  class OPENMS_GUI_DLLAPI FLASHDeconvTabWidget : public QTabWidget
67  {
68  Q_OBJECT
69 
70  public:
71  template <typename> friend class WizardGUILock;
72 
74  explicit FLASHDeconvTabWidget(QWidget* parent = nullptr);
77 
80 
81  private slots:
86  void broadcastNewCWD_(const QString& new_cwd);
87 
88  private:
91 
94 
96  void updateOutputParamFromPerInputFile(const QString& input_file_name);
97 
100 
102  QString getCurrentOutDir_() const;
103 
107  void writeLog_(const QString& text, const QColor& color = "#000000", bool new_section = false);
109  void writeLog_(const String& text, const QColor& color = "#000000", bool new_section = false);
110 
114 
115  Ui::FLASHDeconvTabWidget* ui;
119 
121  };
122 
123  } // namespace Internal
124 } // namespace OpenMS
125 
126 // this is required to allow Ui_FLASHDeconvTabWidget (auto UIC'd from .ui) to have a InputFile member
OpenMS::InputFile InputFile
Definition: FLASHDeconvTabWidget.h:127
OpenMS::OutputDirectory OutputDirectory
Definition: FLASHDeconvTabWidget.h:128
OpenMS::ParamEditor ParamEditor
Definition: FLASHDeconvTabWidget.h:129
A wrapper around ExternalProcess to conveniently show a MessageBox when an error occurs.
Definition: ExternalProcessMBox.h:55
A simple widget with a line-edit and a browse button to choose filenames.
Definition: gui/include/OpenMS/VISUAL/InputFile.h:57
A multi-tabbed widget for the FLASHDeconvWizard offering setting of parameters, input-file specificat...
Definition: FLASHDeconvTabWidget.h:67
FLASHDeconvTabWidget(QWidget *parent=nullptr)
constructor
void updateFLASHDeconvParamFromWidgets_()
collect all parameters throughout the Wizard's controls and update 'flashdeconv_param_'
Ui::FLASHDeconvTabWidget * ui
Definition: FLASHDeconvTabWidget.h:115
ExternalProcessMBox ep_
to run external programs and pipe their output into our log
Definition: FLASHDeconvTabWidget.h:120
void writeLog_(const QString &text, const QColor &color="#000000", bool new_section=false)
Param flashdeconv_param_outputs_
Parameter set for different output formats.
Definition: FLASHDeconvTabWidget.h:117
void updateOutputParamFromWidgets_()
collect output format parameters from the Wizard's control and update 'flashdeconv_output_tags_'
StringList getMzMLInputFiles() const
get all the input mzML files as a string list
Param flashdeconv_param_
the global FLASHDeconv parameters which will be passed to FLASHDeconv.exe, once updated with paramete...
Definition: FLASHDeconvTabWidget.h:116
QString getCurrentOutDir_() const
where to write output
void setWidgetsfromFDDefaultParam_()
update Widgets given a param object
void writeLog_(const String &text, const QColor &color="#000000", bool new_section=false)
convenient overload for String
void broadcastNewCWD_(const QString &new_cwd)
update the current working directory for all file input fields
void updateOutputParamFromPerInputFile(const QString &input_file_name)
update 'flashdeconv_param_outputs' with given input file name
StringList flashdeconv_output_tags_
list of output parameter names checked by the user
Definition: FLASHDeconvTabWidget.h:118
RAII class to switch to certain TabWidget, disable the GUI and go back to the orignal Tab when this c...
Definition: WizardHelper.h:50
A simple widget with a line-edit and a browse button to choose filenames.
Definition: OutputDirectory.h:57
A GUI for editing or viewing a Param object.
Definition: ParamEditor.h:180
Management and storage of parameters / INI files.
Definition: Param.h:70
A more convenient string class.
Definition: String.h:60
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48
Definition: FLASHDeconvWizardBase.h:63