Hi guys,
I've created the new Database menu as discussed at the HF.
This menu is available from QGis trunk r14638.

Here an example which explains how you can insert your plugin into this new
menu:

self.iface.addPluginToDatabaseMenu("&PostGIS", self.action)

and how remove it:

self.iface.removePluginDatabaseMenu("&PostGIS", self.action)

If you want that your python plugin works also with previous QGis version (<
1.7),
you should use the following codes instead.

(add to Database menu)

try:
    self.iface.addPluginToDatabaseMenu("&PostGIS", self.action)
except AttributeError:
    self.iface.addPluginToMenu("&PostGIS", self.action)

----
(remove from Database menu)

try:
    self.iface.removePluginDatabaseMenu("&PostGIS", self.action)
except AttributeError:
    self.iface.removePluginToMenu("&PostGIS", self.action)


I'm going to move the existent trunk Database plugins to the Database menu
and
my (Faunalia) DB plugins too.

Cheers.

-- 
Giuseppe Sucameli
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to