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. More... | |
QString | getFunction () const |
Return selected function. More... | |
SelectFunctionDialog (QWidget *parent, const std::vector< std::string > &restrictions) | |
Constructor overload with categories to restrict to. More... | |
SelectFunctionDialog (QWidget *parent=nullptr) | |
Default constructor. More... | |
~SelectFunctionDialog () override | |
Public Member Functions inherited from MantidQt::API::MantidDialog | |
MantidDialog (QWidget *parent=nullptr, const Qt::WindowFlags &flags=Qt::WindowCloseButtonHint|Qt::WindowType::WindowTitleHint) | |
DefaultConstructor. More... | |
~MantidDialog () override | |
Destructor. More... | |
Protected Attributes | |
Ui::SelectFunctionDialog * | m_form |
Ui elements form. More... | |
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. More... | |
Private Member 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. More... | |
void | setMinimumHeightOfFunctionTree () |
Sets the minimum height of the function tree so that all catagories are visible. More... | |
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. More... | |
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. More... | |
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. More... | |
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(), constructFunctionTree(), functionDoubleClicked(), helpClicked(), Mantid::Kernel::SingletonHolder< T >::Instance(), m_form, rejectFunction(), searchBoxChanged(), and setMinimumHeightOfFunctionTree().
|
override |
Definition at line 170 of file SelectFunctionDialog.cpp.
References m_form.
|
privateslot |
Definition at line 220 of file SelectFunctionDialog.cpp.
References getFunction(), and m_form.
Referenced by functionDoubleClicked(), and SelectFunctionDialog().
void MantidQt::MantidWidgets::SelectFunctionDialog::clearSearchBoxText | ( | ) | const |
Clear the text in the search box.
Definition at line 199 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 97 of file SelectFunctionDialog.cpp.
References m_form.
Referenced by SelectFunctionDialog().
|
privateslot |
Definition at line 215 of file SelectFunctionDialog.cpp.
References acceptFunction().
Referenced by SelectFunctionDialog().
QString MantidQt::MantidWidgets::SelectFunctionDialog::getFunction | ( | ) | const |
Return selected function.
Definition at line 188 of file SelectFunctionDialog.cpp.
References m_form.
Referenced by MantidQt::MantidWidgets::FitPropertyBrowser::acceptFit(), acceptFunction(), MantidQt::MantidWidgets::FunctionTreeView::addFunctionEnd(), and helpClicked().
|
privateslot |
Definition at line 236 of file SelectFunctionDialog.cpp.
References getFunction(), and MantidQt::API::HelpWindow::showFitFunction().
Referenced by SelectFunctionDialog().
|
privateslot |
Definition at line 231 of file SelectFunctionDialog.cpp.
References m_form.
Referenced by SelectFunctionDialog().
|
privateslot |
Called when the text in the search box changes.
Definition at line 204 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 176 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(), clearSearchBoxText(), constructFunctionTree(), getFunction(), rejectFunction(), searchBoxChanged(), SelectFunctionDialog(), setMinimumHeightOfFunctionTree(), and ~SelectFunctionDialog().