QGIS/python/core/auto_generated/qgspythonrunner.sip.in
Juergen E. Fischer c6008b7ee1 fix MSVC build: reverts fee62e4, dff05dd and e3a77b9484c effectivly
reverting 3fb0f66 (followup #45348)

Using --no-public-is-protected (default on Windows) also works on Linux
and fixes #45331 too
2021-10-21 23:03:48 +02:00

70 lines
2.4 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgspythonrunner.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsPythonRunner
{
%Docstring(signature="appended")
Utility class for running Python commands from various parts of QGIS.
There is no direct Python support in the core library, so it is expected
that application with Python support creates a subclass that implements
pure virtual function(s) during the initialization. The static methods
will then work as expected.
%End
%TypeHeaderCode
#include "qgspythonrunner.h"
%End
public:
static bool isValid();
%Docstring
Returns ``True`` if the runner has an instance
(and thus is able to run commands)
%End
static bool run( const QString &command, const QString &messageOnError = QString() );
%Docstring
Execute a Python statement
%End
static bool eval( const QString &command, QString &result /Out/ );
%Docstring
Eval a Python statement
%End
static void setInstance( QgsPythonRunner *runner /Transfer/ );
%Docstring
Assign an instance of Python runner so that :py:func:`~QgsPythonRunner.run` can be used.
This method should be called during app initialization.
Takes ownership of the object, deletes previous instance.
%End
protected:
QgsPythonRunner();
%Docstring
Protected constructor: can be instantiated only from children
%End
virtual ~QgsPythonRunner();
virtual bool runCommand( QString command, QString messageOnError = QString() ) = 0;
virtual bool evalCommand( QString command, QString &result ) = 0;
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgspythonrunner.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/