#include <qgspythonutils.h>
Inheritance diagram for QgsPythonUtils:

This class is a singleton.
Default path for python plugins is:
Definition at line 36 of file qgspythonutils.h.
Public Member Functions | |
| virtual | ~QgsPythonUtils () |
| virtual bool | isEnabled ()=0 |
| returns true if python support is ready to use (must be inited first) | |
| virtual void | initPython (QgisInterface *interface)=0 |
| initialize python and import bindings | |
| virtual void | exitPython ()=0 |
| close python interpreter | |
| virtual bool | runStringUnsafe (const QString &command)=0 |
| run a statement, error reporting is not done | |
| virtual bool | evalString (const QString &command, QString &result)=0 |
| virtual void | installConsoleHooks ()=0 |
| change displayhook and excepthook our hooks will just save the result to special variables and those can be used in the program | |
| virtual void | uninstallConsoleHooks ()=0 |
| get back to the original settings (i.e. write output to stdout) | |
| virtual QString | getResult ()=0 |
| get result from the last statement as a string | |
| virtual bool | getError (QString &errorClassName, QString &errorText)=0 |
| get information about error to the supplied arguments | |
| virtual QStringList | pluginList ()=0 |
| return list of all available python plugins | |
| virtual bool | loadPlugin (QString packageName)=0 |
| load python plugin (import) | |
| virtual bool | startPlugin (QString packageName)=0 |
| start plugin: add to active plugins and call initGui() | |
| virtual QString | getPluginMetadata (QString pluginName, QString function)=0 |
| helper function to get some information about plugin | |
| virtual bool | unloadPlugin (QString packageName)=0 |
| unload plugin | |
| virtual QgsPythonUtils::~QgsPythonUtils | ( | ) | [inline, virtual] |
Definition at line 40 of file qgspythonutils.h.
| virtual bool QgsPythonUtils::isEnabled | ( | ) | [pure virtual] |
returns true if python support is ready to use (must be inited first)
Implemented in QgsPythonUtilsImpl.
Referenced by QgsPluginManager::getPythonPluginDescriptions(), QgisApp::loadPythonPlugin(), QgisApp::loadPythonSupport(), QgisApp::restoreSessionPlugins(), QgisApp::showPythonDialog(), and QgsPluginManager::unload().
| virtual void QgsPythonUtils::initPython | ( | QgisInterface * | interface | ) | [pure virtual] |
initialize python and import bindings
Implemented in QgsPythonUtilsImpl.
Referenced by QgisApp::loadPythonSupport().
| virtual void QgsPythonUtils::exitPython | ( | ) | [pure virtual] |
| virtual bool QgsPythonUtils::runStringUnsafe | ( | const QString & | command | ) | [pure virtual] |
run a statement, error reporting is not done
Implemented in QgsPythonUtilsImpl.
Referenced by QgsPythonDialog::on_edtCmdLine_returnPressed().
| virtual bool QgsPythonUtils::evalString | ( | const QString & | command, | |
| QString & | result | |||
| ) | [pure virtual] |
| virtual void QgsPythonUtils::installConsoleHooks | ( | ) | [pure virtual] |
change displayhook and excepthook our hooks will just save the result to special variables and those can be used in the program
Implemented in QgsPythonUtilsImpl.
Referenced by QgsPythonDialog::showEvent().
| virtual void QgsPythonUtils::uninstallConsoleHooks | ( | ) | [pure virtual] |
get back to the original settings (i.e. write output to stdout)
Implemented in QgsPythonUtilsImpl.
Referenced by QgsPythonDialog::closeEvent().
| virtual QString QgsPythonUtils::getResult | ( | ) | [pure virtual] |
get result from the last statement as a string
Implemented in QgsPythonUtilsImpl.
Referenced by QgsPythonDialog::on_edtCmdLine_returnPressed().
| virtual bool QgsPythonUtils::getError | ( | QString & | errorClassName, | |
| QString & | errorText | |||
| ) | [pure virtual] |
get information about error to the supplied arguments
Implemented in QgsPythonUtilsImpl.
Referenced by QgsPythonDialog::on_edtCmdLine_returnPressed().
| virtual QStringList QgsPythonUtils::pluginList | ( | ) | [pure virtual] |
return list of all available python plugins
Implemented in QgsPythonUtilsImpl.
Referenced by QgsPluginManager::getPythonPluginDescriptions(), and QgisApp::restoreSessionPlugins().
| virtual bool QgsPythonUtils::loadPlugin | ( | QString | packageName | ) | [pure virtual] |
load python plugin (import)
Implemented in QgsPythonUtilsImpl.
Referenced by QgsPluginManager::getPythonPluginDescriptions(), QgisApp::loadPythonPlugin(), and QgisApp::restoreSessionPlugins().
| virtual bool QgsPythonUtils::startPlugin | ( | QString | packageName | ) | [pure virtual] |
start plugin: add to active plugins and call initGui()
Implemented in QgsPythonUtilsImpl.
Referenced by QgisApp::loadPythonPlugin().
| virtual QString QgsPythonUtils::getPluginMetadata | ( | QString | pluginName, | |
| QString | function | |||
| ) | [pure virtual] |
helper function to get some information about plugin
| function | one of these strings: name, tpye, version, description |
Implemented in QgsPythonUtilsImpl.
Referenced by QgsPluginManager::getPythonPluginDescriptions(), and QgisApp::restoreSessionPlugins().
| virtual bool QgsPythonUtils::unloadPlugin | ( | QString | packageName | ) | [pure virtual] |
1.5.1