|
Mantid
|
A dialog for renaming parameters for a user function. More...
#include <RenameParDialog.h>
Public Member Functions | |
| RenameParDialog (std::vector< std::string > old_params, const std::vector< std::string > &new_params, QWidget *parent=nullptr) | |
| there has to be a default constructor but you can call it with a pointer to the thing that will take ownership of it More... | |
| std::vector< std::string > | setOutput () const |
| Output the new names to a vector. More... | |
Protected Slots | |
| void | doNotRename (bool) |
| Do not rename the parameters. More... | |
| void | uniqueIndexedNames (bool) |
Protected Member Functions | |
| bool | isUnique (const QString &name) const |
| Checks whether a name is unique. More... | |
| QString | makeUniqueIndexedName (const QString &name) |
| Adds a suffix to the unput parameter name in the form: _n where n is a number. More... | |
Protected Attributes | |
| const std::vector< std::string > | m_new_params |
| const std::vector< std::string > | m_old_params |
| Ui::RenameParDialog | m_uiForm |
| User interface elements. More... | |
A dialog for renaming parameters for a user function.
Definition at line 20 of file RenameParDialog.h.
| RenameParDialog::RenameParDialog | ( | std::vector< std::string > | old_params, |
| const std::vector< std::string > & | new_params, | ||
| QWidget * | parent = nullptr |
||
| ) |
there has to be a default constructor but you can call it with a pointer to the thing that will take ownership of it
Constructor.
| old_params | Parameter names to rename |
| new_params | Renamed parameters |
| parent | The parent widget for the dialog |
Definition at line 20 of file RenameParDialog.cpp.
References doNotRename(), m_uiForm, and uniqueIndexedNames().
|
protectedslot |
Do not rename the parameters.
Definition at line 115 of file RenameParDialog.cpp.
References m_uiForm.
Referenced by RenameParDialog().
|
protected |
Checks whether a name is unique.
The name is compared to the names in m_old_names and in column #1 of the table widget
Definition at line 42 of file RenameParDialog.cpp.
References m_old_params, and m_uiForm.
Referenced by makeUniqueIndexedName().
|
protected |
Adds a suffix to the unput parameter name in the form: _n where n is a number.
The method ensures that the new name is unique
| name | :: The name to rename |
Definition at line 61 of file RenameParDialog.cpp.
References index, isUnique(), and n.
Referenced by uniqueIndexedNames().
| std::vector< std::string > RenameParDialog::setOutput | ( | ) | const |
Output the new names to a vector.
Definition at line 93 of file RenameParDialog.cpp.
References m_uiForm.
Referenced by MantidQt::MantidWidgets::UserFunctionDialog::checkParameters().
|
protectedslot |
Definition at line 102 of file RenameParDialog.cpp.
References m_uiForm, and makeUniqueIndexedName().
Referenced by RenameParDialog().
|
protected |
Definition at line 39 of file RenameParDialog.h.
|
protected |
Definition at line 38 of file RenameParDialog.h.
Referenced by isUnique().
|
protected |
User interface elements.
Definition at line 37 of file RenameParDialog.h.
Referenced by doNotRename(), isUnique(), RenameParDialog(), setOutput(), and uniqueIndexedNames().