[Qgis-developer] setToolTip on Legend Group?

2014-10-03 Thread Andrew McClure
Ok gurus, this one has got me.

Any way to access the underlying  QTreeWidgetItems?




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


Re: [Qgis-developer] Possible bug in composer

2014-10-03 Thread Nyall Dawson
> 2014-10-03 22:13 GMT+02:00 Carlos López PSIG :
>>
>> Hi,
>> I think that I've found a possible bug in Composer.
>>
>> I created a composer, I added a map, and I saved "Main properties" like
"Cache".
>> Then Save the project, close, and then when I open in Main properties
convert to "Rectangle"!
>> This produces that the map doesn't show correctly.
>>
>> Is it a bug??
>> Should I open a ticket?
>>

Hi Carlos,

There's an existing issue for this:
http://hub.qgis.org/issues/6085

Unfortunately it's caused by a bug in the Qt libraries, so we need to wait
until it is fixed upstream.

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

Re: [Qgis-developer] Possible bug in composer

2014-10-03 Thread Carlos López PSIG
Hi,
I forgot to say that I'm testing the version 2.5 in ubuntu 14.04 LTS 64
bits.

I'm going to testing more


* *

*Carlos López Quintanilla*

www.psig.es
carlos.lo...@psig.es
+34 699.680.261



2014-10-03 22:13 GMT+02:00 Carlos López PSIG :

> Hi,
> I think that I've found a possible bug in Composer.
>
> I created a composer, I added a map, and I saved "Main properties" like
> "Cache".
> Then Save the project, close, and then when I open in Main properties
> convert to "Rectangle"!
> This produces that the map doesn't show correctly.
>
> Is it a bug??
> Should I open a ticket?
>
> Best regards,
>
> *Carlos López Quintanilla*
>
> www.psig.es
> carlos.lo...@psig.es
> +34 699.680.261
>
>
>
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Possible bug in composer

2014-10-03 Thread Carlos López PSIG
Hi,
I think that I've found a possible bug in Composer.

I created a composer, I added a map, and I saved "Main properties" like
"Cache".
Then Save the project, close, and then when I open in Main properties
convert to "Rectangle"!
This produces that the map doesn't show correctly.

Is it a bug??
Should I open a ticket?

Best regards,

*Carlos López Quintanilla*

www.psig.es
carlos.lo...@psig.es
+34 699.680.261
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Symbology api

2014-10-03 Thread Martin Dobias
Hi Vincent

On Fri, Oct 3, 2014 at 1:10 PM, Vincent Mora  wrote:
>
> We can use expressions to make the single symbol layer behave:
> - graduated : properties are continuous functions of attributes,
> - categorized or rule based : properties are discrete function of attributes
>
> The user interfaces for categorized, graduated, rule-based could remain the
> same, it's just that it would generate the expressions for the single symbol
> instead of configuring as specific class. Several categories could be
> defined to affect various parameters (color and size are the first use
> case).
>
> Can you tell me if the idea is sound ?

If I understand correctly, you propose to use single symbol renderer
with expressions (for color and for size) in places where we currently
use graduated/categorized renderers. Is that correct? If it is, how
would it handle the case where symbols of individual classes are
completely different? (not just varying in size/color)

It would be also good to check the impact on the rendering performance
- maybe if more than just few classes are used, the evaluation with
expressions could slow things down significantly. (the expression
engine could enjoy some performance improvements).

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


Re: [Qgis-developer] Symbology api

2014-10-03 Thread Chris Crook
Interesting idea.

At the moment the graduated renderer colour is also a discrete function of 
attributes.  Changing to a continuous function (or having a continuous function 
alternative) would mean changing the legend interface somewhat.

I've been thinking about how to better implement the Vector Field Renderer 
plugin (written before expression based renderering, uses a python renderer) 
and I'm thinking that it only needs a few more expression based properties in 
the symbology to be able to replace the python rendering (independent x,y 
scaling and offset of symbols, and an x,y offset or more simply just an affine 
transformation maybe).  Also (if it is not already present) some functions for 
determining map scale in expressions.

Cheers
Chris


From: Vincent Mora [vincent.m...@oslandia.com]
Sent: 04 October 2014 00:10
To: qgis-dev
Subject: [Qgis-developer] Symbology api

Hi all,

While thinking about the interface of categorized and graduated
symbology with varying size (instead of color) I had an idea to reduce
the code complexity in src/core/symbology-ng (~15% less code).

Since it changes the symbology API, I'd like your input on that:

