Mantid
Loading...
Searching...
No Matches
SelectFunctionDialog.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9//--------------------------------------------------
10// Includes
11//--------------------------------------------------
12#include "DllOption.h"
14
15#include <QDialog>
16#include <QTreeWidgetItem>
17#include <map>
18
19namespace Ui {
20class SelectFunctionDialog;
21}
22
23namespace MantidQt {
24namespace MantidWidgets {
25
30 Q_OBJECT
31
32public:
34 SelectFunctionDialog(QWidget *parent = nullptr);
36 SelectFunctionDialog(QWidget *parent, const std::vector<std::string> &restrictions);
37 ~SelectFunctionDialog() override;
39 QString getFunction() const;
41 void clearSearchBoxText() const;
42
43protected:
45 Ui::SelectFunctionDialog *m_form;
46
47private:
49 void addSearchBoxFunctionNames(const std::vector<std::string> &registeredFunctions);
51 void constructFunctionTree(const std::map<std::string, std::vector<std::string>> &categoryFunctionsMap,
52 const std::vector<std::string> &restrictions);
54 void setMinimumHeightOfFunctionTree();
55
56private slots:
57 void searchBoxChanged(const QString &text);
58 void functionDoubleClicked(QTreeWidgetItem *item);
59 void acceptFunction();
60 void rejectFunction();
61 void helpClicked() const;
62};
63
64} // namespace MantidWidgets
65} // namespace MantidQt
#define EXPORT_OPT_MANTIDQT_COMMON
Definition DllOption.h:15
Select a function type out of a list of available ones.
Ui::SelectFunctionDialog * m_form
Ui elements form.
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...