Re: [QGIS-Developer] Customize list of algorithms shown in Vector or Raster menu

2017-10-03 Thread DelazJ
Merci Etienne. I find them.
Do you know if only Vector and Raster menus are allowed or could I set my
own main menu? (i know i can test but... :) )

2017-10-03 17:22 GMT+02:00 Etienne Trimaille :

> Hi,
>
> It's already possible in QGIS 2. In your processing options, you can setup
> your own vector and raster menus.
>
> 2017-10-03 17:09 GMT+02:00 DelazJ :
>
>> Hi,
>>
>> By default, some of the Processing algorithms have a shortcut in Vector
>> or Raster menu. Most of them are equivalent to the old Ftools or GDALTools
>> core plugins items.
>>
>> Question: Is it (/will it be) possible for end users to extend these
>> menus with any of the other core algorithms? Or is that menu structure
>> hardcoded in QGIS (regardless what plugins can do)?
>>
>> Thanks,
>> Harrissou
>>
>> ___
>> 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] Customize list of algorithms shown in Vector or Raster menu

2017-10-03 Thread Etienne Trimaille
Hi,

It's already possible in QGIS 2. In your processing options, you can setup
your own vector and raster menus.

2017-10-03 17:09 GMT+02:00 DelazJ :

> Hi,
>
> By default, some of the Processing algorithms have a shortcut in Vector or
> Raster menu. Most of them are equivalent to the old Ftools or GDALTools
> core plugins items.
>
> Question: Is it (/will it be) possible for end users to extend these menus
> with any of the other core algorithms? Or is that menu structure hardcoded
> in QGIS (regardless what plugins can do)?
>
> Thanks,
> Harrissou
>
> ___
> 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] Customize list of algorithms shown in Vector or Raster menu

2017-10-03 Thread DelazJ
Hi,

By default, some of the Processing algorithms have a shortcut in Vector or
Raster menu. Most of them are equivalent to the old Ftools or GDALTools
core plugins items.

Question: Is it (/will it be) possible for end users to extend these menus
with any of the other core algorithms? Or is that menu structure hardcoded
in QGIS (regardless what plugins can do)?

Thanks,
Harrissou
___
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] Replacing a dialogue with another at runtime with Python

2017-10-03 Thread Ricardo Filipe Soares Garcia da
Hi Dennis

On Tue, Oct 3, 2017 at 3:21 PM, Denis Rouzaud 
wrote:

> Hi Ricardo,
>
> Sorry to bother, but I think this kind of hack should be discouraged.
>


No bother at all :)

I am just playing around with some ideas for improving the WMS layer
support. The whole 'hijack QGIS native dialog' thing is just a sidetrack
that is not really my main goal. It just seemed like a wacky, fun idea to
try out. just to see if it is possible!




>
> This modifies QGIS behavior in a hidden way by replacing native dialogs.
> And as you pointed, there is probably no way of uninstalling your plugin
> properly. It will require QGIS to restart to work as expected, which is not
> that bad, but still.
>
> If you think current behavior is not optimal, I would suggest to either:
> * bring your improvements into master instead of a plugin
>


That might be the plan for the long run. For now I'm just having some fun
at lunch break ;)




> * create a dedicated button and menu entry in your plugin for your
> customized dialog
>
> With the latter option, I think it would be possible to add your menu
> entry and button in the layer menu and layer toolbar, respectively.
>


Yeah I am aware there is a proper way to do this, and this is not it. This
is just toying and poking at stuff to see what is possible.
On a more "serious" tone, I agree with you 100%. This is not something that
I'd be putting out there for the world to use.




>
> Just my two cents.
>
> Denis
>
>

Cheers



