26 template<
class TW
idgetClass>
32 old_(stw->currentWidget()),
35 stw->setCurrentWidget(stw->ui->tab_log);
78 if (
loop.empty())
return 1;
79 size_t common_size =
loop[0].loop_arg.size();
80 for (
const auto& l :
loop)
82 if (l.loop_arg.size() != common_size)
throw Exception::Precondition(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
"Internal error. Not all loop arguments support the same number of loops!");
83 if (l.insert_pos >=
args.size())
throw Exception::Precondition(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
"Internal error. Loop argument wants to insert after end of template arguments!");
89 std::vector<String>
getArgs(
const int loop_number)
const
93 throw Exception::Precondition(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
"Internal error. The loop number you requested is too high!");
97 std::vector<String> arg_l =
args;
98 for (
const auto& largs :
loop)
101 String& target = arg_l[largs.insert_pos];
102 target.
substitute(
"%1", largs.loop_arg[loop_number]);
Precondition failed exception.
Definition Exception.h:128
RAII class to disable the GUI and set a busy cursor and go back to the original state when this class...
Definition GUIHelpers.h:124
RAII class to switch to certain TabWidget, disable the GUI and go back to the orignal Tab when this c...
Definition WizardHelper.h:28
~WizardGUILock()
Definition WizardHelper.h:38
WizardGUILock(TWidgetClass *stw)
Definition WizardHelper.h:30
TWidgetClass * stw_
Definition WizardHelper.h:44
GUIHelpers::GUILock glock_
Definition WizardHelper.h:46
QWidget * old_
Definition WizardHelper.h:45
A simple widget with a line-edit and a browse button to choose filenames.
Definition OutputDirectory.h:31
A GUI for editing or viewing a Param object.
Definition ParamEditor.h:153
A more convenient string class.
Definition String.h:32
String & substitute(char from, char to)
Replaces all occurrences of the character from by the character to.
A better QTable for TOPPView, which supports exporting to TSV and conveniently adding data to cells a...
Definition TableView.h:22
std::vector< Args > ArgLoop
Definition WizardHelper.h:56
size_t insert_pos
where to insert in the target argument list (index is 0-based)
Definition WizardHelper.h:53
std::vector< String > loop_arg
list of arguments to insert; one for every loop
Definition WizardHelper.h:52
custom arguments to allow for looping calls
Definition WizardHelper.h:51
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Definition WizardHelper.h:64
String exe
Definition WizardHelper.h:65
size_t getLoopCount() const
Definition WizardHelper.h:76
std::vector< String > getArgs(const int loop_number) const
Definition WizardHelper.h:89
std::vector< String > args
Definition WizardHelper.h:66
Command(const String &e, const std::vector< String > &a, const ArgLoop &l)
Definition WizardHelper.h:69
ArgLoop loop
Definition WizardHelper.h:67