[Qgis-developer] question on Adding plugin to qgis

nitin quick quick.nitin at gmail.com
Fri Jun 2 06:52:06 EDT 2006


i followed the pages i found at Qgis Wiki about plugin design and got it
done. One issue i couldn't understand is no connections for OK and Cancel
button are not specified in NorthArrow plugin code plugingui.cpp/plugin.cpp.
Same i tried to do but i couldn't get desired output, connection for
pbnOK_clicked() was not formed with click button event. I. For my code i
have code that part myself. I couldn't understand this?  kindly guide me in
it.

On 5/30/06, Tim Sutton <tim at linfiniti.com> wrote:
>
> Hi
>
> Note there is a script in src/plugins/plugin_builder.pl that will
> generate a plugin template for you that is all ready for your own
> customisations.
>
> If you do folow the approach you took of cloning an existing plugin,
> be sure to modify configure.in too to make sure it gets built. The
> plugin builder script does this all for you.
>
> Regards
>
> Tim
>
> On 5/30/06, humarco <marco.hugentobler at karto.baug.ethz.ch> wrote:
> > Hi nitin,
> >
> > Am Montag 29 Mai 2006 10:18 schrieb nitin quick:
> > > Hello Everybody,
> > > I am currently using qgis0.7.9 downloaded from svn installed on FC4.
> > > I need to add plugin to qgis which will display direction of wind.
> > > NorthArrow Plugin provides similar functionality. So i did make copy
> of
> > > that code put my Cock.png file path in place of north_arrow in a new
> folder
> > > named Cock in src/plugins/. I changed the code a bit ( north_arrow to
> Cock
> > > , just change of name). and addition in configure script similar o
> existing
> > > code. Now my questions are:
> > > i). Am i doing correect for adding a new plugin? Is it good way or
> there is
> > > scope of improvement which i think will be?
> > > ii) Is it required to compile Qgis fully to make my plugin
> functionable .
> > > Is there any way where i can only compile new plugin code and link it
> > > dynamiclly.
> >
> > There is nothing wrong in creating new plugins by looking how existing
> ones
> > work. If you also copied and adapted the auto* stuff of the NorthArrow
> > plugin, then your plugin should be built together with qgis. But it is
> not
> > required to compile the whole qgis for your plugin. You may just compile
> the
> > sources of your plugin into a shared library without building qgis from
> > source. All you need for it is the qt and qgis headers and of course you
> need
> > to link the plugin to the qgis libraries (libgui, libraster, ...).
> >
> > > iii)For adding plugin menu to GUI we are using code ..
> > >
> > >     qGisInterface->addPluginMenu(tr("&Decoration"),myQActionPointer);
> > >   what does "&Decoration" signify here.
> >
> > "Decoration" is the name of the menu entry (and Control-D the shortcut
> for it)
> >
> > > Any suggestions on any study material or tutorial which will help me
> in
> > > designing plugin are welcome. I am currently reading  source code to
> do so.
> >
> > On the qgis wiki, there are several articles about plugin programming:
> >
> >
> http://wiki.qgis.org/qgiswiki/DevelopersCorner#head-3709e61959139ab8995e0542a9ad930c2d17090a
> >
> > section 'Help on writing plugins'
> >
> > Marco
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.qgis.org
> > http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
> >
>
>
> --
> Tim Sutton
>
> Visit http://qgis.org for a great Open Source GIS
> Skype: timlinux
> MSN: tim_bdworld at msn.com
> Yahoo: tim_bdworld at yahoo.com
> Jabber: timlinux
> Irc: timlinux on #qgis at freenode.net
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20060602/7532185c/attachment.html


More information about the Qgis-developer mailing list