~ubuntu-branches/ubuntu/wily/qgis/wily

« back to all changes in this revision

Viewing changes to src/plugins/plugin_template/README.whatnext

  • Committer: Bazaar Package Importer
  • Author(s): Johan Van de Wauw
  • Date: 2010-07-11 20:23:24 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100711202324-5ktghxa7hracohmr
Tags: 1.4.0+12730-3ubuntu1
* Merge from Debian unstable (LP: #540941).
* Fix compilation issues with QT 4.7
* Add build-depends on libqt4-webkit-dev 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Welcome to your automatically generated plugin!
2
2
-------------------------------------------------------------
3
3
 
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.
5
6
 
6
7
Documentation:
7
8
-------------------------------------------------------------
8
9
 
9
10
You really need to read the QGIS API Documentation now at:
10
11
 
11
 
http://svn.qgis.org/api_doc/html/
 
12
http://doc.qgis.org/
12
13
 
13
14
In particular look at the following classes:
14
15
 
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
19
 
 
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.
21
 
 
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
 
20
 
 
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.
 
26
 
 
27
QgsPlugin is an ABC that defines required behaviour your plugin must provide.
 
28
See below for more details.
23
29
 
24
30
What are all the files in my generated plugin directory for?
25
31
-------------------------------------------------------------
26
32
 
27
 
Makefile.am  
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.
 
33
CMakeLists.txt
 
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.
29
36
 
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.
33
52
 
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).
37
58
 
38
59
 
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....
42
64
 
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.
45
72
 
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
 
76
from the rest.
48
77
 
49
78
README
50
79
This file contains the documentation you are reading now!
53
82
Getting developer help:
54
83
-------------------------------------------------------------
55
84
 
56
 
For Questions and Comments regarding the plugin builder template and creating your features in QGIS using the plugin interface please contact us via:
 
85
For Questions and Comments regarding the plugin builder template and creating
 
86
your features in QGIS using the plugin interface please contact us via:
57
87
 
58
88
 * the QGIS developers mailing list, or
59
89
 * IRC (#qgis on freenode.net)
60
90
 
61
 
QGIS is distributed under the Gnu Public License. If you create a useful plugin please consider contributing it back to the community.
 
91
QGIS is distributed under the Gnu Public License. If you create a useful plugin
 
92
please consider contributing it back to the community.
62
93
 
63
94
Have fun and thank you for choosing QGIS.
64
95
 
65
96
The QGIS Team
66
 
2006
 
97
2007