At the moment we deal with categorized, graduated, rule-based and single
symbol with different classes.

At the same time the single symbol allows to use expressions for all
symbol properties.

We can use expressions to make the single symbol layer behave:
- graduated : properties are continuous functions of attributes,
- categorized or rule based : properties are discrete function of
attributes

The user interfaces for categorized, graduated, rule-based could remain
the same, it's just that it would generate the expressions for the
single symbol instead of configuring as specific class. Several
categories could be defined to affect various parameters (color and size
are the first use case).

Can you tell me if the idea is sound ?

V.



PS: (implementation detail)

Data defined properties are treated as a special case in the symbology
classes.

Since a constant is a valid expression, why not avoid this special
treatment and have properties being always expressions in the symbology
classes ?


This message contains information, which may be in confidence and may be 
subject to legal privilege. If you are not the intended recipient, you must not 
peruse, use, disseminate, distribute or copy this message. If you have received 
this message in error, please notify us immediately (Phone 0800 665 463 or 
i...@linz.govt.nz) and destroy the original message. LINZ accepts no 
responsibility for changes to this email, or for any attachments, after its 
transmission from LINZ. Thank You.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] RFC for python server plugins ready for voting

2014-10-03 Thread Alessandro Pasotti
Hello,

this afternoon at the HF in Essen we had a meeting about my proposal
to implement python plugins for the server side

https://github.com/qgis/QGIS-Enhancement-Proposals/pull/4

I've collected your comments and finalized the proposal with the more
complete implementation, that will offer much more flexibility for
plugins to implement new features and modify existing ones.

If you like you can read the slides online here:
http://www.itopen.it/qgis-server-plugins/

The RFC is now open for voting, please give some feed-back!

Thanks!

-- 
Alessandro Pasotti
w3:   www.itopen.it
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] QgsAttributeDialog() working example

2014-10-03 Thread Andrew McClure
Alexandre

Feel free to see a working example in the latest release of TelemetryLayer

https://github.com/nzfarmer1/telemetrylayer/blob/master/tlbrokerconfig.py  
(Line : 143)

If you install the plugin you can see it working by double clicking a group in 
the legend.

There's also an example showing how to wrap the dialog init within a class with 
state and to reflect dynamic changes made to the features while the dialog is 
open

https://github.com/nzfarmer1/telemetrylayer/blob/master/featureforms/editformfactory.py
https://github.com/nzfarmer1/telemetrylayer/blob/master/tltopicmanager.py

(Code's a bit rough as this is a work in progress)




> Hello,
> 
> even calling startEditing() programmatically, I don't seem to be able to open 
> the Form in editable mode.
> 
> Any help with this will be appreciated
> 
> Thanks,
> 
> Alexandre Neto
> 
> On Thu, Oct 2, 2014 at 6:33 AM, Andrew McClure  wrote:
> I found this thread very helpful.  It seems to be that to the dialog into 
> edit mode this has to be done programmatically by calling startEditing() - 
> not by simply having the layer in edit mode.   Can anyone else verify that?   
> Regardless, thanks for the pointers and suggestions in the thread. Much 
> appreciated.
> 
> On 30/09/2014, at 8:12 pm, Alexandre Neto  wrote:
> 
>> Hi
>> 
>> On Tue, Sep 30, 2014 at 6:42 AM, Denis Rouzaud  
>> wrote:
>> 
>> 
>> If you want to open a feature form like doing it from QGIS, just run:
>> 
>> iface.openFeatureForm(layer, feature, false, true/false) 
>> 
>> http://qgis.org/api/classQgisInterface.html#a11b90f38afd09ac5e9f363933ee4a509
>> 
>> Cheers,
>> 
>> Denis
>> 
>> 
>> Actually this how my plugin worked back in QGIS 2.2. But in the latest 
>> versions the iface.openFeatureForm() is always in add mode (like 
>> setIsAddDialog). That is, after accepting the dialog, it adds a new feature, 
>> and does not update my temporary feature. This leaves no room for any 
>> changes before the feature commit. I described my problem in the following 
>> bug report, and Matthias Kuhn adviced me to create my own Dialog, so that's 
>> what I'm trying to do. I would be glad to use iface.openFeatureForm() only
>> 
>> https://hub.qgis.org/issues/11099
>> 
>> Thanks for your help
>> 
>> Alexandre
>> 
>> 
>> 
>> 
>> 
>>  
>> 
>> 
>> On 29.09.2014 18:19, Alexandre Neto wrote:
>>> Hello Salvatore,
>>> 
>>> You were right, I just needed to import the class first, this have opened 
>>> the form for me:
>>> 
>>> from qgis.gui import QgsAttributeDialog
>>> mc = iface.mapCanvas()
>>> layer = mc.currentLayer()
>>> temp_feature.setAttributes(attributes)
>>> dialog = QgsAttributeDialog(layer, temp_feature, True)
>>> dialog.show()
>>> 
>>> But now I can't make it editable.
>>> 
>>> All I can do is cancel the dialog.
>>> 
>>> Thanks for your help,
>>> 
>>> Alexandre Neto
>>> 
>>> 
>>> 
>>> On Mon, Sep 29, 2014 at 4:21 PM, Salvatore Larosa  
>>> wrote:
>>> Hi,
>>> 
>>> On Mon, Sep 29, 2014 at 4:56 PM, Alexandre Neto  
>>> wrote:
>>> > Hello,
>>> >
>>> > I'm trying to open an attribute dialog for a temporary feature using
>>> > QgsAttributeDialog(). but with no luck. Can anyone point me to working
>>> > example?
>>> > I'm trying something like this:
>>> >
>>> >>
>>> >> mc = iface.mapCanvas()
>>> >> layer = mc.currentLayer()
>>> >> dialog = QgsAttributeDialog(layer, temp_feature)
>>> >> dialog.show()
>>> 
>>> I think you should to import the class before and setting the feature
>>> owner bool parameter.
>>> after this changes the snippet should work fine for you!
>>> 
>>> Regards,
>>> -SL
>>> 
>>> --
>>> Salvatore Larosa
>>> linkedIn: http://linkedin.com/in/larosasalvatore
>>> twitter: @lrssvt
>>> skype: s.larosa
>>> IRC: lrssvt on freenode
>>> 
>>> 
>>> 
>>> ___
>>> 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 mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Error NetCDF on qgis_mapserver

2014-10-03 Thread Ronaldo palmeira
Dear all,

I was trying to use a qgis project in qgis_mapserver following a tutorial.
The project with simple layers using shape files works fine!! But when I
tried to use a project with NetCDF raster layer, it no shows and apache
complaint about netcdfdataset.cpp:

/var/log/apache2/error.log
ERROR 1: netcdf error #-33 : NetCDF: Not a valid ID .
at (netcdfdataset.cpp,~netCDFDataset,1549)

Is that a problem with qgis_mapserver compilation? Is there some compiled
with theses libraries?

regards,


*Ronaldo Maia de Jesus Palmeira*
*Doutorando em Engenharia Oceânica *
*Grupo de Processos Oceânicos - GruPO*
*palme...@gmail.com *
*  |  palme...@ufrj.br UFRJ | Universidade Federal do Rio
de Janeiro*

*"A percepção do desconhecido é a mais fascinante das experiências. O homem
que não tem os olhos abertos para o misterioso passará pela vida sem ver
nada."*
*Albert Einstein*
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Symbology api

2014-10-03 Thread Vincent Mora

Hi all,

While thinking about the interface of categorized and graduated 
symbology with varying size (instead of color) I had an idea to reduce 
the code complexity in src/core/symbology-ng (~15% less code).


Since it changes the symbology API, I'd like your input on that:

At the moment we deal with categorized, graduated, rule-based and single 
symbol with different classes.


At the same time the single symbol allows to use expressions for all 
symbol properties.


We can use expressions to make the single symbol layer behave:
- graduated : properties are continuous functions of attributes,
- categorized or rule based : properties are discrete function of 
attributes


The user interfaces for categorized, graduated, rule-based could remain 
the same, it's just that it would generate the expressions for the 
single symbol instead of configuring as specific class. Several 
categories could be defined to affect various parameters (color and size 
are the first use case).


Can you tell me if the idea is sound ?

V.



PS: (implementation detail)

Data defined properties are treated as a special case in the symbology 
classes.


Since a constant is a valid expression, why not avoid this special 
treatment and have properties being always expressions in the symbology 
classes ?

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


Re: [Qgis-developer] PostGIS warning details in QGIS master

2014-10-03 Thread Pedro Venâncio
Hi Denis,

This is even more strange. "Paste features: no features could be
successfully pasted." warning only appears when selecting more than one
feature. Please see the screencast:

https://dl.dropboxusercontent.com/u/5772257/qgis/copy_paste/qgis_copy_paste.avi

Test data:
https://dl.dropboxusercontent.com/u/5772257/qgis/copy_paste/tables2.sql

Thanks!

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

Re: [Qgis-developer] Upload plugins to qqis plugins via a script

2014-10-03 Thread Alessandro Pasotti
The python uploader code is here:

https://github.com/qgis/QGIS-Django/blob/master/qgis-app/plugins/utils/plugin_upload.py

2014-10-03 10:16 GMT+02:00 Paolo Cavallini :
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Il 03/10/2014 07:41, Andrew McClure ha scritto:
>> Here's a crude PHP script to login and upload your .zip
>> file when it's been updated.
>>
>> Requires libcurl
>>
>> https://github.com/nzfarmer1/qgisplugintools/blob/master/upload.php
>
> There
>>
> is already a make option for this: perhaps it is not easy enough
> to find?
>
> All the best.
> - --
> Paolo Cavallini - www.faunalia.eu
> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1
>
> iEYEARECAAYFAlQuW1oACgkQ/NedwLUzIr53nQCfYRHjkY9qVqXiNIOYDrp7YC4s
> eKoAnA47lYsGhdIwDkEnNi0tEJQcvgsr
> =NLLD
> -END PGP SIGNATURE-
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer



-- 
Alessandro Pasotti
w3:   www.itopen.it
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] PostGIS warning details in QGIS master

2014-10-03 Thread Rouzaud Denis
QGIS is not pasting the field of the primary key to avoid conflict.

I am not sure to understand your problem.

I tested with two postgis layers having a primary key. In both layers, I have a 
feature with pkey = 1. I copy/paste from layer 1 to layer 2, and at end I have 
two features in layer 2, one with pkey= 1 and the second with pkwy =2.

paste was successful.

Could you provide a small dump of your postgis layers and the exact steps to 
reproduce?





On 03 Oct 2014, at 01:48, Pedro Venâncio  wrote:

> Hi Denis,
> 
> I just tested on Linux, with two simple shapefiles (attached), with only two 
> lines each. Making a copy of the shapefiles, all goes well.
> 
> If you import the shapefiles to postgis (with dbmanager) to multilinestring, 
> they stay with equal pkeys. When I do the copy / paste (which worked fine 
> with the same data in shapefile format), QGIS shows the warning message 
> "Paste features: no features could be successfully pasted.". Running QGIS 
> with GNU gdb, does not appear any error at the time the warning is shown.
> 
> I also tested this with points, multipoints, and Multipolygons, and the same 
> happens.
> 
> The proof that I believe show that the problem is in primary key is:
> 
> importing the two layers attached to the postgis with dbmanager, you get
> 
> layer_1
> id_0* | id | desc
> 1 | 1 | 1
> 2 | 2 | 2
> 
> layer_2
> id_0* | id | desc
> 1 | 1 | 1
> 2 | 2 | 2
> 
> *pkey
> 
> If I delete the second line of layer_2, and copy the second line of layer_1 
> and paste on layer_2, it already works, and layer_2 becomes:
> 
> layer_2
> id_0* | id | desc
> 1 | 1 | 1
> 3 | 2 | 2
> 
> (id_0 is 3 because of the sequence).
> 
> The only explanation I find for this behavior is QGIS verify the violation of 
> unique constraint of pkey field id_0, and launch the warning and prevent the 
> pasting.
> 
> What do you think?
> 
> Thanks!
> 
> Best regards,
> Pedro
> 
> 
> 
> 
> 2014-10-02 14:42 GMT+01:00 Rouzaud Denis :
> Hi Pedro,
> 
> As said, copy/paste only tries to convert geometries and will paste if 
> possible.
> 
> Foreign key violation is only detected by Postgis, so the reason why QGIS is 
> not actually pasting is not due to a FKey violation.
> 
> Do you have a debugging environment or can you provide some demo data?
> 
> Best wishes,
> 
> Denis
> 

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

Re: [Qgis-developer] Upload plugins to qqis plugins via a script

2014-10-03 Thread Paolo Cavallini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Il 03/10/2014 07:41, Andrew McClure ha scritto:
> Here's a crude PHP script to login and upload your .zip
> file when it's been updated.
> 
> Requires libcurl
> 
> https://github.com/nzfarmer1/qgisplugintools/blob/master/upload.php

There
> 
is already a make option for this: perhaps it is not easy enough
to find?

All the best.
- -- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iEYEARECAAYFAlQuW1oACgkQ/NedwLUzIr53nQCfYRHjkY9qVqXiNIOYDrp7YC4s
eKoAnA47lYsGhdIwDkEnNi0tEJQcvgsr
=NLLD
-END PGP SIGNATURE-
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer