Mantid
Loading...
Searching...
No Matches
qt
widgets
common
src
MantidWidget.cpp
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
#include "
MantidQtWidgets/Common/MantidWidget.h
"
8
#include "
MantidKernel/Exception.h
"
9
10
using namespace
MantidQt::API
;
11
16
MantidWidget::MantidWidget
(QWidget *parent) : QWidget(parent), m_pyRunner() {
17
// re-emit the run Python code from m_pyRunner, to work this signal must reach
18
// the slot in QtiPlot
19
connect(&
m_pyRunner
, SIGNAL(
runAsPythonScript
(
const
QString &,
bool
)),
this
,
20
SIGNAL(
runAsPythonScript
(
const
QString &,
bool
)));
21
}
22
29
QString
MantidWidget::runPythonCode
(
const
QString &code,
bool
no_output) {
30
return
m_pyRunner
.
runPythonCode
(code, no_output);
31
}
Exception.h
MantidWidget.h
MantidQt::API::MantidWidget::m_pyRunner
PythonRunner m_pyRunner
This object implements the runPythonCode() function, by emitting the code as a runAsPythonScript sign...
Definition:
MantidWidget.h:54
MantidQt::API::MantidWidget::runAsPythonScript
void runAsPythonScript(const QString &code, bool)
MantidQt::API::MantidWidget::runPythonCode
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 ...
Definition:
MantidWidget.cpp:29
MantidQt::API::MantidWidget::MantidWidget
MantidWidget(QWidget *parent=nullptr)
Default constructor.
Definition:
MantidWidget.cpp:16
MantidQt::API::PythonRunner::runPythonCode
QString runPythonCode(const QString &code, bool no_output=false)
Run python code.
Definition:
PythonRunner.cpp:31
MantidQt::API
Definition:
AlgorithmDialog.h:62
Generated on Tue Jan 3 2023 11:58:02 for Mantid by
1.9.5