42 Commits

Author SHA1 Message Date
Juergen E. Fischer
6685932c09 show python errors in monospace 2014-03-21 09:20:48 +01:00
Juergen E. Fischer
91ecc5f31b add 'warning' to the respective python message log tab 2014-02-24 02:03:42 +01:00
Tim Sutton
ba4e438c05 Fix from Salvatore to fix project macros 2013-09-11 17:41:23 +02:00
Nathan Woodrow
b287661c91 Don't return null on failed metadata load 2013-06-12 14:26:00 +10:00
Juergen E. Fischer
8609a41deb allow utf8 in metadata.txt 2013-06-09 10:56:35 +02:00
Nathan Woodrow
e6f98362dc Merge master 2013-06-08 15:59:04 +10:00
Borys Jurgiel
eda9cd3380 [Plugin Manager] Better cope with broken plugins 2013-06-06 23:41:52 +02:00
Nathan Woodrow
17d424340e Start sipapi update 2013-05-29 22:08:16 +10:00
Tim Sutton
6c3f418988 Use ~.qgis2 and ~/.config/QuantumGIS/QGIS2.conf for settings for QGIS 2. Added unit test for memory provider. 2013-04-01 13:15:09 +02:00
Martin Dobias
32de07dc4d Remove the support for reading python plugin metadata from __init__.py
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
2013-03-19 00:10:51 +01:00
Martin Dobias
41dc7544d0 Do not load metadata from __init__.py 2013-03-19 00:10:51 +01:00
Juergen E. Fischer
0a0a430b0e include stack trace in logged python warning messages 2013-01-31 16:37:23 +01:00
Juergen E. Fischer
994dc1cc21 - [API] introduce QgsMessageLog::MessageLevel and change logMessage() level
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
2013-01-26 14:16:39 +01:00
Juergen E. Fischer
f2029b4ec4 log python warnings and enabled deprecation warnings 2013-01-24 03:08:20 +01:00
Juergen E. Fischer
9721736fd8 remove trailing blanks 2012-12-10 00:12:07 +01:00
Nathan Woodrow
a7699e2696 [FEATURE] Add ability to create user defined Python (and C++) expression functions 2012-11-10 11:20:26 +10:00
Juergen E. Fischer
048a07a572 another copyright update 2012-10-08 00:29:13 +02:00
Juergen E. Fischer
7b4a9b68a3 add copyright notices 2012-10-04 19:36:43 +02:00
Giuseppe Sucameli
c7fcef4c1d [FEATURE] Add support to user-defined python macros into project file:
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
2012-08-31 16:24:53 +02:00
Martin Dobias
be9bdeb5bb [FEATURE] Allow plugin metadata to be in metadata.txt
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
2011-11-09 15:57:17 -03:00
Jrgen E. Fischer
dcc723c067 some more svn to git migration updates/fixes 2011-05-06 16:39:45 +02:00
wonder
3a18bddada [FEATURE] Support for icons of plugins in the plugin manager dialog.
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
2010-12-12 19:19:54 +00:00
wonder
d027de3655 Handle non-ascii characters in traceback when showing an exception
git-svn-id: http://svn.osgeo.org/qgis/trunk@14571 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-11-12 18:54:06 +00:00
wonder
50734ac052 Better handling of python path and plugins paths.
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
2010-07-20 13:06:49 +00:00
wonder
9d1d81e18f Better cleanup of resources when unloading plugins
git-svn-id: http://svn.osgeo.org/qgis/trunk@13773 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-06-21 22:26:36 +00:00
wonder
d23617474b Fixed unloading of python modules which were imported using "from X import Y,Z".
Modules Y,Z have been missed by the import wrapper and the unloader did not remove the plugin completely/correctly.


