1
1
Welcome to your automatically generated plugin!
2
2
-------------------------------------------------------------
4
This is just a starting point. You now need to modify the code to make it do something useful....read on for a more information to get yourself started.
4
This is just a starting point. You now need to modify the code to make it do
5
something useful....read on for a more information to get yourself started.
7
8
-------------------------------------------------------------
9
10
You really need to read the QGIS API Documentation now at:
11
http://svn.qgis.org/api_doc/html/
13
14
In particular look at the following classes:
15
QGisInterface : http://svn.qgis.org/api_doc/html/classQgisInterface.html
16
QGisIface : http://svn.qgis.org/api_doc/html/classQgisIface.html
17
QgsMapTool : http://svn.qgis.org/api_doc/html/classQgsMapTool.html
18
QgsPlugin : http://svn.qgis.org/api_doc/html/classQgisPlugin.html
20
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.
22
QgsPlugin is an ABC that defines required behaviour your plugin must provide. See below for more details.
16
QGisInterface : http://doc.qgis.org/classQgisInterface.html
17
QgsMapCanvas : http://doc.qgis.org/classQgsMapCanvas.html
18
QgsMapTool : http://doc.qgis.org/classQgsMapTool.html
19
QgisPlugin : http://doc.qgis.org/classQgisPlugin.html
21
QGisInterface is an abstract base class (ABC) that specifies what publicly
22
available features of QGIS are exposed to third party code and plugins. An
23
instance of the QgisInterface is passed to the plugin when it loads. Please
24
consult the QGIS development team if there is functionality required in the
25
QGisInterface that is not available.
27
QgsPlugin is an ABC that defines required behaviour your plugin must provide.
28
See below for more details.
24
30
What are all the files in my generated plugin directory for?
25
31
-------------------------------------------------------------
28
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.
34
This is the generated CMake file that builds the plugin. You should add you
35
application specific dependencies and source files to this file.
30
37
[pluginlcasename].h
31
38
[pluginlcasename].cpp
32
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 concrete implementation 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.
39
This is the class that provides the 'glue' between your custom application
40
logic and the QGIS application. You will see that a number of methods are
41
already implemented for you - including some examples of how to add a raster or
42
vector layer to the main application map canvas. This class is a concrete
43
implementation of QgisPlugin (which defines required behaviour for a plugin).
44
In particular, a plugin has a number of static methods and members so that the
45
QgsPluginManager and plugin loader logic can identify each plugin, create an
46
appropriate menu entry for it etc. Note there is nothing stopping you creating
47
multiple toolbar icons and menu entries for a single plugin. By default though
48
a single menu entry and toolbar button is created and its pre-configured to
49
call the run() method in this class when selected. This default implementation
50
provided for you by the plugin builder is well documented, so please refer to
51
the code for further advice.
34
[pluginlcasename]guibase.ui
35
[pluginlcasename]guibase.ui.h
36
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).
53
[pluginlcasename]gui.ui
54
This is a Qt designer 'ui' file. It defines the look of the default plugin
55
dialog without implementing any application logic. You can modify this form to
56
suite your needs or completely remove it if your plugin does not need to
57
display a user form (e.g. for custom MapTools).
39
60
[pluginlcasename]gui.cpp
40
61
[pluginlcasename]gui.h
41
This is the concrete class where application logic for the above mentioned dialog should go. The world is your oyster here really....
62
This is the concrete class where application logic for the above mentioned
63
dialog should go. The world is your oyster here really....
43
65
[pluginlcasename].qrc
44
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.
66
This is the Qt4 resources file for your plugin. The Makefile generated for your
67
plugin is all set up to compile the resource file so all you need to do is add
68
your additional icons etc using the simple xml file format. Note the namespace
69
used for all your resources e.g. (":/[pluginname]/"). It is important to use
70
this prefix for all your resources. We suggest you include any other images and
71
run time data in this resurce file too.
46
73
[pluginlcasename].png
47
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.
74
This is the icon that will be used for your plugin menu entry and toolbar icon.
75
Simply replace this icon with your own icon to make your plugin disctinctive
50
79
This file contains the documentation you are reading now!