[Qgis-developer] Plugin snippets & cookbook

Tim Sutton lists at linfiniti.com
Fri Mar 30 06:46:45 EDT 2012


On Fri, Mar 30, 2012 at 11:57 AM, Denis Rouzaud <denis.rouzaud at gmail.com> wrote:
> Hi all,
> First, I propose to add these three lines in the code snippets. It is to
> include help link in thew plugin menu:
> def initGui(self):
>  # This initiates the action
>  self.helpAction = QAction(QIcon(":/plugins/myplugin/icons/help.png"),
> "Help", self.iface.mainWindow())
>  # This will open the website url using user's defined browser
>  QObject.connect(self.helpAction, SIGNAL("triggered()"), lambda:
> QDesktopServices.openUrl(QUrl("http://my.help.site/formyplugin")))
>  # This will add the help link in the plugin menu, under the entry "My
> Plugin"
>  self.iface.addPluginToMenu("&My plugin", self.helpAction)
> What do you think?
> Can someone add this or tell me how to do it?

It would be great to add it to http://snippets.qgis.org/snippets/ (you
just need a valid osgeo account for login there).

We should add a link to the snippets site in the cookbook.

The snippets is for 'random stuff' - the cookbook should cover
specific functionality in a sequential and structured way.



> Also, if I'd like to share a few lines of plugins for demo, what's the best
> way? A blog or code snippets in cookbook?
> Thanks
> Denis
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer

Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Visit http://linfiniti.com to find out about:
 * QGIS programming and support services
 * Mapserver and PostGIS based hosting plans
 * FOSS Consulting Services
Skype: timlinux
Irc: timlinux on #qgis at freenode.net

More information about the Qgis-developer mailing list