|
Mantid
|
Select a function type out of a list of available ones. More...
#include <SelectFunctionDialog.h>
Public Member Functions | |
| void | clearSearchBoxText () const |
| Clear the text in the search box. | |
| QString | getFunction () const |
| Return selected function. | |
| SelectFunctionDialog (QWidget *parent, const std::vector< std::string > &restrictions) | |
| Constructor overload with categories to restrict to. | |
| SelectFunctionDialog (QWidget *parent=nullptr) | |
| Default constructor. | |
| ~SelectFunctionDialog () override | |
Public Member Functions inherited from MantidQt::API::MantidDialog | |
| MantidDialog (QWidget *parent=nullptr, const Qt::WindowFlags &flags=Qt::WindowCloseButtonHint|Qt::WindowType::WindowTitleHint) | |
| DefaultConstructor. | |
| ~MantidDialog () override | |
| Destructor. | |
Protected Attributes | |
| Ui::SelectFunctionDialog * | m_form |
| Ui elements form. | |
Private Slots | |
| void | acceptFunction () |
| void | functionDoubleClicked (QTreeWidgetItem *item) |
| void | helpClicked () const |
| void | rejectFunction () |
| void | searchBoxChanged (const QString &text) |
| Called when the text in the search box changes. | |
Private Member Functions | |
| void | addSearchBoxFunctionNames (const std::vector< std::string > ®isteredFunctions) |
| Complete QComboBox for searching functions with available functions. | |
| void | constructFunctionTree (const std::map< std::string, std::vector< std::string > > &categoryFunctionsMap, const std::vector< std::string > &restrictions) |
| Construct QTreeWidget with categories and functions. | |
| void | setMinimumHeightOfFunctionTree () |
| Sets the minimum height of the function tree so that all catagories are visible. | |
Additional Inherited Members | |
Signals inherited from MantidQt::API::MantidDialog | |
| void | runAsPythonScript (const QString &code, bool) |
Static Public Member Functions inherited from MantidQt::API::MantidDialog | |
| static bool | handle (QObject *receiver, const std::exception &e) |
| Handles the exception caught in an event handler. | |
Protected Member Functions inherited from MantidQt::API::MantidDialog | |
| virtual void | handleException (const std::exception &e) |
| Override this method to handle an exception in a derived class. | |
| QString | runPythonCode (const QString &code, bool no_output=false) |
| Run python code that is passed to it and, optionally, return anything it wrote to standard output as a string. | |
Select a function type out of a list of available ones.
Definition at line 29 of file SelectFunctionDialog.h.
| MantidQt::MantidWidgets::SelectFunctionDialog::SelectFunctionDialog | ( | QWidget * | parent = nullptr | ) |
Default constructor.
Constructor.
| parent | :: A parent widget |
Definition at line 37 of file SelectFunctionDialog.cpp.
| MantidQt::MantidWidgets::SelectFunctionDialog::SelectFunctionDialog | ( | QWidget * | parent, |
| const std::vector< std::string > & | restrictions | ||
| ) |
Constructor overload with categories to restrict to.
Constructor with categories to restrict to.
| parent | :: A parent widget |
| restrictions | :: List of categories to restrict to |
Definition at line 45 of file SelectFunctionDialog.cpp.
References acceptFunction(), addSearchBoxFunctionNames(), constructFunctionTree(), functionDoubleClicked(), helpClicked(), m_form, rejectFunction(), searchBoxChanged(), and setMinimumHeightOfFunctionTree().
|
override |
Definition at line 182 of file SelectFunctionDialog.cpp.
References m_form.
|
privateslot |
Definition at line 232 of file SelectFunctionDialog.cpp.
References getFunction(), and m_form.
Referenced by functionDoubleClicked(), and SelectFunctionDialog().
|
private |
Complete QComboBox for searching functions with available functions.
Complete the QComboBox with the available functions for fitting.
| registeredFunctions | :: [input] Vector of avaiblable functions |
Definition at line 98 of file SelectFunctionDialog.cpp.
References m_form.
Referenced by SelectFunctionDialog().
| void MantidQt::MantidWidgets::SelectFunctionDialog::clearSearchBoxText | ( | ) | const |
Clear the text in the search box.
Definition at line 211 of file SelectFunctionDialog.cpp.
References m_form.
Referenced by MantidQt::MantidWidgets::FunctionTreeView::addFunctionBegin().
|
private |
Construct QTreeWidget with categories and functions.
Construct the QTreeWidget based on the map information of categories and their respective fit functions.
| categoryFunctionsMap | :: [input] Map of categories to functions |
| restrictions | :: [input] List of categories to restrict choice to. If empty, no restriction. |
Definition at line 111 of file SelectFunctionDialog.cpp.
Referenced by SelectFunctionDialog().
|
privateslot |
Definition at line 227 of file SelectFunctionDialog.cpp.
References acceptFunction().
Referenced by SelectFunctionDialog().
| QString MantidQt::MantidWidgets::SelectFunctionDialog::getFunction | ( | ) | const |
Return selected function.
Definition at line 200 of file SelectFunctionDialog.cpp.
References m_form.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::acceptFit(), acceptFunction(), MantidQt::MantidWidgets::FunctionTreeView::addFunctionEnd(), and helpClicked().
|
privateslot |
Definition at line 248 of file SelectFunctionDialog.cpp.
References getFunction(), and MantidQt::API::HelpWindow::showFitFunction().
Referenced by SelectFunctionDialog().
|
privateslot |
Definition at line 243 of file SelectFunctionDialog.cpp.
References m_form.
Referenced by SelectFunctionDialog().
|
privateslot |
Called when the text in the search box changes.
Definition at line 216 of file SelectFunctionDialog.cpp.
Referenced by SelectFunctionDialog().
|
private |
Sets the minimum height of the function tree so that all catagories are visible.
Sets the minimum height of the function tree to ensure that all catagories are visible when the dialog is opened.
This method ensures the correct minimum size is used for any screen resolution.
Definition at line 188 of file SelectFunctionDialog.cpp.
References m_form.
Referenced by SelectFunctionDialog().
|
protected |
Ui elements form.
Definition at line 45 of file SelectFunctionDialog.h.
Referenced by acceptFunction(), addSearchBoxFunctionNames(), clearSearchBoxText(), constructFunctionTree(), getFunction(), rejectFunction(), searchBoxChanged(), SelectFunctionDialog(), setMinimumHeightOfFunctionTree(), and ~SelectFunctionDialog().