[Qgis-developer] problem with VACUUM in DB Manager

2014-12-03 Thread Matteo Ghetta
Hi all,
maybe a problem in QGIS 2.6 with VACUUM analyze on both database and
schemas but not on single tables.

This is the error:

Errore durante l'esecuzione di codice Python:

Traceback (most recent call last):
  File 
/home/ma7730/lavori/QGIS-master/build26/output/python/plugins/db_manager/db_manager.py,
line 201, in
invoke_callback = lambda x: self.invokeCallback( callback )
  File 
/home/ma7730/lavori/QGIS-master/build26/output/python/plugins/db_manager/db_manager.py,
line 273, in invokeCallback
callback( self.tree.currentItem(), self.sender(), self )
  File 
/home/ma7730/lavori/QGIS-master/build26/output/python/plugins/db_manager/db_plugins/postgis/plugin.py,
line 172, in runVacuumAnalyzeActionSlot
parent.infoBar().pushMessage(self.tr(Select a table for vacuum
analyze.), QgsMessageBar.INFO, parent.iface.messageTimeout())
TypeError: 'QgsMessageBar' object is not callable



QGIS 2.6 on Debian testing machine but confirmed also on windows and mac
computers.


Should I open a ticket?


Cheers


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

[Qgis-developer] QtXml is no longer maintained in Qt5

2014-12-03 Thread Matthias Kuhn
Hi,

As of Qt5, QtXml is no longer actively maintained [1]
PyQt5 does not even support it.

It will be a reasonably big undertaking to migrate any occurrence of
QDomDocument etc. to QXMLStreamWriter and QXMLStreamReader (our whole
project saving and loading engine is based on this). And when we do this
we will likely have to increase the major version number of QGIS.

In order not to introduce more work, please consider using
QXMLStreamWriter and QXMLStreamReader for new code you write that
involves parsing or producing XML. That does not concern working on code
that is based on code that is currently based on QtXml methods.

Thank you,
Matthias

[1] http://qt-project.org/doc/qt-5/qtxml-module.html#details

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


[Qgis-developer] LoadFromTemplate method broken?

2014-12-03 Thread Vincent Damoy

Hello all,

Since QGIS 2.6, the LoadFromTemplate method seems not work any more (or 
works differently?)


This is my code to add items in my composer from a template :

|self.composition=  self.composerView.composition()
file1=QtCore.QFile('ComposerTemplate.qpt')
doc=QtXml.QDomDocument()
doc.setContent(file1,  False)
self.composition.loadFromTemplate(doc,  substitutionMap=None,  
addUndoCommands=False)|

Up to 2.4 version, this code worked great. But since the last QGIS 
update, nothing is imported from the template. I do not get either error 
messages.


I've readen in QGIS changelogs, that the Load from template button is 
replaced by a softer Add items from template one. But it's in the 
GUI... In the API doc, the LoadFromTemplate method is still present. And 
should still work?

Has anybody else encountered this problem?

Thanks
Vincent

--

