Re: [QGIS-Developer] Time for db manager to become an "opt-in" plugin?

2022-08-09 Thread SIGéal via QGIS-Developer

Great job !
It gave me the opportunity to discover some nice new functionalities 
added since QGIS 3.16.


Thanks,

--
Christophe Damour

Le 08/08/2022 à 12:52, Alexandre Neto via QGIS-Developer a écrit :

The link...


https://docs.google.com/spreadsheets/d/1VyC_kYJU3qmWrzXzjeZuHGBjwE6O2lPov_c0LnO-AUA/edit?usp=sharing

Alexandre Neto

A sábado, 6/08/2022, 21:08, Alexandre Neto  
escreveu:


Hi,

Sorry for the long waiting. I have made a functionality matrix for
db manager and possible alternatives. I am not sure if all is
correct so please feel free to edit or comment.

After your edits I will create the migragion feature requests.

Best regards,

Alexandre Neto

A segunda, 11/07/2022, 08:11, Alexandre Neto
 escreveu:

Hi Nyall,

A segunda, 11/07/2022, 00:47, Nyall Dawson
 escreveu:


I wonder if you'd be willing to lead an effort to document
the missing
functionality from dbmanager, and file QGIS tickets for
these and
assign them to a new project in the QGIS github for
"deprecating db
manager"? 



Sure I will! I am on vacations, but next week I will start
working on it.

Thanks!

Alexandre


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Time for db manager to become an "opt-in" plugin?

2022-07-10 Thread SIGéal via QGIS-Developer

Hello,

I fully support that -1

I submitted a feature request some weeks ago to suggest that Explorer 
SQL functionalities should work on a non modal way :

https://github.com/qgis/QGIS/issues/49091

--
Christophe Damour

Le 10/07/2022 à 03:02, Alexandre Neto via QGIS-Developer a écrit :

Hello all,

-1 for me

I am big QGIS/PostGIS user and DB manager in QGIS allows me to do 
something that you can't do elsewhere, run long spatial analysis using 
SQL.


I understand the development reasons for removing db manager from the 
official release and I really enjoy all the effort that Alessandro put 
to bring most functionality to the browser. Nevertheless, I don't 
think it fully replaces db manager querying functionality, and I 
really don't think it will ever do.


The execute SQL dialog is great and amazingly fast, but it doesn't 
replace the db manager editor. The QGIS SQL Editor (db manager or not) 
needs to be an independent window that one can keep open for as long 
as needed to develop and run queries step by step, see the results, 
load them in the project, re-run etc... Also, it is almost mandatory 
that the user, while having the SQL script open, can check tables 
details, like column names, preview their values, etc... to help write 
the queries. We need an independent window or in the limit a panel to 
allow that together with the browser panel.


This db manager functionality is unique, and is (in my opinion) one of 
the reasons why QGIS is PostGIS de facto client.


There are other minor functionality that is still not present, but can 
be added later, like being able to create and manage constraints. Or 
easily create a view from a query.


I understand that for now the functionality I miss would be available 
as an external plugin, but, not being in core, soon it will just stop 
working, and no one will care. QGIS was born as PostGIS query and 
visualiser client, in my humble opinion, by removing db manager at 
these stage we are downgrading QGIS functionality.


Thanks,

Alexandre Neto





A sexta, 8/07/2022, 18:12, Paolo Cavallini via QGIS-Developer 
 escreveu:


Hi all,
are we going to implement this? Apparently nobody objects.
I'd add to the list the Topology sub plugin by strk. Probably not
widely
used, but an unique feature.
I confirm that in the meantime the table historicization has been
broken, one more reason for not shipping DB Manager in the current
state.
Cheers.

Il 22/06/22 07:55, Nyall Dawson ha scritto:

> - Saving/re-running previously saved SQL queries

very useful to me. also loading the result of a query as a new layer

> - Switching to the simplified "SQL builder" dialog for creating
a SQL query
> - Truncating a table (this is available through a Processing
> algorithm, just not via browser)
> - Attribute index creation (this is available through a Processing
> algorithm, just not via browser)