>
>
>
>
> Le mar. 3 oct. 2017 à 16:09, Ricardo Filipe Soares Garcia da <
> ricardo.garcia.si...@gmail.com> a écrit :
>
>> Hi all
>>
>> Answering my own question for posterity
>>
>> Turns out I can disconnect all slots from a signal by calling
>> `my_action.triggered.disconnect()` without any arguments. My goal of
>> replacing the native QGIS 'Add WMS/WMTS layer' dialogue with another one
>> can be achieved like this:
>>
>> ```python
>>
>> def my_handler():
>> print("Hello")
>>
>> action = iface.actionAddWmsLayer()
>> action.triggered.disconnect()
>> action.triggered.connect(my_handler)
>> ```
>>
>> This leaves another problem to be solved: How to restore the native QGIS
>> dialogue when my would-be plugin is deactivated by the user. The following
>> seems to work on QGIS 2.18:
>>
>> ```
>> provider_registry = qgis.core.QgsProviderRegistry.instance()
>> add_wms_dialog = provider_registry.selectWidget("wms")
>> action.triggered.disconnect()
>> action.triggered.connect(add_wms_dialog.show)
>>
>> ```
>>
>> Best regards
>>
>>
>>
>> On Mon, Oct 2, 2017 at 12:41 PM, Ricardo Filipe Soares Garcia da <
>> ricardo.garcia.si...@gmail.com> wrote:
>>
>>> Hi all
>>>
>>> Is it possible to replace one of QGIS' dialogues with a custom one
>>> during runtime by using Python?
>>>
>>> My concrete goal is to replace the dialogue that shows when clicking the
>>> 'Add WMS/WMTS Layer' with something custom. I'd like to enhance the native
>>> QGIS dialogue with additional elements for selecting additional dimensions,
>>> like time or elevation.
>>>
>>> Can this be done?
>>>
>>> I'm thinking that I'd only have to replace whatever slot is currently
>>> defined on the `iface.actionAddWmsLayer()` action with a custom function
>>> that would load my UI instead. The problem is that I can't seem to find
>>> where a signal's connected slots are stored with Qt.
>>>
>>> Ideally there would be some introspection mechanism by which I'd be able
>>> to retrieve which slots are associated with the action's `triggered` signal
>>> - I can't seem to find it though. After knowing which slot(s) were
>>> connected to the action's signal, I would presumably be able to
>>> `disconnect()` them and then connect my own.
>>>
>>> By looking at Qt's docs I thought that the QMetaObject class might be
>>> the place to look, but I still cannot find anything that looks seems to
>>> hold the registry of a signal's connected slots.
>>>
>>> Thanks in advance :)
>>>
>>>
>>>
>>> --
>>> ___ ___ __
>>> Ricardo Garcia Silva
>>>
>>
>>
>>
>> --
>> ___ ___ __
>> 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
>
>


-- 
___ ___ __
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] Replacing a dialogue with another at runtime with Python

2017-10-03 Thread Denis Rouzaud
Hi Ricardo,

Sorry to bother, but I think this kind of hack should be discouraged.

This modifies QGIS behavior in a hidden way by replacing native dialogs.
And as you pointed, there is probably no way of uninstalling your plugin
properly. It will require QGIS to restart to work as expected, which is not
that bad, but still.

If you think current behavior is not optimal, I would suggest to either:
* bring your improvements into master instead of a plugin
* create a dedicated button and menu entry in your plugin for your
customized dialog

With the latter option, I think it would be possible to add your menu entry
and button in the layer menu and layer toolbar, respectively.

Just my two cents.

Denis





Le mar. 3 oct. 2017 à 16:09, Ricardo Filipe Soares Garcia da <
ricardo.garcia.si...@gmail.com> a écrit :

> Hi all
>
> Answering my own question for posterity
>
> Turns out I can disconnect all slots from a signal by calling
> `my_action.triggered.disconnect()` without any arguments. My goal of
> replacing the native QGIS 'Add WMS/WMTS layer' dialogue with another one
> can be achieved like this:
>
> ```python
>
> def my_handler():
> print("Hello")
>
> action = iface.actionAddWmsLayer()
> action.triggered.disconnect()
> action.triggered.connect(my_handler)
> ```
>
> This leaves another problem to be solved: How to restore the native QGIS
> dialogue when my would-be plugin is deactivated by the user. The following
> seems to work on QGIS 2.18:
>
> ```
> provider_registry = qgis.core.QgsProviderRegistry.instance()
> add_wms_dialog = provider_registry.selectWidget("wms")
> action.triggered.disconnect()
> action.triggered.connect(add_wms_dialog.show)
>
> ```
>
> Best regards
>
>
>
> On Mon, Oct 2, 2017 at 12:41 PM, Ricardo Filipe Soares Garcia da <
> ricardo.garcia.si...@gmail.com> wrote:
>
>> Hi all
>>
>> Is it possible to replace one of QGIS' dialogues with a custom one during
>> runtime by using Python?
>>
>> My concrete goal is to replace the dialogue that shows when clicking the
>> 'Add WMS/WMTS Layer' with something custom. I'd like to enhance the native
>> QGIS dialogue with additional elements for selecting additional dimensions,
>> like time or elevation.
>>
>> Can this be done?
>>
>> I'm thinking that I'd only have to replace whatever slot is currently
>> defined on the `iface.actionAddWmsLayer()` action with a custom function
>> that would load my UI instead. The problem is that I can't seem to find
>> where a signal's connected slots are stored with Qt.
>>
>> Ideally there would be some introspection mechanism by which I'd be able
>> to retrieve which slots are associated with the action's `triggered` signal
>> - I can't seem to find it though. After knowing which slot(s) were
>> connected to the action's signal, I would presumably be able to
>> `disconnect()` them and then connect my own.
>>
>> By looking at Qt's docs I thought that the QMetaObject class might be the
>> place to look, but I still cannot find anything that looks seems to hold
>> the registry of a signal's connected slots.
>>
>> Thanks in advance :)
>>
>>
>>
>> --
>> ___ ___ __
>> Ricardo Garcia Silva
>>
>
>
>
> --
> ___ ___ __
> 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
___
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] Replacing a dialogue with another at runtime with Python

2017-10-03 Thread Ricardo Filipe Soares Garcia da
Hi all

Answering my own question for posterity