Vincent Damoy - Responsable SIG
Conservatoire d'espaces naturels du Nord et du Pas-de-Calais
152 bd de Paris - 62190 Lillers
Tél : 03.21.54.75.00 - Fax : 03.21.54.56.07
/*Pour adhérer au Conservatoire :* 
www.cen-npdc.org/nous-rejoindre/adherent.html/



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

Re: [Qgis-developer] QtXml is no longer maintained in Qt5

2014-12-03 Thread Marco Hugentobler

Hi Matthias


It will be a reasonably big undertaking to migrate any occurrence of
QDomDocument etc. to QXMLStreamWriter and QXMLStreamReader



From a quick look, it seems QXMLStreamReader is more like a SAX parser. 
If so, it is not a full replacement for the DOM classes.


Regards,
Marco

On 03.12.2014 16:12, Matthias Kuhn wrote:

Hi,

As of Qt5, QtXml is no longer actively maintained [1]
PyQt5 does not even support it.

It will be a reasonably big undertaking to migrate any occurrence of
QDomDocument etc. to QXMLStreamWriter and QXMLStreamReader (our whole
project saving and loading engine is based on this). And when we do this
we will likely have to increase the major version number of QGIS.

In order not to introduce more work, please consider using
QXMLStreamWriter and QXMLStreamReader for new code you write that
involves parsing or producing XML. That does not concern working on code
that is based on code that is currently based on QtXml methods.

Thank you,
Matthias

[1] http://qt-project.org/doc/qt-5/qtxml-module.html#details

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



--
Dr. Marco Hugentobler
Sourcepole -  Linux  Open Source Solutions
Weberstrasse 5, CH-8004 Zürich, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee

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


Re: [Qgis-developer] problem with VACUUM in DB Manager

2014-12-03 Thread Salvatore Larosa
Hi,

On Wed, Dec 3, 2014 at 3:41 PM, Matteo Ghetta matteo.ghe...@gmail.com wrote:
 Hi all,
 maybe a problem in QGIS 2.6 with VACUUM analyze on both database and schemas
 but not on single tables.

 This is the error:

 Errore durante l'esecuzione di codice Python:

 Traceback (most recent call last):
   File
 /home/ma7730/lavori/QGIS-master/build26/output/python/plugins/db_manager/db_manager.py,
 line 201, in
 invoke_callback = lambda x: self.invokeCallback( callback )
   File
 /home/ma7730/lavori/QGIS-master/build26/output/python/plugins/db_manager/db_manager.py,
 line 273, in invokeCallback
 callback( self.tree.currentItem(), self.sender(), self )
   File
 /home/ma7730/lavori/QGIS-master/build26/output/python/plugins/db_manager/db_plugins/postgis/plugin.py,
 line 172, in runVacuumAnalyzeActionSlot
 parent.infoBar().pushMessage(self.tr(Select a table for vacuum
 analyze.), QgsMessageBar.INFO, parent.iface.messageTimeout())
 TypeError: 'QgsMessageBar' object is not callable

my fault when I introduced that changes, sorry.

 QGIS 2.6 on Debian testing machine but confirmed also on windows and mac
 computers.


 Should I open a ticket?

Jürgen has just fixed in master. so it is not necessary to file a ticket. thanks


-- 
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

Re: [Qgis-developer] QtXml is no longer maintained in Qt5

2014-12-03 Thread Matthias Kuhn
Hi Marco,

I didn't look at it in detail and just based this recommendation on the
one from the QtXml documentation linked at the end of the original message.
Is there something in particular you think we will be missing? If so, it
might be good to start looking for alternative ways to go.

Regards,
Matthias

On 03.12.2014 16:24, Marco Hugentobler wrote:
 Hi Matthias

 It will be a reasonably big undertaking to migrate any occurrence of
 QDomDocument etc. to QXMLStreamWriter and QXMLStreamReader


 From a quick look, it seems QXMLStreamReader is more like a SAX
 parser. If so, it is not a full replacement for the DOM classes.

 Regards,
 Marco

 On 03.12.2014 16:12, Matthias Kuhn wrote:
 Hi,

 As of Qt5, QtXml is no longer actively maintained [1]
 PyQt5 does not even support it.

 It will be a reasonably big undertaking to migrate any occurrence of
 QDomDocument etc. to QXMLStreamWriter and QXMLStreamReader (our whole
 project saving and loading engine is based on this). And when we do this
 we will likely have to increase the major version number of QGIS.

 In order not to introduce more work, please consider using
 QXMLStreamWriter and QXMLStreamReader for new code you write that
 involves parsing or producing XML. That does not concern working on code
 that is based on code that is currently based on QtXml methods.

 Thank you,
 Matthias

 [1] http://qt-project.org/doc/qt-5/qtxml-module.html#details

 ___
 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] Retrieve field name used as label

2014-12-03 Thread Tom Chadwin
Hello all

I'm trying to build labelling into qgis2leaf. How do I retrieve the name of
the field used as a layer's label? I've tried  QgsLabel::labelField  ( int 
attr ), but I don't understand what the argument attr is.

Thanks

Tom




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Retrieve-field-name-used-as-label-tp5176293.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


[Qgis-developer] Rotation and raster renderer

2014-12-03 Thread Sandro Santilli
While vector rendering is now rotation-aware (in my branch), the same
is not true for raster renderer. For what I understand we need:

 - Adding rotation info in QgsRasterViewPort (degrees and center)
 - Adding rotation support in QgsRasterDrawer

Should that be enough ?
Should we encode rotation support in the block reader of rasters insted ?

--strk; 

 ()  ASCII ribbon campaign  --  Keep it simple !
 /\  http://strk.keybit.net/rants/ascii_mails.txt  
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Installin IntraMaps Roam

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

Il 03/12/2014 07:54, Nathan Woodrow ha scritto:

 We (DMS) support the application as we develop it. We have a lot
 of clients using it so we continue to support them or anyone else
 that is using it.  In fact I just made the latest release about an
 hour ago: http://dms-aus.github.io/Roam/

happy to know this. any special reason not to include in qgis-master?
thanks.
- -- 
Paolo Cavallini - www.faunalia.eu
QGIS  PostGIS courses: http://www.faunalia.eu/training.html
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iEYEARECAAYFAlR/UJ4ACgkQ/NedwLUzIr6tUwCgrckWVR+yAn0KN5qj6GaQrbXO
7FwAn0mTQJOgvJjq5X1vj01R3ANnp6gM
=u0mV
-END PGP SIGNATURE-
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Cannot load python after compiling master

2014-12-03 Thread Mikhail Tchernychev

Hi,

I downloaded and compiled latest git snapshot.  However when I try to 
run qgis

I am getting:

ouldn't load PyQGIS.
Python support will be disabled.


Traceback (most recent call last):
  File , line 1, in
  File /home/misha/opt/qgis-dev/share/qgis/python/qgis/__init__.py, line 36, 
in
from qgis.core import QgsFeature, QgsGeometry
  File /home/misha/opt/qgis-dev/share/qgis/python/qgis/core/__init__.py, line 
2, in
from qgis._core import *
ImportError: /home/misha/opt/qgis-dev/share/qgis/python/qgis/_core.so: 
undefined symbol: _ZTI18QgsHeatmapRenderer

Python version:
2.7.6 (default, Mar 22 2014, 23:03:14)
[GCC 4.8.2]

QGIS version:
2.7.0-Master 'Master', exported

Python path:
['/home/misha/opt/qgis-dev/share/qgis/python', 
u'/home/misha/.qgis2/python', u'/home/misha/.qgis2/python/plugins', 
'/home/misha/opt/qgis-dev/share/qgis/python/plugins', 
'/usr/lib/python2.7', '/usr/lib/python2.7/plat-i386-linux-gnu', 
'/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', 
'/usr/lib/python2.7/lib-dynload', 
'/usr/local/lib/python2.7/dist-packages', 
'/usr/lib/python2.7/dist-packages', 
'/usr/lib/python2.7/dist-packages/PILcompat', 
'/usr/lib/python2.7/dist-packages/gtk-2.0', 
'/usr/lib/pymodules/python2.7', 
'/usr/lib/python2.7/dist-packages/ubuntu-sso-client', 
'/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']



I suppose this should be very simple. Is some package missing?

I have qgis installed from ubuntugis-nightly but it stopped working on 
Nov 20, and no new version

yet available.

This is for Ubuntu trusty 14.04

Thank you

Mikhail




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

Re: [Qgis-developer] LoadFromTemplate method broken?

2014-12-03 Thread Nyall Dawson
On 4 December 2014 at 02:14, Vincent Damoy
vincent.da...@espaces-naturels.fr wrote:

 Hello all,

 Since QGIS 2.6, the LoadFromTemplate method seems not work any more (or works 
 differently?)

 This is my code to add items in my composer from a template :

 self.composition = self.composerView.composition()
 file1=QtCore.QFile('ComposerTemplate.qpt')
 doc=QtXml.QDomDocument()
 doc.setContent(file1, False)
 self.composition.loadFromTemplate(doc, substitutionMap=None, addUndoCommands 
 =False)


That code works fine for me... Have you tried with a different
template file, or with a template created in 2.6?

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


[Qgis-developer] Fail to create raster layer in C++ but is able to do so in python

2014-12-03 Thread eliu1234
I am trying to add a raster layer in c++ application with QtCreator and QGIS
2.6.0. I am currently trying to create a 32bit application under 64 bit
windows system. I am not sure if this would be the cause.

My code is as follows: 
QgsRasterLayer * layer = new
QgsRasterLayer(http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=jsonpretty=true,raster;);
 
However, when I call layer.isValid(), it always return false.

I tried the python equivalent in qgis python console and it works fine. The
python code is as follows: layer =
QgsRasterLayer(http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=jsonpretty=true,raster;);

Any help is appreciated.



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Fail-to-create-raster-layer-in-C-but-is-able-to-do-so-in-python-tp5176356.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