handy but not crucial

> - !! Support for editing an existing column (changing
name/type). This
> is the biggest functionality gap -- changing existing column
types is
> not available elsewhere in QGIS
> - Listing database triggers

I'd add storicization of a table - I couldn't find anything easier
for this.

Cheers.
-- 
Paolo Cavallini

www.faunalia.eu  - QGIS.org
training, support, development on QGIS, PostGIS and more
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Time for db manager to become an "opt-in" plugin?

2022-06-23 Thread SIGéal via QGIS-Developer

Hi,

+1 for improving QGIS UI consistency !

I recently posted a feature request about "Update SQL Layer" dialog 
which IMHO should be non modal : https://github.com/qgis/QGIS/issues/49091


Reading this discussion, I tested further browser functionnalities and 
came to the conclusion that "Execute SQL" dialog should also be non modal.


And I also wonder why these dialogs could not be included in the Browser 
non modal window, similarly to what is done in DB Manager.


Just my two cents...

--
Christophe Damour

Le 22/06/2022 à 02:43, Nyall Dawson via QGIS-Developer a écrit :

Hi list,

I wanted to raise the discussion around potentially demoting the DB 
Manager plugin to become an opt-in, not installed by default plugin 
available from the QGIS plugin repository only.


It's likely no surprise to anyone on this list, but there's been a 
multi-year effort (mostly thanks to Alessandro!) to move all the 
important functionality of db manager over to the QGIS browser. This 
was driven by a number of factors:


- It was confusing and messy to expose database management tools 
through two completely separate parts of the QGIS interface
- The DB Manager tools are written in provider-specific ways, and 
don't use generic QGIS database/provider API calls. As a result 
there's a lot of duplicate code there, and db manager doesn't gain the 
benefits of new data provider features. (E.g. only a subset of the 
databases supported by QGIS and the browser management tools are 
available for management in db manager)
- The DB Manager functionality wasn't available for other parts of 
QGIS/plugins/scripts/etc to reuse, whereas the browser functionality 
is all nicely exposed to PyQGIS and is used by other parts of QGIS, 
eg. processing tools.
- The Python code implementing db manager is fragile, and is subject 
to semi-frequent regressions/breakage (through no fault of the authors 
-- it's just the nature of complex python applications which aren't 
soaked in unit tests)


I'd say we've reached a stage where the browser now offers all the 
common functionality also available in db manager, and we can start to 
seriously discuss the future of the plugin.


My personal view is that we should demote the plugin to a 
community-maintained, non-officially supported plugin available only 
through the QGIS plugin repositories, and remove it from the default 
QGIS install.


Thoughts/discussion welcome :)

Nyall





___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] [Qgis-user] QGIS freezes for minutes when updated SpatiaLite SQL Layer

2022-03-22 Thread SIGéal via QGIS-Developer

I created an issue :
https://github.com/qgis/QGIS/issues/47906

I can reproduce it with a dead simple query : select * from table 
(returning ~ 800 rows).


And no problem with any query/database on QGIS 3.16.16 !

Thanks,

--
Christophe

Le 22/03/2022 à 10:41, Alexandre Neto a écrit :

It probably also has something to do with the query you are using.

Can you please create a ticket? Preferably with some sample data and 
project and explaining the steps to reproduce the problem.


Thanks

Alexandre Neto

A terça, 22/03/2022, 09:24, SIGéal via Qgis-user 
 escreveu:


Hi list,

QGIS 3.22/3.24 freezes with hourglass for about 2 minutes when I
click
on close button of Update SQL Layer dialog, even if I didn't
modify the
query.
If I click on Execute button, I get this error : "an error occurred
while opening GPKG dbname=..."
This happens with a big database file (600 Mb), only with with query
returning hundreds of rows.

I don't have any problem at all with old behaviour on QGIS 3.16.16
: DB
Manager opened when I click on Update SQL Layer.
So this sounds clearly like a regression linked to the new "Update
SQL
Layer" dialog/behaviour.

Thanks for any hint or work around,

