Graphics Reference
In-Depth Information
Plugin help files
QGIS allows you to include an HTML-formatted help file for your plugin. This file will be
displayed using the built-in QGIS help browser if your plugin calls the
qgis.utils.showPluginHelp() function. This function has the following signa-
ture:
showPluginHelp(packageName=None, filename='index',
section='')
The various parameters are as follows:
packageName : This is the name of the Python package where the help file can
be found. If a package is specified, QGIS will look for the help files inside the giv-
en package directory. Otherwise, it will look for the help files in the same directory
as the Python module that called showPluginHelp() . Note that it's quite un-
usual for a plugin to use this parameter, and you would normally just leave it set to
None .
filename : This is the base name for the HTML help file to display. Note that an
appropriate suffix (for example, .html ) will be added to this base name.
section : This is the name of an optional HTML anchor tag, which the help file
will be scrolled to when it is opened.
Note that the filename parameter is the base name for the desired HTML file. QGIS al-
lows you to have your help files translated into multiple languages, and will automatically
choose the appropriate version of the file based on the current locale. If a translated version
of the help file is not available in the current language, then QGIS will fall back to display-
ing the US English version of the help file, and if that's not available, it will use the file
named filename.html .
This allows you to include translated versions of your help files if you want (for example,
index-es.html , index-de.html , and index-fr-ca.html ), but if you don't
want to have translated help files, a single index.html file will suffice.
There are several ways in which you can organize your plugin's online help. The following
are some examples:
Search WWH ::




Custom Search