| OpenMS 2.5.0

ToolsDialog.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-2020.
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: Timo Sachsenberg $
32 // $Authors: Marc Sturm $
33 // --------------------------------------------------------------------------
34
35 #pragma once
36
37 // OpenMS_GUI config
38 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
39
40 #include <OpenMS/DATASTRUCTURES/Param.h>
41 #include <OpenMS/VISUAL/LayerData.h>
42
43 class QLabel;
44 class QComboBox;
45 class QPushButton;
46 class QRadioButton;
47 class QString;
48
49 #include <QtWidgets/QDialog>
50
51 namespace OpenMS
52 {
53 class ParamEditor;
54
69 class OPENMS_GUI_DLLAPI ToolsDialog :
70 public QDialog
71 {
72 Q_OBJECT
73
74 public:
83 ToolsDialog(QWidget * parent, String ini_file, String default_dir, LayerData::DataType layertype);
85 ~ToolsDialog() override;
86
88 String getOutput();
90 String getInput();
92 String getTool();
93
94 private:
96 ParamEditor * editor_;
98 QLabel * tool_desc_;
100 QComboBox * tools_combo_;
102 QComboBox * input_combo_;
104 QComboBox * output_combo_;
106 Param arg_param_;
108 Param vis_param_;
110 QPushButton * ok_button_;
112 std::map<String, String> arg_map_;
114 String ini_file_;
116 String default_dir_;
118 QString filename_;
119
121 void disable_();
123 void enable_();
124
125 protected slots:
126
128 void ok_();
130 void setTool_(int i);
132 void createINI_();
134 void loadINI_();
136 void storeINI_();
137 };
138
139 }
OpenMS::String
A more convenient string class.
Definition: String.h:58
QWidget
OpenMS::ToolsDialog::output_combo_
QComboBox * output_combo_
for choosing an output parameter
Definition: ToolsDialog.h:104
QDialog
OpenMS::ToolsDialog::vis_param_
Param vis_param_
Param for loading configuration information in the ParamEditor.
Definition: ToolsDialog.h:108
LayerData.h
OpenMS::ToolsDialog::arg_param_
Param arg_param_
Param for loading the ini-file.
Definition: ToolsDialog.h:106
OpenMS::ToolsDialog::default_dir_
String default_dir_
default-dir of ini-file to open
Definition: ToolsDialog.h:116
OpenMS::ToolsDialog::editor_
ParamEditor * editor_
ParamEditor for reading ini-files.
Definition: ToolsDialog.h:96
OpenMS::ToolsDialog::ini_file_
String ini_file_
Location of the temporary INI file this dialog works on.
Definition: ToolsDialog.h:114
OpenMS::ToolsDialog::ok_button_
QPushButton * ok_button_
ok-button connected with slot ok_()
Definition: ToolsDialog.h:110
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
Param.h
OpenMS::ToolsDialog::tool_desc_
QLabel * tool_desc_
tools description label
Definition: ToolsDialog.h:98
OpenMS::ToolsDialog
TOPP tool selection dialog.
Definition: ToolsDialog.h:69
OpenMS::ParamEditor
A GUI for editing or viewing a Param object.
Definition: ParamEditor.h:176
OpenMS::ToolsDialog::input_combo_
QComboBox * input_combo_
for choosing an input parameter
Definition: ToolsDialog.h:102
OpenMS::ToolsDialog::tools_combo_
QComboBox * tools_combo_
ComboBox for choosing a TOPP-tool.
Definition: ToolsDialog.h:100
OpenMS::Param
Management and storage of parameters / INI files.
Definition: Param.h:73
OpenMS::LayerData::DataType
DataType
Definition: LayerData.h:92
OpenMS::ToolsDialog::arg_map_
std::map< String, String > arg_map_
map for getting the parameter name from the full path in arg_param
Definition: ToolsDialog.h:112
OpenMS::ToolsDialog::filename_
QString filename_
name of ini-file
Definition: ToolsDialog.h:118