[Qgis-user] Qgis Python plig-in. How can I change the nesting of groups?

2011-04-04 Thread dimamix
Hi. Question about the groups and layers in the python plug-in for (Qgis v.1.6) #I created several groups. grp1 = qgis.utils.iface.legendInterface (). addGroup ("grp1", -1) grp2 = qgis.utils.iface.legendInterface (). addGroup ("grp2", -1) #I created a layer of vlayer = QgsVectorLayer ('c: \ d

[Qgis-user] Qgis Python plig-in. How can I change the nesting of groups?

2011-04-18 Thread Bernhard . Stroebl
Dear Marco (or anybody), sorry to pick up this thread again. Could you give an example on how to use QgsLegendInterface.addGroup() with a parent? If I want my new Group to be nested in let's say "GroupA" I would need GroupA's QTreeWidgetItem. How can I access it in the first place? regards B

Re: [Qgis-user] Qgis Python plig-in. How can I change the nesting of groups?

2011-04-05 Thread Marco Bernasocchi
In 1.6 is not possible yet, i patched trunk 2-3 weeks ago. Now when you create a new group you can pass a parent element Where the group will be nested. Hope it helps Ciao Marco Bernasocchi (mobile) ___ Qgis-user mailing list Qgis-user@lists.osgeo.org ht

Re: [Qgis-user] Qgis Python plig-in. How can I change the nesting of groups?

2011-04-20 Thread Marco Bernasocchi
Hi Bernhard, I just wrote a patch for trunk to make this functionality available to python. it has not been applied yet [1] but it probably will soon. after that, you need to do the following (please note that nesting as well as deleting nested groups is only supported at top level groups for now):

Re: [Qgis-user] Qgis Python plig-in. How can I change the nesting of groups?

2011-04-20 Thread Bernhard . Stroebl
Hi Marco, thank you for your answer. Your code is exactly how I expected the addGroup slot should work. I will check in the next couple of days if the patch has been applied. thanks again Bernhard Am 20.04.2011 14:05, schrieb Marco Bernasocchi: Hi Bernhard, I just wrote a patch for trunk t

Re: [Qgis-user] Qgis Python plig-in. How can I change the nesting of groups?

2011-04-21 Thread Marco Bernasocchi
applied... ciao Marco On 04/20/2011 02:05 PM, Marco Bernasocchi wrote: > Hi Bernhard, I just wrote a patch for trunk to make this functionality > available to python. it has not been applied yet [1] but it probably > will soon. > after that, you need to do the following (please note that nesting a

Re: [Qgis-user] Qgis Python plig-in. How can I change the nesting of groups?

2011-04-27 Thread Bernhard . Stroebl
Hi Marco, I updated QGIS to the last 1.7 pre-Version and this works now: li=self.iface.legendInterface() p=li.addGroup("Parent", False) c1=li.addGroup("Child1", False, p) c2=li.addGroup("Child2", False, p) p is a valid index within li, so li.groupExists(p) returns True _BUT_ c1 and c2 are relat

Re: [Qgis-user] Qgis Python plig-in. How can I change the nesting of groups?

2011-04-27 Thread Marco Bernasocchi
Hi bernhard, This is a known limitation wiht all the methods of that interface. See the ticket for details. Ciao On 27 Apr 2011 11:15, wrote: > Hi Marco, > > I updated QGIS to the last 1.7 pre-Version and this works now: > li=self.iface.legendInterface() > p=li.addGroup("Parent", False) > c1=li.ad

Re: [Qgis-user] Qgis Python plig-in. How can I change the nesting of groups?

2011-04-27 Thread Bernhard . Stroebl
Hi Marco, so this will be the QgsLegendInterface redesign you discussed for the past 1.7 release. I can live without until then :) thank you for your effort Bernhard Am 27.04.2011 11:32, schrieb Marco Bernasocchi: Hi bernhard, This is a known limitation wiht all the methods of that interfac

Re: [Qgis-user] Qgis Python plig-in. How can I change the nesting of groups?

2011-04-27 Thread Marco Bernasocchi
Hi Bernard, I've my masters dedline on friday :) after that I will probably look into the issue in more detail :) but it won't happen until AFTER 1.7 is released ciao Marco On 04/27/2011 11:49 AM, bernhard.stro...@jena.de wrote: > Hi Marco, > > so this will be the QgsLegendInterface redesign you