-- 
Christophe Damour


___
Qgis-user mailing list
qgis-u...@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[QGIS-Developer] QGIS freezes for minutes when updated SpatiaLite SQL Layer

2022-03-22 Thread SIGéal via QGIS-Developer

Hi list,

QGIS 3.22/3.24 freezes with hourglass for about 2 minutes when I click 
on close button of Update SQL Layer dialog, even if I didn't modify the 
query.
If I click on Execute button, I get this error : "an error occurred 
while opening GPKG dbname=..."
This happens with a big database file (600 Mb), only with with query 
returning hundreds of rows.


I don't have any problem at all with old behaviour on QGIS 3.16.16 : DB 
Manager opened when I click on Update SQL Layer.
So this sounds clearly like a regression linked to the new "Update SQL 
Layer" dialog/behaviour.


Thanks for any hint or work around,

--
Christophe Damour

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Can't open postgrest geojson service

2022-02-15 Thread SIGéal
Further testing, I discovered that I can open my postgrest geojson 
service using Python :


|myLayer= QgsVectorLayer('http://mydomain:3000/rpc/wod_geojson, 
'myLayer', 'ogr') QgsProject.instance().addMapLayers([myLayer]) |



Also, testing with ogrinfo on command line, it fails with 404 error , 
but adding |Accept: application/json| header makes it work.

(using --config GDAL_HTTP_HEADER_FILE)

--
Christophe Damour

Le 11/02/2022 à 14:27, SIGéal a écrit :

Hi,

I have a PostgreSql stored procedure which returns a geojson feature 
collection created with json_build_object function.
This web service opens fine in OpenLayers, however, when I try to open 
it in QGIS, with data source manager -> vector -> protocol -> geojson :




I get the following error :
Invalid data source: [myurl]/rpc/wod_geojson is not a valid or 
recognized data source.

This is the query wrapped in a plpgsql function called my_geojson :

|SELECT json_build_object(
    'type', 'FeatureCollection', 'features',
    json_agg(
        json_build_object(
            'type', 'Feature', 'id', id, 'geometry',
            ST_AsGeoJSON(ST_Transform(geometry, 4326))::json,
            'properties', json_build_object(
                'lib', lib
            )
        )
    )
)::json my_geojson FROM (SELECT ROW_NUMBER() OVER() id, * FROM 
mytable) tmp|

This is the url I use to call the service:

|http://mydomain:3000/rpc/my_geojson|
I tested a similar geojson REST service served with pg_featureserv, 
and it works fine...


Environment :


Server Environment :
PostgreSQL version: 10.19
PostgREST version: 9.0.0
Operating system: Ubuntu 16.04

Client Environment :
QGIS version: 3.16.16
Operating system: Windows 10



Thanks for any int

--
Christophe Damour
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[QGIS-Developer] Can't open postgrest geojson service

2022-02-11 Thread SIGéal

Hi,

I have a PostgreSql stored procedure which returns a geojson feature 
collection created with json_build_object function.
This web service opens fine in OpenLayers, however, when I try to open 
it in QGIS, with data source manager -> vector -> protocol -> geojson :


https://user-images.githubusercontent.com/247591/153418104-5a611cb2-ad4d-4c5b-ac87-0c08be006c9e.png

I get the following error :
Invalid data source: [myurl]/rpc/wod_geojson is not a valid or 
recognized data source.

This is the query wrapped in a plpgsql function called my_geojson :

|SELECT json_build_object(
    'type', 'FeatureCollection', 'features',
    json_agg(
        json_build_object(
            'type', 'Feature', 'id', id, 'geometry',
            ST_AsGeoJSON(ST_Transform(geometry, 4326))::json,
            'properties', json_build_object(
                'lib', lib
            )
        )
    )
)::json my_geojson FROM (SELECT ROW_NUMBER() OVER() id, * FROM 
mytable) tmp|

This is the url I use to call the service:

|http://mydomain:3000/rpc/my_geojson|
I tested a similar geojson REST service served with pg_featureserv, and 
it works fine...


Environment :


