[Qgis-developer] WG: Re: cpp-plugin for QGIS 2.0

SSchmidt at gfi-gis.de SSchmidt at gfi-gis.de
Thu Nov 7 00:35:50 PST 2013


Thanks to Richard and Andreas for their help!

Why not python? In the last year our company began developing an extension 
for ArcGIS 10 in .Net C#. Our intention is a similar working plugin in 
QGis. For me it was first easier to port the Code to C++. Indeed i'm not a 
save C++-Programmer but from python i don't understand anything. And so 
the decision comes to C++.
The start over a year ago was not so easy but for Lisboa i could get a 
small testplugin get running. Then i've made an error and get new sources 
from github and my plugin only runs with the weekly masters. So 
sporadically when I added some features to my plugin i get the new sources 
from github and the adequate weekly build to test my plugin. So all seems 
well,  I thought I wait for the new Version (2.0 Dufour) and then we could 
have a nice beta-version of our plugin. But now i can't get running the 
plugin in 2.0, only in 2.1 its working. I get no error in 2.0, it isn't 
shown in the pluginlist, not even in red. So i don't know the reason. I 
assumed it was the api break between 1.9 and 2.0. 
Maybe i don't have the right proceeding. But how can I get the sources of 
2.0 to compile my project in VS 2010, from github i get only the actual. 
Is this the fault? I don't know. 

Freundliche Grüße aus Leipzig
Susann Schmidt
Softwareentwicklung 

**************************************************************

GFI - Gesellschaft für Informationstechnologie mbH
Philipp-Rosenthal-Straße 9
D-04103 Leipzig
Geschäftsführer: Andreas Richter
Amtsgericht Leipzig HRB 12054
USt.-IdNr.: DE179049354     Steuer-Nr.: 231/109/06412
ESRI Solution Partner      und       ER Mapper Reseller
Tel. 0341 961 3310    Fax 0341 961 3311   Mail info at gfi-gis.de
Web  www.gfi-gis.de  und  www.themenbrowser.de

----- Forwarded by Susann Schmidt/gfi on 07.11.2013 09:02 -----

Richard Duivenvoorde <rdmailings at duif.net> 
06.11.2013 18:01
Please respond to
richard at duif.net


To
SSchmidt at gfi-gis.de, qgis-developer at lists.osgeo.org
cc

Subject
Re: [Qgis-developer] cpp-plugin for QGIS 2.0






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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20131107/d7c456f2/attachment.html>


More information about the Qgis-developer mailing list