Turns out I can disconnect all slots from a signal by calling
`my_action.triggered.disconnect()` without any arguments. My goal of
replacing the native QGIS 'Add WMS/WMTS layer' dialogue with another one
can be achieved like this:

```python

def my_handler():
print("Hello")

action = iface.actionAddWmsLayer()
action.triggered.disconnect()
action.triggered.connect(my_handler)
```

This leaves another problem to be solved: How to restore the native QGIS
dialogue when my would-be plugin is deactivated by the user. The following
seems to work on QGIS 2.18:

```
provider_registry = qgis.core.QgsProviderRegistry.instance()
add_wms_dialog = provider_registry.selectWidget("wms")
action.triggered.disconnect()
action.triggered.connect(add_wms_dialog.show)

```

Best regards



On Mon, Oct 2, 2017 at 12:41 PM, Ricardo Filipe Soares Garcia da <
ricardo.garcia.si...@gmail.com> wrote:

> Hi all
>
> Is it possible to replace one of QGIS' dialogues with a custom one during
> runtime by using Python?
>
> My concrete goal is to replace the dialogue that shows when clicking the
> 'Add WMS/WMTS Layer' with something custom. I'd like to enhance the native
> QGIS dialogue with additional elements for selecting additional dimensions,
> like time or elevation.
>
> Can this be done?
>
> I'm thinking that I'd only have to replace whatever slot is currently
> defined on the `iface.actionAddWmsLayer()` action with a custom function
> that would load my UI instead. The problem is that I can't seem to find
> where a signal's connected slots are stored with Qt.
>
> Ideally there would be some introspection mechanism by which I'd be able
> to retrieve which slots are associated with the action's `triggered` signal
> - I can't seem to find it though. After knowing which slot(s) were
> connected to the action's signal, I would presumably be able to
> `disconnect()` them and then connect my own.
>
> By looking at Qt's docs I thought that the QMetaObject class might be the
> place to look, but I still cannot find anything that looks seems to hold
> the registry of a signal's connected slots.
>
> Thanks in advance :)
>
>
>
> --
> ___ ___ __
> Ricardo Garcia Silva
>



-- 
___ ___ __
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] QGIS Server 3 status

2017-10-03 Thread Anita Graser
On Tue, Oct 3, 2017 at 11:19 AM, Régis Haubourg 
wrote:

> Hi Etienne,
>
> from my point of view, this is the perfect time to start stressing QGIS
> server 3! We just discussed bout starting working with it this morning on a
> new project.
>
> Maybe Alessandro and René-Luc can tell us more about the plugin side.
>
> Paul is currently fixing issues raised by the OGC test engines. Richard,
> could you find some time to expose them on a public url?
>
>
​What would you think about publishing a QGIS Server update on blog.qgis.org
once the latest information has been gathered? I'd like to see Server
presented and advertised more ​widely.

​I'd be glad to help write the post if someone can help with the necessary
insights.

Regards,
Anita​
___
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] QGIS3D in OSGeo4W

2017-10-03 Thread Andreas Neumann
Hi Windows packagers - probably Jürgen? 

Now that QGIS 3D is in master - do you plan to enable this compile
option? A requirement is the upgrade of qt to version 5.9. Do you see
any blockers upgrading to qt 5.9 or can this be done? 

Thanks for the discussion, 

Andreas___
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 Server 3 status

2017-10-03 Thread Régis Haubourg
Hi Etienne,

from my point of view, this is the perfect time to start stressing QGIS
server 3! We just discussed bout starting working with it this morning on a
new project.

Maybe Alessandro and René-Luc can tell us more about the plugin side.

Paul is currently fixing issues raised by the OGC test engines. Richard,
could you find some time to expose them on a public url?

Regards,
Régis


2017-10-03 10:09 GMT+02:00 Etienne Trimaille :

> Hi devs,
>
> We would like to start testing QGIS Server 3: OGC services and Python
> plugins.
>
> I think I read that the QGIS Server refactoring was finished and it seems
> that most of OGC tests are working: http://37.187.164.
> 233/ogc/latest_wms_1_3_0.html
>
> Is it possible to have the status of QGIS Server 3?
> Are there some major known issues? Are Python plugins fully supported? Can
> we start porting plugins to the QGIS 3 Server API? Is there some highlights
> to know for Python plugins?
>
> Thanks for the all the work which has been done!
>
> Regards,
> Etienne
>
>
> ___
> 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 Server 3 status

2017-10-03 Thread Etienne Trimaille
Hi devs,

We would like to start testing QGIS Server 3: OGC services and Python
plugins.

I think I read that the QGIS Server refactoring was finished and it seems
that most of OGC tests are working:
http://37.187.164.233/ogc/latest_wms_1_3_0.html

Is it possible to have the status of QGIS Server 3?
Are there some major known issues? Are Python plugins fully supported? Can
we start porting plugins to the QGIS 3 Server API? Is there some highlights
to know for Python plugins?

Thanks for the all the work which has been done!

Regards,
Etienne
___
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