Server Environment :
PostgreSQL version: 10.19
PostgREST version: 9.0.0
Operating system: Ubuntu 16.04

Client Environment :
QGIS version: 3.16.16
Operating system: Windows 10



Thanks for any int

--
Christophe Damour
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[QGIS-Developer] Wrong legend for datadefined size points layer with pyQgis

2019-02-14 Thread SIGéal

Hi,

I am trying to generate a proportional symbol symbology using data 
defined symbol size in a QGIS 3 python plugin.


Here is the working code :

# Symbol creation
symbolLayer = QgsSimpleMarkerSymbolLayer()
symbolLayer.setShape(QgsSimpleMarkerSymbolLayer.Circle)
symbolLayer.setSize(2.0)
symbolLayer.setColor(QColor(31, 120, 180)
symbolLayer.setStrokeColor(QColor(255, 255, 255)
symbolLayer.setStrokeWidth(0.4)

symbol = QgsMarkerSymbol.createSimple({})
symbol.changeSymbolLayer(0, symbolLayer)

# Size definition (Flannery method)
# layer is a QgsSingleSymbolRenderer
strExp = 'coalesce(scale_exp("value", 0.0, 150, 1, 20, 0.57), 0)'
symbol.setDataDefinedSize(QgsProperty.fromExpression(strExp))
layer.renderer().setSymbol(symbol)

The problem is the legend. This code :

# Legend
lgd = QgsDataDefinedSizeLegend()
lgd.setLegendType(QgsDataDefinedSizeLegend.LegendCollapsed)
lgd.setClasses([
    QgsDataDefinedSizeLegend.SizeClass(150, '150'),
    QgsDataDefinedSizeLegend.SizeClass(75, '75'),
    QgsDataDefinedSizeLegend.SizeClass(15, '15')
])

layer.renderer().setDataDefinedSizeLegend(lgd)

produces an enormous legend symbol :
https://i.stack.imgur.com/xvTgU.png

However, if I open the layer properties dialog and update parameters 
with datadefined size assistant, the legend is refreshed with the 
correct size :

https://i.stack.imgur.com/h3Ok2.png

What am I missing ?

Thanks for any hint,

--
Christophe Damour

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Wrong legend for datadefined size points layer with pyQgis

2019-02-14 Thread SIGéal

Hi,

I am trying to generate a proportional symbol symbology using data 
defined symbol size in a QGIS 3 python plugin.


Here is the working code :

# Symbol creation
symbolLayer = QgsSimpleMarkerSymbolLayer()
symbolLayer.setShape(QgsSimpleMarkerSymbolLayer.Circle)
symbolLayer.setSize(2.0)
symbolLayer.setColor(QColor(31, 120, 180)
symbolLayer.setStrokeColor(QColor(255, 255, 255)
symbolLayer.setStrokeWidth(0.4)

symbol = QgsMarkerSymbol.createSimple({})
symbol.changeSymbolLayer(0, symbolLayer)

# Size definition (Flannery method)
# layer is a QgsSingleSymbolRenderer
strExp = 'coalesce(scale_exp("value", 0.0, 150, 1, 20, 0.57), 0)'
symbol.setDataDefinedSize(QgsProperty.fromExpression(strExp))
layer.renderer().setSymbol(symbol)

The problem is the legend. This code :

# Legend
lgd = QgsDataDefinedSizeLegend()
lgd.setLegendType(QgsDataDefinedSizeLegend.LegendCollapsed)
lgd.setClasses([
    QgsDataDefinedSizeLegend.SizeClass(150, '150'),
    QgsDataDefinedSizeLegend.SizeClass(75, '75'),
    QgsDataDefinedSizeLegend.SizeClass(15, '15')
])

layer.renderer().setDataDefinedSizeLegend(lgd)

produces an enormous legend symbol :
https://i.stack.imgur.com/xvTgU.png

However, if I open the layer properties dialog and update parameters 
with datadefined size assistant, the legend is refreshed with the 
correct size :

https://i.stack.imgur.com/h3Ok2.png

What am I missing ?

Thanks for any hint,

--
Christophe Damour


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Python error when browsing virtual layers in DB Manager

2018-11-08 Thread SIGéal

Hi,

There is a bug in QGIS 3.4 which prevents from browsing virtual layers 
in DB Manager.


Changing line 196 in \QGIS 
3.4\apps\qgis\python\plugins\db_manager\db_plugins\vlayers\connectors.py 
from :


for _, l in QgsProject.instance().mapLayers():

to (what it was in QGIS 3.2) :

for _, l in list(QgsProject.instance().mapLayers().items()):

seems to solve the problem.

Tested on W7 and W10.

--
Christophe Damour



---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Set text of QgsLayoutItemLabel

2018-03-17 Thread SIGéal

Hi,

This thread might help you to find a workaround :
https://gis.stackexchange.com/questions/241213/how-to-get-a-composer-label-by-id-with-python-in-qgis

--
Christophe


Le 16/03/2018 à 16:56, KOHLMANN Hannes a écrit :


Hello!

I am facing difficulties trying to set the text of a  QgsLayoutItemLabel.

I do something like the following to load a .qpt composer template and 
print this to a .png file (which works)


path = "C:\\QGIS3\\apps\\qgis\\composer_templates"

template_file = open(path+"\\ANSR_print_composer2.qpt")

template_content = template_file.read()

template_file.close()

document = QDomDocument()

document.setContent(template_content)

composition = QgsLayout(QgsProject.instance())

composition.loadFromTemplate(document, QgsReadWriteContext())

map_item = composition.itemById('map')

legend_item = composition.itemById('legend')

text_item = composition.itemById('textbox')

QgsLayoutExporter(composition).exportToImage( path+"\\report.png", 
QgsLayoutExporter.ImageExportSettings())


And now I’d like to modify only the text of the QgsLayoutItemLabel, 
which is the “textbox”:


1)I can move it around with setX(), setY(), but I don’t know how to 
edit the text of the label. I thought of something like 
text_item.setText() or text_item.setLabelText(), but I think that 
text_item is just an instance of QgsLayoutItem, not 
QgsLayoutItemLabel. And there I get stuck.


2)How would you manually add another text label, set the main property 
etc, such that, at the end of the day, my above code would export a 
.png containing this QgsLayoutItem?

I would have begun this way:
new = QgsLayoutItemLabel(composition)
new.setText(“New label”)
But it does not quite work that way!

Would be of great help, if you could give me some hints on that.

Thank you in advance! J

Hannes



___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Group stats plugin from 2to3

2018-02-28 Thread SIGéal

Hi,

A look at this might help :
https://gis.stackexchange.com/questions/260125/make-qgis-python-plugin-for-both-versions-2-x-and-3-x

--
Christophe

Le 28/02/2018 à 12:31, Sylvain POULAIN a écrit :


Hi,

I tried to migrate from plugins in Qgis 2 to Qgis 3.
I took the usefull group stats plugin as my main example to make 
transition.


Unfortunatelly, /Plugin home page/ and /tracker/ links for this 
plugins are dead ( http://plugins.qgis.org/plugins/GroupStats/ ), my 
apologies if I'm not posting in right place.


So I downloaded plugin and tried to converted it with changing Qt4 to 
Qt5 in py script, using 2to3, rebuilding with pyuic5 and pyrcc5 under 
linux. But now I'm stuck on a QMainWindow error. Where could I have 
help to solve and understand how to solve it ?


Sincerely,

Sylvain



___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QGIS 3 itemById should return subclassed item

2018-02-12 Thread SIGéal
Thanks for your answers, it helps to workaround... waiting for an 
upstream fix.


--
Christophe

Le 13/02/2018 à 00:28, Chris Crook a écrit :

Hi Nyall

Thanks so much for the pointer (idea that is, not C++ pointer) .. I'll give it 
a go

Cheers
Chris

From: QGIS-Developer [qgis-developer-boun...@lists.osgeo.org] on behalf of 
Nyall Dawson [nyall.daw...@gmail.com]
Sent: 13 February 2018 10:36
To: SIGéal
Cc: qgis-developer
Subject: Re: [QGIS-Developer] QGIS 3 itemById should return subclassed item

On 13 February 2018 at 05:51, SIGéal <sig...@sigeal.com> wrote:

Hi,

This code used to work in QGIS 2.x.

lblTitle = myComposition.getComposerItemById('title')
lblTitle.setText('New Title')

However, in QGIS 2.99, myLayout.itemById('title') returns this error :

'QgsLayoutItem' object has no attribute 'setText'

See discussion at
http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-QgsLayout-itemById-returns-wrong-object-td5350947.html

Nyall
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer



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
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] QGIS 3 itemById should return subclassed item

2018-02-12 Thread SIGéal

Hi,

This code used to work in QGIS 2.x.

|lblTitle =myComposition.getComposerItemById('title')|||lblTitle|.setText('New 
Title')|

|However, in QGIS |2.99, myLayout.itemById('title') returns this error :

|'QgsLayoutItem' object has no attribute 'setText'|

This problem is related to the following issue :
https://issues.qgis.org/issues/17152

The following workaround still works :
https://github.com/inasafe/inasafe/blob/develop/safe/report/processors/default.py#L54

Can this be corrected in QGIS 3.0 ?

--
Christophe

Le 28/11/2017 à 14:45, SIGéal a écrit :
print(lblTitle) gives "0x029B1435FC18>"

as suggested the error message.
--
Christophe

Le 28/11/2017 à 14:25, SIGéal a écrit :

Weird : lblTitle.type() returns "65639"...
--
Christophe

Le 28/11/2017 à 11:47, Matthias Kuhn a écrit :


I guess there's a problem with the %ConvertToSubClassCode in the sip 
file.


What does lblTitle.type() give?

Matthias


On 11/28/2017 11:22 AM, Etienne Trimaille wrote:
We have this problem with QGIS 2.18 too in our plugin: 
https://github.com/inasafe/inasafe/issues/4271


We could fix the problem with a hint from Martin, we have this 
function as a workaround:

https://github.com/inasafe/inasafe/blob/develop/safe/report/processors/default.py#L54
It works well. It would be nice to know if it's a bug in QGIS.

Etienne

2017-11-28 11:06 GMT+01:00 SIGéal <sig...@sigeal.com 
<mailto:sig...@sigeal.com>>:


Hi devs,

This code used to work in QGIS 2.x.

|lblTitle 
=myComposition.getComposerItemById('title')|||lblTitle|.setText('New Title')|

|However, it doesn't anymore in QGIS |2.99.
Instead it returns this error :

|'QgsComposerItem' object has no attribute 'setText'|||

--
Christophe



___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
<mailto:QGIS-Developer@lists.osgeo.org>
List info:
https://lists.osgeo.org/mailman/listinfo/qgis-developer
<https://lists.osgeo.org/mailman/listinfo/qgis-developer>
Unsubscribe:
https://lists.osgeo.org/mailman/listinfo/qgis-developer
<https://lists.osgeo.org/mailman/listinfo/qgis-developer>




___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer




___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer




___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer




___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QGIS 2.99 weekly snapshot 64 bits

2018-01-30 Thread SIGéal

Thank you for the answer.
I am in the process of migrating plugins.
I'll try OSGeo4W installer.

--
Christophe

Le 30/01/2018 à 10:53, Jürgen E. Fischer a écrit :

Hi Christophe,

On Tue, 30. Jan 2018 at 10:22:05 +0100, SIGéal wrote:

It seems that QGIS 2.99 weekly snapshot is only available in 32 bits
version.
Does anyone know why the 64 bits version isn't available anymore ?

It currently exceeds NSIS' 2GB limit (GRASS needs py2 - so we have to include
py2 & 3).

Is the OSGeo4W installer an option for you?


Jürgen



___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] QGIS 2.99 weekly snapshot 64 bits

2018-01-30 Thread SIGéal

Hi,

It seems that QGIS 2.99 weekly snapshot is only available in 32 bits 
version.

Does anyone know why the 64 bits version isn't available anymore ?

--
Christophe


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QGIS 3 getComposerItemById should return subclassed item

2017-11-28 Thread SIGéal
print(lblTitle) gives "0x029B1435FC18>"

as suggested the error message.

--
Christophe

Le 28/11/2017 à 14:25, SIGéal a écrit :

Weird : lblTitle.type() returns "65639"...
--
Christophe

Le 28/11/2017 à 11:47, Matthias Kuhn a écrit :


I guess there's a problem with the %ConvertToSubClassCode in the sip 
file.


What does lblTitle.type() give?

Matthias


On 11/28/2017 11:22 AM, Etienne Trimaille wrote:
We have this problem with QGIS 2.18 too in our plugin: 
https://github.com/inasafe/inasafe/issues/4271


We could fix the problem with a hint from Martin, we have this 
function as a workaround:

https://github.com/inasafe/inasafe/blob/develop/safe/report/processors/default.py#L54
It works well. It would be nice to know if it's a bug in QGIS.

Etienne

2017-11-28 11:06 GMT+01:00 SIGéal <sig...@sigeal.com 
<mailto:sig...@sigeal.com>>:


Hi devs,

This code used to work in QGIS 2.x.

|lblTitle 
=myComposition.getComposerItemById('title')|||lblTitle|.setText('New Title')|

|However, it doesn't anymore in QGIS |2.99.
Instead it returns this error :

|'QgsComposerItem' object has no attribute 'setText'|||

--
Christophe



___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
<mailto:QGIS-Developer@lists.osgeo.org>
List info:
https://lists.osgeo.org/mailman/listinfo/qgis-developer
<https://lists.osgeo.org/mailman/listinfo/qgis-developer>
Unsubscribe:
https://lists.osgeo.org/mailman/listinfo/qgis-developer
<https://lists.osgeo.org/mailman/listinfo/qgis-developer>




___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer




___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer




___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] QGIS 3 getComposerItemById should return subclassed item

