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

39 lines
1.2 KiB
Python
Executable File

# -*- coding: utf-8 -*-
"""
Copyright (C) 2007-2008 Matthew Perry
Copyright (C) 2008-2010 Borys Jurgiel
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
"""
def name():
return "Plugin Installer"
def version():
return "Version 1.2"
def description():
return "Downloads and installs QGIS python plugins"
def qgisMinimumVersion():
return "1.0"
def icon():
import resources_rc
return ":/plugins/installer/plugin_installer.png"
def authorName():
return "Matthew Perry, Borys Jurgiel"
def homepage():
return "http://bwj.aster.net.pl/qgis/"
def classFactory(iface):
from installer_plugin import InstallerPlugin
return InstallerPlugin(iface)