Re: [QGIS-Developer] qgis2web and qtwebkit?

2018-09-16 Thread Jürgen E . Fischer
Hi Paolo,

On Mon, 17. Sep 2018 at 08:13:28 +0200, Paolo Cavallini wrote:
> Thanks. Where can I find the package?

$ dpkg -S python*QtWebKit*.so
python-qgis: /usr/lib/python2.7/dist-packages/PyQt4/QtWebKit.x86_64-linux-gnu.so


Jürgen

-- 
Jürgen E. Fischer   norBIT GmbH Tel. +49-4931-918175-31
Dipl.-Inf. (FH) Rheinstraße 13  Fax. +49-4931-918175-50
Software Engineer   D-26506 Norden http://www.norbit.de
QGIS release manager (PSC)  GermanyIRC: jef on FreeNode


signature.asc
Description: PGP signature
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Aurich HRB 100827
Datenschutzerklaerung: https://www.norbit.de/83/
___
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] Plugin [1377] TlugProcessing approval notification.

2018-09-16 Thread noreply

Plugin TlugProcessing approval by pcav.
The plugin version "[1377] TlugProcessing 2.1" is now approved
Link: http://plugins.qgis.org/plugins/TlugProcessing/
___
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] qgis2web and qtwebkit?

2018-09-16 Thread Paolo Cavallini
Il 09/16/2018 10:15 AM, Jürgen E. Fischer ha scritto:
> Hi Paolo,
>
> On Sun, 16. Sep 2018 at 08:25:27 +0200, Paolo Cavallini wrote:
>> on Debian Sid the qgis2web plugin refuses to install because it cannot
>> import name QtWebKit.
>>
>> In fact, apparently only python-pyqt5.qtwebkit is available, not pyqt4
>> (although libqtwebkit4 is available).
>>
>> Anyone knows a workaround or a proper solution?
> Install our packages.  The security nightmare should be libqtwebkit4, not the
> bindings - but only the latter removed.  Our packages contain them.

Thanks. Where can I find the package?

cat /etc/apt/sources.list | grep qgis
#qgis
deb    https://qgis.org/debian-ltr buster main

aptitude search qtwebkit | grep 4
i A libqtwebkit4 - libreria per motore di contenuti web per Qt
p  libqtwebkit4-dbg - libreria per motore di contenuti web per Qt -
simboli di debug

Cheers.

-- 
Paolo Cavallini - www.faunalia.eu
QGIS.ORG Chair:
http://planet.qgis.org/planet/user/28/tag/qgis%20board/




signature.asc
Description: OpenPGP digital signature
___
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] Plugin [1538] Land Survey Codes Import approval notification.

2018-09-16 Thread noreply

Plugin Land Survey Codes Import approval by pcav.
The plugin version "[1538] Land Survey Codes Import 0.1 Experimental" is now 
approved
Link: http://plugins.qgis.org/plugins/LandSurveyCodesImport/
___
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] Using embedded widgets in the layer tree on a python plugin

2018-09-16 Thread Ricardo Filipe Soares Garcia da
Hi all (specially Martin Dobias)

I'm working on a plugin that will use embedded widgets in the layer tree. I
am using the following as reference:

-  Martin's PR that brought this feature into existence (thanks for that
BTW):
https://github.com/qgis/QGIS/pull/3170/files#diff-3b9be845f2ea37602ca451f18acceab4

-  This QGIS dev thread where Martin provides some more detail on how to
refresh the legend:
http://osgeo-org.1560.x6.nabble.com/QgsLayerTreeViewMenuProvider-and-default-values-tt5296424.html#a5296695

-  This stackexchange thread where the transparency slider is discussed:
https://gis.stackexchange.com/questions/232367/showing-transparency-slider-by-default-in-layers-panel-of-qgis

-  The master branch of QGIS' repo

I'm starting out by just showing a simple QLabel in the layer's legend,
just as a proof of concept. I want my plugin to work with OGC services
layers (WMS, WFS, etc), meaning it shall only try to add widgets to layers
that are of these types.

I have roughly the following python code:

```
logger = partial(qgis.utils.QgsMessageLog.logMessage, tag=__name__)

class MyWidgetProvider(
qgis.gui.QgsLayerTreeEmbeddedWidgetProvider):

SUPPORTED_DATA_PROVIDERS = [
"wms",
]

def __init__(self, *args, **kwargs):
logger("Instantiating provider...")
super().__init__(*args, **kwargs)
self.creation_timestamp = int(time.time())

def id(self):
logger("id called")
return "{}_{}".format(self.__class__.__name__,
self.creation_timestamp)

def name(self):
logger("name called")
return "My Widgetss"

def createWidget(self, map_layer, widget_index):
logger("createWidget called")
widget = widgets.QLabel("hi world!")
widget.setAutoFillBackground(True)
return widget

def supportsLayer(self, map_layer):
logger("supportsLayer called")
provider = map_layer.dataProvider()
name = provider.name()
result = True if name in self.SUPPORTED_DATA_PROVIDERS else False
logger("supportsLayer: {}".format(result),
level=qgis.core.Qgis.Debug)
return result
```


This code kind of works, but I'm facing two problems at the moment:

1. The `MyWidgetProvider.supportsLayer()` method is never called. The
logging call does not show up on the console and I also see that my
provider is offered on WMS layers, but also on some local vector layers
(which is not what I intend). grep'ping around the QGIS' source code I
could not find some place where this method would be called and used, so
I'm wondering if this is implemented. I would expect this method to be
called when the layer properties dialog is opened, so that my provider
would get filtered out for layers that were of the wrong type;

2. This code does not update the legend for the layer, UNLESS it is a
vector layer. If I try to add this provider to a WMS layer, the legend is
not updated. If I add it to a shapefile, it works as expected. In order to
get my QLabel to show up on WMS layers, I have to manually run this in the
QGIS python shell:

```
view = iface.layerTreeView()
view.model().refreshLayerLegend(view.currentNode())
```

However, I am not seeing where in my plugin's code can I add this snippet.
I only want the layer tree to be updated AFTER my provider creates the
widget, but this moment seems to be out of my control. Also, I am puzzled
by the fact that vector layers work just fine while my raster (WMS) does
not.


Thanks in advance for your help :)


Best regards

-- 
___ ___ __
Ricardo Garcia Silva
___
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] Build failure on macOS

2018-09-16 Thread Jürgen E . Fischer
Hi Tim,

On Sun, 16. Sep 2018 at 22:40:09 +0200, Tim Sutton wrote:
> resources/function_help/json/to_dm
> Traceback (most recent call last):
> File "/Users/timlinux/dev/cpp/QGIS/scripts/process_function_template.py", 
> line 47, in 
> json_params = json.load(function_file)

Apprently an issue with the UTF-8 characters in the new expression help files -
I also see that in the nightlies of master on Linux - but not on local builds.


Jürgen

-- 
Jürgen E. Fischer   norBIT GmbH Tel. +49-4931-918175-31
Dipl.-Inf. (FH) Rheinstraße 13  Fax. +49-4931-918175-50
Software Engineer   D-26506 Norden http://www.norbit.de


signature.asc
Description: PGP signature
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Aurich HRB 100827
Datenschutzerklaerung: https://www.norbit.de/83/
___
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] Build failure on macOS

2018-09-16 Thread Tim Sutton
Hi all

Building on master 195539d7d3a594da3da6c6874773d8d3d4877551 I get this:

[4/3576 27.2/sec] Generating qgsexpression_texts.cpp
FAILED: src/core/qgsexpression_texts.cpp
cd /Users/timlinux/dev/cpp/QGIS && /usr/local/opt/python3/bin/python3.6 
/Users/timlinux/dev/cpp/QGIS/scripts/process_function_template.py 
/Users/timlinux/dev/cpp/QGIS-QtCreator-Build/src/core/qgsexpression_texts.cpp.temp
 && /usr/local/Cellar/cmake/3.9.3_1/bin/cmake 
-DSRC=/Users/timlinux/dev/cpp/QGIS-QtCreator-Build/src/core/qgsexpression_texts.cpp.temp
 
-DDST=/Users/timlinux/dev/cpp/QGIS-QtCreator-Build/src/core/qgsexpression_texts.cpp
 -P /Users/timlinux/dev/cpp/QGIS/cmake/CopyIfChanged.cmake
resources/function_help/json/to_dm
Traceback (most recent call last):
File "/Users/timlinux/dev/cpp/QGIS/scripts/process_function_template.py", line 
47, in 
json_params = json.load(function_file)
File 
"/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/__init__.py",
 line 296, in load
return loads(fp.read(),
File 
"/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py",
 line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 580: 
ordinal not in range(128)
[5/3576 24.4/sec] Running utility command for zzz-processing-stageinstall
[6/3576 11.1/sec] Running utility command for pyqtcompat
ninja: build stopped: subcommand failed.
22:38:16: The process "/usr/local/bin/cmake" exited with code 1.
Error while building/deploying project qgis (kit: QT5 - QGIS Build Kit)
The kit QT5 - QGIS Build Kit has configuration issues which might be the root 
cause for this problem.
When executing step "Make"
22:38:16: Elapsed time: 00:01.


Does anyone else have this issue?

Regards

Tim
—








Tim Sutton

Co-founder: Kartoza
Ex Project chair: QGIS.org

Visit http://kartoza.com  to find out about open source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

Skype: timlinux
IRC: timlinux on #qgis at freenode.net



signature.asc
Description: Message signed with OpenPGP
___
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] qgis2web and qtwebkit?

2018-09-16 Thread Jürgen E . Fischer
Hi Paolo,

On Sun, 16. Sep 2018 at 08:25:27 +0200, Paolo Cavallini wrote:
> on Debian Sid the qgis2web plugin refuses to install because it cannot
> import name QtWebKit.
> 
> In fact, apparently only python-pyqt5.qtwebkit is available, not pyqt4
> (although libqtwebkit4 is available).
> 
> Anyone knows a workaround or a proper solution?

Install our packages.  The security nightmare should be libqtwebkit4, not the
bindings - but only the latter removed.  Our packages contain them.


Jürgen

-- 
Jürgen E. Fischer   norBIT GmbH Tel. +49-4931-918175-31
Dipl.-Inf. (FH) Rheinstraße 13  Fax. +49-4931-918175-50
Software Engineer   D-26506 Norden http://www.norbit.de
QGIS release manager (PSC)  GermanyIRC: jef on FreeNode


signature.asc
Description: PGP signature
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Aurich HRB 100827
Datenschutzerklaerung: https://www.norbit.de/83/
___
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