[Qgis-developer] QGIS crash sometimes damages project file

2013-10-14 Thread Andreas Neumann
Hi,

I had it now the second time that a crashing QGIS would damage a project
file. Unfortunately it wasn't myself, but co-workers of me and I did not
exactly see what they did.

According to the users they did not even save the project, just QGIS
crashed and destroyed the .qgs file. Can this really happen?

I examined the .qgs-File after the crash, the file was still
well-formed, but the legend/ element was empty, all the print
composers disappeared and several map layers were missing.

Is this a known-issue?

For now, I set the project-file to read-only to avoid such problems so
that only I as the administrator can modify the file, but it is not the
best solution ...

-
From my wife I also heard that some of her students had this issue of
broken .qgs files after QGIS crashes. So at least this is not only in
our office.
-

I am really sorry that I cannot provide more details now. Just want to
see if others have similar issues and if there are solutions.

Andreas
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Reliable way to determine a groupIndex in the legend tree

2013-10-14 Thread Duarte Carreira
Etienne,

I was not opposing your idea. Just proposing a default behavior for the 
group/children visibility pattern.

I sometimes do have need for your use case. Maybe there could be an option in 
the context menu when right-clicking a layer - eg Mutually exclusive layers. 
A popup window could appear that allows you to select the 2 opposing 
collections of layers, and then these could appear with a radio button in the 
maplegend.

Duarte

De: Etienne Tourigny [mailto:etourigny@gmail.com]
Enviada: sexta-feira, 11 de Outubro de 2013 19:52
Para: Vincent Schut
Cc: qgis-developer
Assunto: Re: [Qgis-developer] Reliable way to determine a groupIndex in the 
legend tree



On Fri, Oct 11, 2013 at 8:35 AM, Vincent Schut 
sc...@sarvision.nlmailto:sc...@sarvision.nl wrote:
On 10/11/13 11:48, Sandro Santilli wrote:
On Fri, Oct 11, 2013 at 09:33:05AM +, Andreas Neumann wrote:
Am 11.10.2013 09:22, schrieb Sandro Santilli:
On Fri, Oct 11, 2013 at 09:13:03AM +, Duarte Carreira wrote:
The group checkbox, imho, should *not always* switch children on/off. You 
should have a modifier to get this as a secondary behavior, like pressing the 
ctrl key when (un)checking the group checkbox. The primary behavior of the 
group switch should be to make the children invisible or visible, regardless of 
the children's visibility being on or off.

In the primary behavior when the parent is turned OFF, the children are not 
drawn but retain their checked or uncheck status.
If you use the secondary behavior then unchecking the parent will uncheck the 
children. Same would apply when checking the parent on.

Agreed, sounds like a sensible behavior to me.

Yes, a sensible behavior.

But there is still use-case for the radio-button like behaviour. Imagine
having a group with a series of orthoimages of different years and you
quickly want to see each year. In this case, the radio-button behaviour
would save you one click. So I don't think that this contradicts the
other proposal listed above here.

Maybe this could be obtained with secondary behavior (SHIFT-click) on layers,
but it sounds like something that easily becomes confusing (conflicting
with radio-on-groups, undefined behavior for unchecking etc.).

switching between several raster layers is exactly the main (only) use I have 
for this, and as we are mainly doing remote sensing stuff here, including lots 
of time series, it is something I really frequently miss. (Practical example: 
you have several Landsat rasters from different times for the same area, all of 
them have clouds but not in the same place. By switching between layers, you 
can easily get a 'cloudfree' view of the entire area.)

I have made the Loop Visible Layers plugin for just that. Add the reaster 
layers you want to see in a group, then select that group in the Loop Visible 
Layers dock and click play. You will see those raster layers one at a time.

IMHO 'undefined behavior for unchecking' should not be a problem; usually 
unchecking simply is disabled for radio groups. I do not know any UI with radio 
groups where you can uncheck a selected item by clicking it again... I think 
having it as a secondary behaviour is just confusing. I'd rather see groups 
have a 'selection type' property, which defines the selection behaviour within 
that group (and on that level only). Could you explain what you mean with 
'conflicting with radio-on-groups' (what are 'radio-on-groups')?


Vincent.


--strk;

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.orgmailto:Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.orgmailto:Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] VTerrain plugin - version 1.0 ( QGis 1.5 - 2.0.1 )

2013-10-14 Thread Geo DrinX
Hello all,


I have problems to upload my new version of VTerrain plugin for QGis,
because I lost the passw for   http://plugins.qgis.org/plugins/VTerrain/

:(

could you please contact me ?


Thank you

Roberto
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Installing qgis 2.0.1

2013-10-14 Thread Paolo Cavallini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all.
I understood that an osgeo standalone package for 2.0.1-3 was underway: am I 
wrong?
In case not, when could we expect it?
Also, in Debian unstable, installation fails because it requires a grass642 
package,
which is not available.
Any hint on how to solve this?
Thanks.
- -- 
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlJcEyQACgkQ/NedwLUzIr4p5wCggtm+qL4wZjOdo9SYnw++myVt
MBYAn0IdCUOWGCyIcKBLTeG5SR48ALa4
=TMe/
-END PGP SIGNATURE-
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Installing qgis 2.0.1

2013-10-14 Thread Paolo Cavallini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Il 14/10/2013 17:52, Paolo Cavallini ha scritto:
 Hi all.
 I understood that an osgeo standalone package for 2.0.1-3 was underway: am I 
 wrong?
 In case not, when could we expect it?
 Also, in Debian unstable, installation fails because it requires a grass642 
 package,
 which is not available.
 Any hint on how to solve this?

also, globe plugin seems to have similar issues on Debian.
all the best.
- -- 
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlJcE58ACgkQ/NedwLUzIr6hTQCeKrD4KGC1I+g+Qcok+5dHjCIo
pKQAoLTwZxyi7sVuWx5z9jdvDJ/qiyYQ
=LWY9
-END PGP SIGNATURE-
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] pgRouting Layer plugin

2013-10-14 Thread Oware Maungu
Hi,
I tested the pgRouting Layer plugin in qgis 1.8 and found out it doesnt work
with pgRouting 2.0 functions.
I found https://github.com/sanak/pgRoutingLayer/ to be more feature
rich(has more shortest path functions)
and would suggest to the plugin owner to update it with @sanak's commits.

Regards

Oware Maungu
GIS Programmer | Applied Geomatics http://appliedgeo.org/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Installing qgis 2.0.1

2013-10-14 Thread Paolo Cavallini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Il 14/10/2013 17:54, Paolo Cavallini ha scritto:

 I understood that an osgeo standalone package for 2.0.1-3 was underway: am I 
 wrong?
 In case not, when could we expect it?
 Also, in Debian unstable, installation fails because it requires a grass642 
 package,
 which is not available.
 Any hint on how to solve this?
 
 also, globe plugin seems to have similar issues on Debian.

BTW, installing it anyway results in:

QGIS died on signal 11
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need set solib-search-path or set sysroot?
[Thread debugging using libthread_db enabled]
Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1.

warning: no loadable sections found in added symbol-file system-supplied DSO at
0x7fffae5fe000
0x7f238d2ce0aa in __libc_waitpid (pid=6688, stat_loc=0x7fffae520cbc, 
options=0)
at ../sysdeps/unix/sysv/linux/waitpid.c:31
31  ../sysdeps/unix/sysv/linux/waitpid.c: File o directory non esistente.
[Current thread is 1 (Thread 0x7f239493c780 (LWP 6687))]
#0  0x7f238d2ce0aa in __libc_waitpid (pid=6688, stat_loc=0x7fffae520cbc,
options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:31
resultvar = 18446744073709551104
oldtype = optimized out
result = optimized out
#1  0x004ec457 in qgisCrash(int) ()
No symbol table info available.
#2  signal handler called
No locals.
#3  0x7f239033cd0c in QMetaObject::indexOfSignal(char const*) const () from
/usr/lib/x86_64-linux-gnu/libQtCore.so.4
No symbol table info available.
#4  0x7f236cccb3bd in ?? () from 
/usr/lib/python2.7/dist-packages/PyQt4/QtCore.so
No symbol table info available.
#5  0x7f236cfbbfa3 in ?? () from /usr/lib/python2.7/dist-packages/sip.so
No symbol table info available.
#6  0x7f236cfbcaec in sip_api_connect_rx () from
/usr/lib/python2.7/dist-packages/sip.so
No symbol table info available.
#7  0x7f236cc95303 in ?? () from 
/usr/lib/python2.7/dist-packages/PyQt4/QtCore.so
No symbol table info available.
#8  0x7f236d308aa4 in PyEval_EvalFrameEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#9  0x7f236d30ab1d in PyEval_EvalCodeEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#10 0x7f236d30acb0 in ?? () from 
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#11 0x7f236d2f6453 in PyObject_Call () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#12 0x7f236d276a5d in ?? () from 
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#13 0x7f236d2f6453 in PyObject_Call () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#14 0x7f236d2fb8ef in ?? () from 
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#15 0x7f236d2f82cf in ?? () from 
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#16 0x7f236d2f6453 in PyObject_Call () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#17 0x7f236d3061e6 in PyEval_EvalFrameEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#18 0x7f236d30ab1d in PyEval_EvalCodeEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#19 0x7f236d30acb0 in ?? () from 
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#20 0x7f236d2f6453 in PyObject_Call () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#21 0x7f236d276a5d in ?? () from 
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#22 0x7f236d2f6453 in PyObject_Call () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#23 0x7f236d2d4d97 in PyEval_CallObjectWithKeywords () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#24 0x7f236d21c7f8 in PyInstance_New () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#25 0x7f236d2f6453 in PyObject_Call () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#26 0x7f236d3061e6 in PyEval_EvalFrameEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#27 0x7f236d308a29 in PyEval_EvalFrameEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#28 0x7f236d308a29 in PyEval_EvalFrameEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#29 0x7f236d30ab1d in PyEval_EvalCodeEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#30 0x7f236d30ae02 in PyEval_EvalCode () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
No symbol table info available.
#31 0x7f236d2375a9 in 

Re: [Qgis-developer] pgRouting Layer plugin

2013-10-14 Thread Anita Graser

Am 14.10.2013, 17:55 Uhr, schrieb Oware Maungu ow...@appliedgeo.org:


Hi,
I tested the pgRouting Layer plugin in qgis 1.8 and found out it doesnt  
work

with pgRouting 2.0 functions.
I found https://github.com/sanak/pgRoutingLayer/ to be more feature
rich(has more shortest path functions)
and would suggest to the plugin owner to update it with @sanak's commits.



Hi Oware,
I've merged Sanak's pull request now. I haven't tested it yet but it  
sounds like you are running it successfully. The plugin metadata needs  
some more love before the plugin can be uploaded to the repository. Any  
contributions welcome.

Best wishes,
Anita





Regards

Oware Maungu
GIS Programmer | Applied Geomatics http://appliedgeo.org/

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Processing: more integration and upgrade