2017-11-28 Thread SIGéal

Weird : lblTitle.type() returns "65639"...

--
Christophe

Le 28/11/2017 à 11:47, Matthias Kuhn a écrit :


I guess there's a problem with the %ConvertToSubClassCode in the sip file.

What does lblTitle.type() give?

Matthias


On 11/28/2017 11:22 AM, Etienne Trimaille wrote:
We have this problem with QGIS 2.18 too in our plugin: 
https://github.com/inasafe/inasafe/issues/4271


We could fix the problem with a hint from Martin, we have this 
function as a workaround:

https://github.com/inasafe/inasafe/blob/develop/safe/report/processors/default.py#L54
It works well. It would be nice to know if it's a bug in QGIS.

Etienne

2017-11-28 11:06 GMT+01:00 SIGéal <sig...@sigeal.com 
<mailto:sig...@sigeal.com>>:


Hi devs,

This code used to work in QGIS 2.x.

|lblTitle 
=myComposition.getComposerItemById('title')|||lblTitle|.setText('New Title')|

|However, it doesn't anymore in QGIS |2.99.
Instead it returns this error :

|'QgsComposerItem' object has no attribute 'setText'|||

--
Christophe



___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
<mailto:QGIS-Developer@lists.osgeo.org>
List info:
https://lists.osgeo.org/mailman/listinfo/qgis-developer
<https://lists.osgeo.org/mailman/listinfo/qgis-developer>
Unsubscribe:
https://lists.osgeo.org/mailman/listinfo/qgis-developer
<https://lists.osgeo.org/mailman/listinfo/qgis-developer>




___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer




___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] QGIS 3 getComposerItemById should return subclassed item

2017-11-28 Thread SIGéal

Hi devs,

This code used to work in QGIS 2.x.

|lblTitle =myComposition.getComposerItemById('title')|||lblTitle|.setText('New 
Title')|

|However, it doesn't anymore in QGIS |2.99.
Instead it returns this error :

|'QgsComposerItem' object has no attribute 'setText'|||

--
Christophe


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer