Mantid
Loading...
Searching...
No Matches
MantidWidget.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2009 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"
11#include <QVariant>
12#include <QWidget>
13
14namespace MantidQt {
15namespace API {
28 Q_OBJECT
29
30public:
34 virtual QVariant getUserInput() const { return QVariant(); }
39 virtual void setUserInput(const QVariant &value) { Q_UNUSED(value); }
40
41signals:
42 void runAsPythonScript(const QString &code, bool /*_t2*/);
43
44protected:
46 MantidWidget(QWidget *parent = nullptr);
49 QString runPythonCode(const QString &code, bool no_output = false);
50
51private:
55};
56} // namespace API
57} // namespace MantidQt
#define EXPORT_OPT_MANTIDQT_COMMON
Definition: DllOption.h:15
double value
The value of the point.
Definition: FitMW.cpp:51
This is the base class all customised widgets that do not wish to be tied to a specific Mantid algori...
Definition: MantidWidget.h:27
PythonRunner m_pyRunner
This object implements the runPythonCode() function, by emitting the code as a runAsPythonScript sign...
Definition: MantidWidget.h:54
virtual void setUserInput(const QVariant &value)
Sets a value on a mantid widget through a common interface.
Definition: MantidWidget.h:39
void runAsPythonScript(const QString &code, bool)
virtual QVariant getUserInput() const
Returns a QVariant containing what the widget classes as user input so that input can be returned thr...
Definition: MantidWidget.h:34
This is the base class all customised user interfaces that do not wish to be tied to a specific Manti...
Definition: PythonRunner.h:26
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...