37 QgsDebugMsg(
"Unable to run Python command: runner not available!" );
50 QgsDebugMsg(
"Unable to run Python command: runner not available!" );
QgsPythonRunner()
Protected constructor: can be instantiated only from children.
Utility class for running python commands from various parts of QGIS.
virtual ~QgsPythonRunner()
virtual bool evalCommand(QString command, QString &result)=0
static QgsPythonRunner * mInstance
static bool eval(const QString &command, QString &result)
Eval a python statement.
virtual bool runCommand(QString command, QString messageOnError=QString())=0
static bool run(const QString &command, const QString &messageOnError=QString())
Execute a python statement.
static bool isValid()
Returns true if the runner has an instance (and thus is able to run commands)
static void setInstance(QgsPythonRunner *runner)
Assign an instance of python runner so that run() can be used.