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 constructFunctionTree(const std::map<std::string, std::vector<std::string>> &categoryFunctionsMap,
50 const std::vector<std::string> &restrictions);
52 void setMinimumHeightOfFunctionTree();
53
54private slots:
55 void searchBoxChanged(const QString &text);
56 void functionDoubleClicked(QTreeWidgetItem *item);
57 void acceptFunction();
58 void rejectFunction();
59 void helpClicked() const;
60};
61
62} // namespace MantidWidgets
63} // 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...