2013-10-14 Thread Paolo Cavallini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all.
I think time is now ripe for a better integration of Processing:
* integrating the excellent tutorial https://github.com/volaya/sextante-manual 
into
the main documentation
* publishing an upgraded version (several smaller and bigger fixes have been 
done,
it's a pity not to let users enjoy them.
Any short term plans for this? I'm available for help if necessary.
All the best.
- -- 
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlJcIbAACgkQ/NedwLUzIr4n5wCeONULOY2KSw1NGooD+sKKZa7z
n7cAn3GS1TN/EX1qMb082R/02JLBPmvw
=UfUN
-END PGP SIGNATURE-
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Processing: more integration and upgrade

2013-10-14 Thread Victor Olaya
 * integrating the excellent tutorial 
 https://github.com/volaya/sextante-manual into
 the main documentation

I plan to integrate that into the training manual, probably along this
week (I'm glad that you like the Processing tutorial... :-) )

 * publishing an upgraded version (several smaller and bigger fixes have been 
 done,
 it's a pity not to let users enjoy them.

Alex wrote a script that builds the resource files, cretaes the zip
file and uploads to the plugin server automatically. We would like to
have that done automatically daily or weekly, to create regular
versions tagged as a experimental, but I want to hear the opinion of
the community about this, to find if there is consensus and most
people think that it is a good idea I have a few minor bug fixes
almost ready to be commited, and once this is done (most likely along
this week), I also want to upload a new stable version.

Opinions on the best way to do this are welcome

Thanks!
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Processing: more integration and upgrade

2013-10-14 Thread Paolo Cavallini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Il 14/10/2013 19:06, Victor Olaya ha scritto:

 I plan to integrate that into the training manual, probably along this
 week (I'm glad that you like the Processing tutorial... :-) )

fine, obviously +1 for me - ready to give feedback from out in the wild

BTW, people in Gibraltar at a conference were rather astonished by QGIS in 
general,
and Processing in particular.

 Opinions on the best way to do this are welcome

+1 for me. I'd suggest to have the usual Debian strategy: publish in 
experimental,
and if no bad bugs are reported for, say, 2 weeks, move that version to stable.

Thanks.
- -- 
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlJcJZ4ACgkQ/NedwLUzIr4PpACdFcqY/wuoU9X1CxYINyG2imbb
9hYAnjeaP6X215PZ4etmhJNU9kJuMbNf
=ak8W
-END PGP SIGNATURE-
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] pgRouting Layer plugin

2013-10-14 Thread Oware Maungu
Hi,
I used the plugin to visualize query results in the pgRouting workshop
http://workshop.pgrouting.org/index.html
The metadata.txt seems ok except for the homepage, tracker and repository
attributes.

Regards

Oware Maungu
GIS Programmer | Applied Geomatics http://appliedgeo.org


On Mon, Oct 14, 2013 at 7:28 PM, Anita Graser anitagra...@gmx.at wrote:

 Am 14.10.2013, 17:55 Uhr, schrieb Oware Maungu ow...@appliedgeo.org:


  Hi,
 I tested the pgRouting Layer plugin in qgis 1.8 and found out it doesnt
 work
 with pgRouting 2.0 functions.
 I found 
 https://github.com/sanak/**pgRoutingLayer/https://github.com/sanak/pgRoutingLayer/to
  be more feature
 rich(has more shortest path functions)
 and would suggest to the plugin owner to update it with @sanak's commits.


 Hi Oware,
 I've merged Sanak's pull request now. I haven't tested it yet but it
 sounds like you are running it successfully. The plugin metadata needs some
 more love before the plugin can be uploaded to the repository. Any
 contributions welcome.
 Best wishes,
 Anita




  Regards

 Oware Maungu
 GIS Programmer | Applied Geomatics http://appliedgeo.org/


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Processing: more integration and upgrade

2013-10-14 Thread matteo
IMHO the processing chapter in the qgis manual has to be a little bit 
updated and integrated.
But I'd add the complete manual of processing in the documentation 
page like the an introduction to gis or the python cookbook.

And add in the qgis processing chapter a link to the complete manual.

Cheers

Matteo


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Plugin [378] Send2GE unapproval notification.

2013-10-14 Thread noreply

Plugin Send2GE unapproval by nextgis.
The plugin version [378] Send2GE 0.0.4 Experimental is now unapproved
Link: http://plugins.qgis.org/plugins/send2google_earth/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Plugin [378] Send2GE unapproval notification.

2013-10-14 Thread noreply

Plugin Send2GE unapproval by nextgis.
The plugin version [378] Send2GE 0.0.4 Experimental is now unapproved
Link: http://plugins.qgis.org/plugins/send2google_earth/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Plugin [378] Send2GE approval notification.

2013-10-14 Thread noreply

Plugin Send2GE approval by nextgis.
The plugin version [378] Send2GE 0.0.5 Experimental is now approved
Link: http://plugins.qgis.org/plugins/send2google_earth/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Plugin [378] Send2GE approval notification.

2013-10-14 Thread noreply

Plugin Send2GE approval by nextgis.
The plugin version [378] Send2GE 0.0.5 Experimental is now unapproved
Link: http://plugins.qgis.org/plugins/send2google_earth/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] VTerrain plugin - version 1.0 ( QGis 1.5 - 2.0.1 )

2013-10-14 Thread Etienne Tourigny
You need to provide your osgeo user id and password. To recover your lost
password go to the osgeo page at https://www.osgeo.org/user


On Mon, Oct 14, 2013 at 12:52 PM, Geo DrinX geodr...@gmail.com wrote:

 Hello all,


 I have problems to upload my new version of VTerrain plugin for QGis,
 because I lost the passw for   http://plugins.qgis.org/plugins/VTerrain/


 :(

 could you please contact me ?


 Thank you

 Roberto

 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] how to add labels to PluginLayer? - please help!

2013-10-14 Thread Mikhail Tchernychev

Hi,

Apparently no one is to help me... I found it is not simply possible to put
labels at where I want on the plugin layer. Apparently no one is using 
QGsLabel

anymore, and documentation is missing or obscure...

Qgis keeps crashing on me when I try to add label in python, which I 
believe is a bug

anyway.

Regards,
Mikhail

Original post:


Hi,

I am trying to add labels to the plugin  layer. What I use in draw()
is:

  fields = QgsFields()
  fields.append(QgsField('0', QtCore.QVariant.String, 'string', 32))
  fields.append(QgsField('8', QtCore.QVariant.Double, 'double', 8))
  fields.append(QgsField('9', QtCore.QVariant.Double, 'double', 8))

  feat =  QgsFeature(fields)
  label = QgsLabel(fields)
  feat.setAttribute('0','Test Text')
  feat.setAttribute('8', -8.66774)
  feat.setAttribute('9', 37.08391)

  label.renderLabel(renderContext, feat, False)

- QGIS crashes (2.0.1, stock version, Linux)

There is almost no doc on how to add labels to the layer
I am trying to mimic field 'Text' 'XCoordinate' and 'YCoordinate'
with '0', '8' and '9' based on enum LabelField

Apparently also some change in the Api since 1.8, I was
using GridPlugin from 1.8 as example, but something is different now.

Could anyone shed some light on it?

I am actually developing Lat/Lon grid plugin for QGIS, which I think
very much needed.

Thank you
Mikhail 


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] how to add labels to PluginLayer?

2013-10-14 Thread Mikhail
Hi,

Apparently no one is to help me... I found it is not simply possible to put
labels at where I want on the plugin layer. Apparently no one is using
QGsLabel
anymore, and documentation is missing or obscure...

Qgis keeps crashing on me when I try to add label in python, which I believe
is a bug 
anyway.

Regards,
Mikhail



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/how-to-add-labels-to-PluginLayer-tp5082971p5083501.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Processing: more integration and upgrade

2013-10-14 Thread Filipe Dias
 Opinions on the best way to do this are welcome

+1 Personally I would prefer to have daily versions. It is highly
motivating for users and testers to report a bug and to have Processing
fixed and available in the next day. I would not mind to have to use an
external software to get the most recent code (e.g. Tortois svn or
equivalent).


On Mon, Oct 14, 2013 at 6:10 PM, Paolo Cavallini cavall...@faunalia.itwrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Il 14/10/2013 19:06, Victor Olaya ha scritto:

  I plan to integrate that into the training manual, probably along this
  week (I'm glad that you like the Processing tutorial... :-) )

 fine, obviously +1 for me - ready to give feedback from out in the wild

 BTW, people in Gibraltar at a conference were rather astonished by QGIS in
 general,
 and Processing in particular.

  Opinions on the best way to do this are welcome

 +1 for me. I'd suggest to have the usual Debian strategy: publish in
 experimental,
 and if no bad bugs are reported for, say, 2 weeks, move that version to
 stable.

 Thanks.
 - --
 Paolo Cavallini - Faunalia
 www.faunalia.eu
 Full contact details at www.faunalia.eu/pc
 Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.15 (GNU/Linux)
 Comment: Using GnuPG with Icedove - http://www.enigmail.net/

 iEYEARECAAYFAlJcJZ4ACgkQ/NedwLUzIr4PpACdFcqY/wuoU9X1CxYINyG2imbb
 9hYAnjeaP6X215PZ4etmhJNU9kJuMbNf
 =ak8W
 -END PGP SIGNATURE-
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] how to add labels to PluginLayer? - please help!

2013-10-14 Thread Mikhail Tchernychev

It appeared that I made it work. It might be not the best way,but it works.
It also might get outdated as new labeling engine being developed.

1. In the __init__ I add:

   self.fields = QgsFields()
   self.label = QgsLabel(self.fields)

Not sure I need to keep object QgsLabel but I do.
Also self.fields are actually not used,  this is just requirement
for QgsLabelconstructor


2. In the function to draw label:

   # again, fields has nothing inside

fields = QgsFields()
   feat = QgsFeature(fields)


# init number of attributes with the same number of fields
# as enum LabelFields in the QgsLabel class
# this is just for convenience and is not very nice

   feat.initAttributes(QgsLabel.LabelFieldCount)

# set feature geometry as a point. Here x,y is position of the label

feat.setGeometry(QgsGeometry.fromPoint(QGpsPoint(x,y)))

# now we have two options to set label options: or we use
# label itself or we use feature feat It is better to use label itself
# for font, color etc if we draw bunch of labels. Here is how can be done:
# ( example from my dialog)

self.label.labelAttributes().setFamily(self.dlg.label_attributes.family())
self.label.labelAttributes().setBold(self.dlg.label_attributes.bold())
self.label.labelAttributes().setItalic(self.dlg.label_attributes.italic())
self.label.labelAttributes().setUnderline(self.dlg.label_attributes.underline())
self.label.labelAttributes().setStrikeOut(self.dlg.label_attributes.strikeOut())
self.label.labelAttributes().setSize(self.dlg.label_attributes.size(), 
core.QgsLabelAttributes.PointUnits)

self.label.labelAttributes().setColor(QtGui.QColor.fromRgba(self.dlg.label_attributes.color().rgba()))

# the rest of the attribute we set using feature feat
# note that above call feat.initAttributes(QgsLabel.LabelFieldCount)is
# essential for to allow setting these attributes as below


feat.setAttribute(QgsLabel.Angle,90.)
feat.setAttribute(QgsLabel.Alignment, 'right')

# etc.  Noe that now we need to tell QgsLabel where to search for the 
attributes.
#  Because we created the same number of feature attributes as size of 
enum LabelField

# we can tell it this way:

self.label.setLabelField(QgsLabel.Text,QgsLabel.Text)
self.label.setLabelField(QgsLabel.Angle,QgsLabel.Angle)
self.label.setLabelField(QgsLabel.Alignment,QgsLabel.Alignment)

# Note that first and second argument is the same but this is only
# because number of feature attributes was set the same as LabelField size.
# many of the attributes this way remain unset.
# note that you also can specify font, color etc using 
self.label.setLabelField()


# finally draw the labels. I used function drawLabels(self, renderContext)
# Just add:

self.label.renderLabel(renderContext, feat, False)


Best Regards,
Mikhail











On 10/14/2013 12:01 PM, Mikhail Tchernychev wrote:

Hi,

Apparently no one is to help me... I found it is not simply possible 
to put
labels at where I want on the plugin layer. Apparently no one is using 
QGsLabel

anymore, and documentation is missing or obscure...

Qgis keeps crashing on me when I try to add label in python, which I 
believe is a bug

anyway.

Regards,
Mikhail

Original post:


Hi,

I am trying to add labels to the plugin  layer. What I use in draw()
is:

  fields = QgsFields()
  fields.append(QgsField('0', QtCore.QVariant.String, 'string', 32))
  fields.append(QgsField('8', QtCore.QVariant.Double, 'double', 8))
  fields.append(QgsField('9', QtCore.QVariant.Double, 'double', 8))

  feat =  QgsFeature(fields)
  label = QgsLabel(fields)
  feat.setAttribute('0','Test Text')
  feat.setAttribute('8', -8.66774)
  feat.setAttribute('9', 37.08391)

  label.renderLabel(renderContext, feat, False)

- QGIS crashes (2.0.1, stock version, Linux)

There is almost no doc on how to add labels to the layer
I am trying to mimic field 'Text' 'XCoordinate' and 'YCoordinate'
with '0', '8' and '9' based on enum LabelField

Apparently also some change in the Api since 1.8, I was
using GridPlugin from 1.8 as example, but something is different now.

Could anyone shed some light on it?

I am actually developing Lat/Lon grid plugin for QGIS, which I think
very much needed.

Thank you
Mikhail 


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer