![]() |
OpenMS
|
TOPP tool selection dialog. More...
#include <OpenMS/VISUAL/DIALOGS/ToolsDialog.h>
Public Member Functions | |
| ToolsDialog (QWidget *parent, const Param ¶ms, std::string ini_file, std::string default_dir, LayerDataBase::DataType layer_type, const std::string &layer_name, TVToolDiscovery *tool_scanner) | |
| Constructor. | |
| ~ToolsDialog () override | |
| Destructor. | |
| std::string | getOutput () |
| to get the parameter name for output. Empty if no output was selected. | |
| std::string | getInput () |
| to get the parameter name for input | |
| std::string | getTool () |
| to get the currently selected tool-name | |
| std::string | getExtension () |
| get the default extension for the output file | |
Protected Slots | |
| void | ok_ () |
| if ok button pressed show the tool output in a new layer, a new window or standard output as messagebox | |
| void | setTool_ (int i) |
| Slot that handles changing of the tool. | |
| void | createINI_ () |
| Slot that retrieves and displays the defaults. | |
| void | loadINI_ () |
| loads an ini-file into the editor | |
| void | storeINI_ () |
| stores an ini-file from the editor | |
| void | reloadPlugins_ () |
| rerun the automatic plugin detection | |
| void | fastModeToggled_ (bool checked) |
| Slot toggling between fast and manual thread mode. | |
Private Member Functions | |
| void | disable_ () |
| Disables the ok button and input/output comboboxes. | |
| void | enable_ () |
| Enables the ok button and input/output comboboxes. | |
| std::vector< LayerDataBase::DataType > | getTypesFromParam_ (const Param &p) const |
| Determine all types a tool is compatible with by mapping each file extensions in a tools param. | |
| void | setInputOutputCombo_ (const Param &p) |
| Fill input_combo_ and output_combo_ box with the appropriate entries from the specified param object. | |
| QStringList | createToolsList_ () |
| Create a list of all TOPP tool/util/plugins that are compatible with the active layer type. | |
| void | initializeThreadsControls_ () |
| Populate and initialize thread controls. | |
| void | applyThreadsToSingleToolParam_ () |
| Apply the selected thread mode/value back to single_tool_param_. | |
| void | updateGUIParamFromSingleToolParam_ () |
| Build GUI-only editor parameters from internal parameter state and update the editor with them. | |
| void | mergeGUIParamIntoSingleToolParam_ () |
| Merge edited GUI-only parameters back into internal parameter state. | |
Private Attributes | |
| ParamEditor * | editor_ = nullptr |
| ParamEditor for reading ini-files. | |
| QLabel * | cpu_usage_label_ = nullptr |
| Label for CPU usage row. | |
| QWidget * | threads_widget_ = nullptr |
| Container for thread controls (FastMode + manual controls) | |
| QCheckBox * | fast_mode_checkbox_ = nullptr |
| Enables automatic use of all available threads. | |
| QComboBox * | threads_combo_ = nullptr |
| Manual thread count dropdown (1..max) | |
| const int | max_threads_ |
| Maximum available thread count from OpenMP. | |
| QLabel * | tool_desc_ |
| tools description label | |
| QComboBox * | tools_combo_ |
| ComboBox for choosing a TOPP-tool. | |
| QPushButton * | reload_plugins_button_ |
| Button to rerun the automatic plugin detection. | |
| QComboBox * | input_combo_ |
| for choosing an input parameter | |
| QComboBox * | output_combo_ |
| for choosing an output parameter | |
| Param | arg_param_ |
| Param for loading the ini-file. | |
| Param | single_tool_param_ |
| Intact tool parameters (after :1:) for the currently selected tool; used for applying changes from gui_param_ and for executing the tool. | |
| Param | gui_param_ |
| Param containing only parameters shown/edited in the ParamEditor (GUI subset) | |
| const Param | tool_params_ |
| Param object containing all TOPP tool/util params. | |
| Param | plugin_params_ |
| Param object containing all plugin params. | |
| QPushButton * | ok_button_ |
| ok-button connected with slot ok_() | |
| std::string | ini_file_ |
| Location of the temporary INI file this dialog works on. | |
| std::string | default_dir_ |
| default-dir of ini-file to open | |
| QString | filename_ |
| name of ini-file | |
| std::map< FileTypes::Type, LayerDataBase::DataType > | tool_map_ |
| Mapping of file extension to layer type to determine the type of a tool. | |
| TVToolDiscovery * | tool_scanner_ |
| Pointer to the tool scanner for access to the plugins and to rerun the plugins detection. | |
| LayerDataBase::DataType | layer_type_ |
| The layer type of the current layer to determine all usable plugins. | |
TOPP tool selection dialog.
In the dialog, the user can
This information can then be used to execute the tool.
The offered tools depend on the data type set in the constructor.
| ToolsDialog | ( | QWidget * | parent, |
| const Param & | params, | ||
| std::string | ini_file, | ||
| std::string | default_dir, | ||
| LayerDataBase::DataType | layer_type, | ||
| const std::string & | layer_name, | ||
| TVToolDiscovery * | tool_scanner | ||
| ) |
Constructor.
| [in] | parent | Qt parent widget |
| [in] | params | Containing all TOPP tool/util params |
| [in] | ini_file | The file name of the temporary INI file created by this dialog |
| [in] | default_dir | The default directory for loading and storing INI files |
| [in] | layer_type | The type of data (determines the applicable tools) |
| [in] | layer_name | The name of the selected layer |
| [in] | tool_scanner | Pointer to the tool scanner for access to the plugins and to rerun the plugins detection |
|
override |
Destructor.
|
private |
Apply the selected thread mode/value back to single_tool_param_.
|
protectedslot |
Slot that retrieves and displays the defaults.
|
private |
Create a list of all TOPP tool/util/plugins that are compatible with the active layer type.
|
private |
Disables the ok button and input/output comboboxes.
|
private |
Enables the ok button and input/output comboboxes.
|
protectedslot |
Slot toggling between fast and manual thread mode.
| std::string getExtension | ( | ) |
get the default extension for the output file
Referenced by TOPPViewBase::showTOPPDialog_().
| std::string getInput | ( | ) |
to get the parameter name for input
Referenced by TOPPViewBase::showTOPPDialog_().
| std::string getOutput | ( | ) |
to get the parameter name for output. Empty if no output was selected.
Referenced by TOPPViewBase::showTOPPDialog_().
| std::string getTool | ( | ) |
to get the currently selected tool-name
Referenced by TOPPViewBase::showTOPPDialog_().
|
private |
Determine all types a tool is compatible with by mapping each file extensions in a tools param.
|
private |
Populate and initialize thread controls.
|
protectedslot |
loads an ini-file into the editor
|
private |
Merge edited GUI-only parameters back into internal parameter state.
|
protectedslot |
if ok button pressed show the tool output in a new layer, a new window or standard output as messagebox
|
protectedslot |
rerun the automatic plugin detection
|
private |
Fill input_combo_ and output_combo_ box with the appropriate entries from the specified param object.
|
protectedslot |
Slot that handles changing of the tool.
|
protectedslot |
stores an ini-file from the editor
|
private |
Build GUI-only editor parameters from internal parameter state and update the editor with them.
|
private |
Label for CPU usage row.
|
private |
default-dir of ini-file to open
|
private |
ParamEditor for reading ini-files.
|
private |
Enables automatic use of all available threads.
|
private |
name of ini-file
|
private |
Param containing only parameters shown/edited in the ParamEditor (GUI subset)
|
private |
Location of the temporary INI file this dialog works on.
|
private |
for choosing an input parameter
|
private |
The layer type of the current layer to determine all usable plugins.
|
private |
Maximum available thread count from OpenMP.
|
private |
ok-button connected with slot ok_()
|
private |
for choosing an output parameter
|
private |
Button to rerun the automatic plugin detection.
|
private |
Intact tool parameters (after :1:) for the currently selected tool; used for applying changes from gui_param_ and for executing the tool.
|
private |
Manual thread count dropdown (1..max)
|
private |
Container for thread controls (FastMode + manual controls)
|
private |
tools description label
|
private |
Mapping of file extension to layer type to determine the type of a tool.
|
private |
Pointer to the tool scanner for access to the plugins and to rerun the plugins detection.
|
private |
ComboBox for choosing a TOPP-tool.