Mantid
Loading...
Searching...
No Matches
MantidDialog.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//----------------------------------
10// Includes
11//----------------------------------
12#include "DllOption.h"
14#include <QDialog>
15#include <memory>
16
17//----------------------------------
18// Qt Forward declarations
19//----------------------------------
20
21// Top-level namespace for this library
22namespace MantidQt {
23
24namespace API {
25
55
56 Q_OBJECT
57
58public:
60 MantidDialog(QWidget *parent = nullptr,
61 const Qt::WindowFlags &flags = Qt::WindowCloseButtonHint | Qt::WindowType::WindowTitleHint);
63 ~MantidDialog() override;
64
66 static bool handle(QObject *receiver, const std::exception &e);
67
68signals:
69 void runAsPythonScript(const QString &code, bool /*_t2*/);
70
71protected:
74 QString runPythonCode(const QString &code, bool no_output = false);
75
77 virtual void handleException(const std::exception &e);
78
79private:
83};
84} // namespace API
85} // namespace MantidQt
#define EXPORT_OPT_MANTIDQT_COMMON
Definition: DllOption.h:15
PythonRunner m_pyRunner
This object implements the runPythonCode() function, by emitting the code as a runAsPythonScript sign...
Definition: MantidDialog.h:82
void runAsPythonScript(const QString &code, bool)
~MantidDialog() override
Destructor.
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...