Mantid
Loading...
Searching...
No Matches
ProcessingAlgoWidget.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#include "DllOption.h"
10#include "MantidAPI/Algorithm.h"
11#include "ui_ProcessingAlgoWidget.h"
12#include <QWidget>
13
14namespace MantidQt {
15namespace MantidWidgets {
24 Q_OBJECT
25 Q_PROPERTY(QString infoString READ infoString WRITE infoString)
26 Q_PROPERTY(bool editorVisible READ editorVisible WRITE editorVisible)
27 Q_PROPERTY(bool algoVisible READ algoVisible WRITE algoVisible)
28
29public:
31 ProcessingAlgoWidget(QWidget *parent = nullptr);
32 ~ProcessingAlgoWidget() override;
33
35 QString infoString() { return ui.lblInfo->text(); }
37 void infoString(const QString &text) { return ui.lblInfo->setText(text); }
38
40 bool editorVisible() { return ui.editorContainer->isVisible(); }
42 void editorVisible(bool vis) { ui.editorContainer->setVisible(vis); }
43
45 bool algoVisible() { return ui.splitter->isVisible(); }
47 void algoVisible(bool vis) { ui.splitter->setVisible(vis); }
48
50 QString getSelectedAlgorithm() { return ui.algoSelector->getSelectedAlgorithm(); };
51 void setSelectedAlgorithm(QString algo);
52
54 QString getScriptText();
56 void setScriptText(const QString &text);
57
58 void saveInput();
61 ui.algoProperties->setInputHistory(inputHistory);
62 }
63
66
67public slots:
68 void changeAlgorithm();
69 void btnSaveClicked();
70 void btnLoadClicked();
71
72signals:
75
76private:
77 void loadSettings();
78 void saveSettings();
79
81 Ui::ProcessingAlgoWidget ui;
82
85
87 QString m_lastFile;
88};
89
90} // namespace MantidWidgets
91} // namespace MantidQt
#define EXPORT_OPT_MANTIDQT_COMMON
Definition: DllOption.h:15
This abstract class deals with the loading and saving of previous algorithm property values to/from M...
A widget containing an algorithm selector and algorithm properties list, or a script editor window.
void setInputHistory(MantidQt::API::AbstractAlgorithmInputHistory *inputHistory)
Sets the AlgorithmInputHistory object recording the algorithm properties.
void changedAlgorithm()
Signal emitted when the algorithm changes.
void algoVisible(bool vis)
Sets whether the algorithm stuff is visible.
Mantid::API::Algorithm_sptr m_alg
Current algorithm with properties set.
Ui::ProcessingAlgoWidget ui
The form generated by Qt Designer.
void editorVisible(bool vis)
Sets whether the script editor is visible.
void infoString(const QString &text)
Sets the info string displayed at the top.
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...
std::shared_ptr< Algorithm > Algorithm_sptr
Typedef for a shared pointer to an Algorithm.
Definition: Algorithm.h:61