[Qgis-developer] cpp-plugin for QGIS 2.0

Richard Duivenvoorde rdmailings at duif.net
Wed Nov 6 08:54:53 PST 2013


On 06-11-13 13:03, SSchmidt at gfi-gis.de wrote:
> 
> Hello,
> 
> now i try my luck here hoping not being ignored :-)
> 
> I want to write a plugin for QGIS 2.0 Dufour in C++. Do I have to take
> the sources/API from Version 1.8 (Lisboa)? It is right, that the actual
> API only can be used for the actual Releases(Weekly Master)? In this
> case I have to download the actual sources and recompile it everytime I
> want to deploy it?
> 
> Thanks for any suggestions.

Hi Susann,

Any reason to not write your plugin in python? It is much easier (to
start with).

But if you want to write a C++ for QGIS 2.0, you will have to program
against the 2.0 api:
http://qgis.org/api/2.0/

Myself I have no experience with writing cpp plugins, and I do not think
there is very much documentation about it..
I found this link:
http://hub.qgis.org/wiki/17/Writing_C++_Plugins_%5BNew%5D
I tried the plugin_builder.py script which is mentioned there, and all
was working/building fine (also a nice README). Only the links in the
created dialog are not ok anymore:

In particular look at the following classes:

QGisInterface
http://svn.qgis.org/api_doc/html/classQgisInterface.htm
QgsMapCanvas
http://svn.qgis.org/api_doc/html/classQgsMapCanvas.html
QgsMapTool
http://svn.qgis.org/api_doc/html/classQgsMapTool.html
QgsPlugin
http://svn.qgis.org/api_doc/html/classQgisPlugin.html

instead of
http://svn.qgis.org/api_doc/html
use
http://qgis.org/api/2.0/

Good luck and have fun (again... why not python?)

Where did you feel ignored anyway?

Regards,

Richard Duivenvoorde



More information about the Qgis-developer mailing list