git-svn-id: http://svn.osgeo.org/qgis/trunk@13693 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-06-08 20:05:53 +00:00
jef
1541ff5225 update permissions
git-svn-id: http://svn.osgeo.org/qgis/trunk@13463 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-05-10 18:52:30 +00:00
wonder
610f356975 [FEATURE] support for custom plugin directories using QGIS_PLUGINPATH environment variables.
More paths can be passed, separated by semicolon. Patch from Chris Crook (#2608), slightly modified.


git-svn-id: http://svn.osgeo.org/qgis/trunk@13236 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-04-04 10:30:40 +00:00
wonder
19b1bc77ac Applied patch from #2582.
git-svn-id: http://svn.osgeo.org/qgis/trunk@13174 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-03-27 17:52:01 +00:00
borysiasty
e5fb2d37e1 better names for plugin help files: index-ll_CC.html or index-ll.html
git-svn-id: http://svn.osgeo.org/qgis/trunk@13100 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-03-20 09:50:58 +00:00
borysiasty
515393ea81 new utils.showPluginHelp() method - patch #2562 by ccrook applied
git-svn-id: http://svn.osgeo.org/qgis/trunk@13097 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-03-20 09:23:38 +00:00
jef
b4f124b181 followup r13013 and implement #2539
git-svn-id: http://svn.osgeo.org/qgis/trunk@13055 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-03-15 00:40:27 +00:00
borysiasty
c577cfbfa8 [FEATURE] Applied patch #2541 - initial implementing the canBeUninstalled python plugin method
git-svn-id: http://svn.osgeo.org/qgis/trunk@13050 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-03-12 07:58:48 +00:00
wonder
e4c860e22e Converted Python console from C++ to Python.
This cleans python support a bit and makes a starting point for further improvements of the console.

It's possible to run the console also outside QGIS:

import qgis.console
qgis.console.show_console()



git-svn-id: http://svn.osgeo.org/qgis/trunk@12725 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-01-10 00:10:23 +00:00
jef
1416065936 fix python plugin detection
git-svn-id: http://svn.osgeo.org/qgis/trunk@12721 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-01-09 20:50:14 +00:00
wonder
bb5f4139ab Python support: use a wrapper for import statement that tracks modules of plugins.
This enables complete unload and reload of plugins:
- qgis.utils.unloadPlugin(name) - now removes also plugin's modules (files) from python
- qgis.utils.reloadPlugin(name) - unloads and starts the plugin again (using fresh source files)


git-svn-id: http://svn.osgeo.org/qgis/trunk@12690 c8812cc2-4d05-0410-92ff-de0c093fc19c
2010-01-07 14:59:27 +00:00
wonder
4f66673f92 Manage python plugins loaded state in python utils.py module.
This allows seamless loading/unloading of plugins by plugin installer.


git-svn-id: http://svn.osgeo.org/qgis/trunk@12552 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-12-20 22:12:16 +00:00
borysiasty
5e25228b68 Plugin installer update - rest of the r12476
git-svn-id: http://svn.osgeo.org/qgis/trunk@12487 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-12-16 00:37:01 +00:00
borysiasty
a13ce52617 Plugin installer update: one-step plugin install and uninstall in QGIS>=1.4
git-svn-id: http://svn.osgeo.org/qgis/trunk@12476 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-12-15 17:47:00 +00:00
wonder
5de2b259e2 Fixed console display hook (works only for single input)
git-svn-id: http://svn.osgeo.org/qgis/trunk@12125 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-11-15 17:45:45 +00:00
cfarmer
e4f8eddc43 update to new python utils module to avoid console flush error
git-svn-id: http://svn.osgeo.org/qgis/trunk@11975 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-11-07 19:20:35 +00:00
wonder
b3c0989385 Moved most of the python support code to a new module qgis.utils
This will enable more flexibility in plugins handling
Hopefully it doesn't break anything :-)


git-svn-id: http://svn.osgeo.org/qgis/trunk@11950 c8812cc2-4d05-0410-92ff-de0c093fc19c
2009-11-07 12:04:42 +00:00