Custom utils._import was never called, because
builtins was correctly imported (even if it missed __import__)
and _import was then monkey patched to builtins instead of __builtin__
Tested on python 2
* pyqtwrappers update (add QtNetwork, QtXml, QtSql, QtTest, uic)
* 2to3 updates
* move QPyNullVariant/NULL to PyQt.QtCore
* add global unicode/basestring/long for Python3
* expand QtGui, QtCore module and star exports
* Qscintilla2
* replace Set import with set builtin
From now on, plugins must have metadata.txt file (with INI format)
that is used for storing of metadata. This has two advantages:
- plugins do not need to be loaded in order to read metadata
- repository can parse the metadata more easily
parameter to that type
- change default level to WARNING
- change startup messages to INFO
- don't unhide the warning button for INFO messages
- fix warnings produced by python code
macros are executed when a project is loaded (openProject function), saved (saveProject function) or is closing (closeProject function),
macros' python code is embedded in the project file (XML),
a bar (non-blocking) is shown on the top of the canvas to ask to the user whether enable project macros.
Work done for ARPA Piemonte
Until now plugins' metadata were always retrieved from __init__.py by calling python methods.
Reading metadata from a text file has the advantage of not requiring to load the plugin code
and can be done by plugin repository.
Metadata in metadata.txt is preferred to the methods in __init__.py - if the text file is
present, it is used to fetch the values. From QGIS 2.0 the metadata from __init__.py
will not be accepted - the metadata.txt file will be required.
Plugin metadata should be in INI file format, recognized by python's ConfigParser module
and by Qt's QSettings class.
All currently used metadata should be in [general] section. Example use:
[general]
name=PostGIS manager
description=Manage your PostGIS database
version=Version 0.5.15
icon=icons/postgis_elephant.png
qgisMinimumVersion=1.0.0
Both C++ and Python plugins now can implement icon() metadata function which returns path to the icon file name.
The icon file is passed to QPixmap() constructor. For C++ it's preferred to use an icon from the resource file
(e.g. ":/plugins/foo/foo_icon.png") because plugin's resource file gets loaded automatically when the plugin is loaded.
Python plugins can use either relative path to the icon ("images/plugin-icon.png") or icon from the resource file
(starting with a colon). The relative path is preferred, since it doesn't require the plugin to load its resource file
and plugin repository will not have a trouble to fetch the icon automatically.
Updated C++ plugins and Python plugins to include icon where applicable.
Default plugin icon is (c) Anna Shlyapnikova, licensed under Creative Commons (Attribution 3.0 Unported).
git-svn-id: http://svn.osgeo.org/qgis/trunk@14897 c8812cc2-4d05-0410-92ff-de0c093fc19c
Additionally, plugin paths in QGIS_PLUGINPATH can be separated by either semicolon or colon.
git-svn-id: http://svn.osgeo.org/qgis/trunk@13943 c8812cc2-4d05-0410-92ff-de0c093fc19c