Skip to content
Browse files

Added a text file version of the detailed docs provided in the templa…

…te gui and told plugin builder to install the doc into the generated plugin dir.

git-svn-id: c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Apr 6, 2006
1 parent ef81bf5 commit 66465476f9721ed0cee2150a55b6f4f213ce2dab
Showing with 70 additions and 0 deletions.
  1. +4 −0 src/plugins/
  2. +66 −0 src/plugins/plugin_template/README.whatnext
@@ -77,6 +77,7 @@
system("mkdir $pluginDir");
# copy files to appropriate names
system("cp plugin_template/ $pluginDir/");
system("cp plugin_template/README.whatnext $pluginDir/README");
system("cp plugin_template/plugin.qrc $pluginDir/$pluginLCaseName.qrc");
system("cp plugin_template/plugin.png $pluginDir/$pluginLCaseName.png");
system("cp plugin_template/plugin.cpp $pluginDir/$pluginLCaseName.cpp");
@@ -167,6 +168,9 @@
To build the plugin, you must change to the top level of the source tree and
run autoreconf, configure, then make.
Once your plugin has successfully built, please see $pluginDir/README for
hints on how to get started.

@@ -0,0 +1,66 @@
Welcome to your automatically generated plugin!

This is just a starting point. You now need to modify the code to make it do something on for a more information to get yourself started.


You really need to read the QGIS API Documentation now at:

In particular look at the following classes:

QGisInterface :
QGisIface :
QgsMapTool :
QgsPlugin :

QGisIface is an abstract base class (ABC) that specifies what publicly available features of QGIS are exposed to third party code and plugins. QgisInterface is an concrete implementation of this ABC. The preferred way to carry out operations on QGIS is via the QGisInterface. An instance of the QgisInterface is passed to the plugin when it loads. Please consult the QGIS development team if there is functionality required in the QGisInterface that is not available.

QgsPlugin is an ABC that defines required behaviour your plugin must provide. See below for more details.

What are all the files in my generated plugin directory for?
This is the generated Makefile specification for your plugin. You will see that specifies c++ include paths (-I) and library linkages -l) to Qt4, GDAL, GEOS, QGIS Core, QGIS Ui, QGIS Gui and QGis Raster. You should add you application specific dependencies and source files to this Makefile.

This is the class that provides the 'glue' between your custom application logic and the QGIS application. You will see that a number of methods are already implemented for you - including some examples of how to add a raster or vector layer to the main application map canvas. This class is a subclass of QgisPlugin which defines required behaviour for a plugin. In particular, a plugin has a number of static methods and members so that the QgsPluginManager and plugin loader logic can identify each plugin, create an appropriate menu entry for it etc. Note there is nothing stopping you creating multiple toolbar icons and menu entries for a single plugin. By default though a single menu entry and toolbar button is created and its pre-configured to call the run() method in this class when selected. This default implementation provided for you by the plugin builder is well documented, so please refer to the code for further advice.

This is an Abstract Base Class implemented in Qt4 fashion as a Qt designer 'ui' file. It defines the look of the default plugin dialog without implementing any application logic. You can modify this form to suite your needs or completely remove it if your plugin does not need to display a user form (e.g. for custom MapTools).

This is the concrete class where application logic for the above mentioned dialog should go. The world is your oyster here really....

This is the Qt4 resources file for your plugin. The Makefile generated for your plugin is all set up to compile the resource file so all you need to do is add your additional icons etc using the simple xml file format. Note the namespace used for all your resources e.g. (":/[pluginname]/"). It is important to use this prefix for all your resources. We suggest you include any other images and run time data in this resurce file too.

This is the icon that will be used for your plugin menu entry and toolbar icon. Simply replace this icon with your own icon to make your plugin disctinctive from the rest.

This file contains the documentation you are reading now!

Getting developer help:

For Questions and Comments regarding the plugin builder template and creating your features in QGIS using the plugin interface please contact us via:

* the QGIS developers mailing list, or
* IRC (#qgis on

QGIS is distributed under the Gnu Public License. If you create a useful plugin please consider contributing it back to the community.

Have fun and thank you for choosing QGIS.

The QGIS Team

0 comments on commit 6646547

Please sign in to comment.
You can’t perform that action at this time.