Re: [QGIS-Developer] processing =output boolean workaround ?

2017-05-18 Thread Andreas Plesch
On May 18, 2017 7:37 PM, "Nyall Dawson"  wrote:

On 14 May 2017 at 22:09, Andreas Plesch  wrote:
> For use in models it is sometimes useful to generate a boolean output
from a
> processing script. Since boolean is not available as output, what would
be a
> good workaround ?
> I am simply using string as output type:
> output=str(False)
> but then the receiving script has to work a bit on that input and it is
> awkward to type 'True' if the input script is used standalone.
>
> Of course, the real question is why boolean is not offered as output type
?
> To me it would be useful.

I suspect there's no reason apart from that no-one has had the need
until now and accordingly no-one has coded this feature.

A PR would be very welcome! (after the upcoming outputs->c++ work lands)


In fact, I took a look at the Python code and found that it would be
probably possible to implement following the code for the number type, in a
few places in the processing code. I think the models provider may not need
changes.

Since I am not very proficient in c++, it will probably more efficient for
me to stick to somewhat awkward workarounds. But I will take a look.

(I would like to use Travis as much as possible. Is it possible to avoid
building locally altogether ?)
___
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] Bridging FreeCAD and QGIS

2017-05-18 Thread Nyall Dawson
On 12 May 2017 at 07:34, Luigi Pirelli  wrote:
> FYI in freeCAD list
>
> https://forum.freecadweb.org/viewtopic.php?t=22390

This is quite encouraging to read. I'd love to see stronger links
between our projects. I suspect there's a lot we can share - even if
it's just sharing all the custom widgets both projects have had to
develop/refine!

On this note, we spoke at the Australian hackfest about how we can
make QGIS play nicer with other projects. We've got the issue right
now that QgsApplication is a QApplication, so it's currently
impossible to import the qgis libraries into another Qt project
without creating this forced Q(gs)Application.

This should change - so we came up with the idea of splitting up the
current QgsApplication class, into:

- QgsCore. A singleton (yep!) containing all the various other "single
instance members" which are currently attached to QgsApplication. E.g.
task manager, provider registries, etc. This approach was recently
taken with the construction of a QgsGui singleton containing global
GUI members.
- Move all the various path handling code out to their own class.
- Create a QApplication in main, instead of creating a QgsApplication.
Standalone scripts would need to do the same - construct their own
Q(Core/Gui)Application, just like standalone PyQt scripts require.
- Kill the need to manually call initQgis, by handling this
automatically when the qgis python libraries are imported.

Benefits would be:
- much easier use of qgis python libraries in standalone scripts
(especially with Nathan's great work in
https://github.com/qgis/QGIS/commit/df679a2). On Windows this would
then be as simple as: setup python path correctly - import qgis.core -
done.
- QGIS libraries can be used safely with any other Qt based code which
handles its own Q(Core/Gui)Application creation.

Of course... this was just planning ahead... I don't think anyone's
actively working on this yet ;)

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

Re: [QGIS-Developer] processing =output boolean workaround ?

2017-05-18 Thread Nyall Dawson
On 14 May 2017 at 22:09, Andreas Plesch  wrote:
> For use in models it is sometimes useful to generate a boolean output from a
> processing script. Since boolean is not available as output, what would be a
> good workaround ?
> I am simply using string as output type:
> output=str(False)
> but then the receiving script has to work a bit on that input and it is
> awkward to type 'True' if the input script is used standalone.
>
> Of course, the real question is why boolean is not offered as output type ?
> To me it would be useful.

I suspect there's no reason apart from that no-one has had the need
until now and accordingly no-one has coded this feature.

A PR would be very welcome! (after the upcoming outputs->c++ work lands)

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

Re: [QGIS-Developer] QGIS 3 - No Margin on Dockable Dialog Boxes

2017-05-18 Thread Nyall Dawson
On 19 May 2017 at 00:37, C Hamilton  wrote:
> I recently completed the conversion of Lat Lon Tools to work with QGIS 3. It
> is in the plugin repo.
>
> I noticed that my dockable dialog boxes seem to have no margin around them
> in comparison to QGIS 2. Was this intended? Do I need a margin or leave it
> as is?

There's been no intentional changes here. It's likely one of the
slight styling differences resulting from Qt4->Qt5 transition.

Side note: If you're porting to QGIS 3 API, make sure you use
QgsDockWidget in place of QDockWidget to ensure consistent behavior
with the inbuilt docks.

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

Re: [QGIS-Developer] [Qgis-psc] [Qgis-developer] Are there plans to create a unique "Add layer" tool?

2017-05-18 Thread Nyall Dawson
On 11 May 2017 at 07:43, Tim Sutton  wrote:
>
> Hi
>
>
> On Wed, May 10, 2017 at 6:35 PM, Alexandre Neto  wrote:
>>
>> Hello all,
>>
>> Following what was discussed in Essen hackfest about the unified Add Layer 
>> tool (described in the end of this document), I'm happy to inform that 
>> Boundless decided to allocate resources to implement the Step 1.
>>
>> "Step 1: Add a tabbed view to the existing browser (vertical column in the 
>> following mockup). The default view is the basic browser. The remaining tabs 
>> open the existing dialog UIs embedded inside the browser window."
>>
>> As decided, we will have a PR in time for 3.0.
>
>

On this note - I've recently discovered the need for some type of
reusable layer selection widget which allows choice of existing
layers/loading new layers from the file system/loading new layers from
available db/online connections. This would be extremely valuable for
processing too!

So I'm really glad to hear that you'll be pushing ahead with this work
- thanks Boundless!

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] Join the OSGeo Code Sprint Saturday 22 July 2017

2017-05-18 Thread Jeff McKenna

Hi all,

Please join the OSGeo Code Sprint at FOSS4G Europe on Saturday 22 July 2017!

There’s always plenty to do – it’s not all about programming: 
translation, documentation, packaging, feedback, discussions, 
testing...it's all super important for a project!


If you are interested in participating, please add your project/name in 
this wiki page :


https://wiki.osgeo.org/wiki/FOSS4G-Europe_2017_Code_sprint


If you have questions/comments/ideas please let us know, by contacting 
the Code Sprint Committee at europe-foss4g (at) osgeo (dot) org


The Code Sprint Organizing Team is looking forward to see 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 - No Margin on Dockable Dialog Boxes

2017-05-18 Thread C Hamilton
I recently completed the conversion of Lat Lon Tools to work with QGIS 3.
It is in the plugin repo.

I noticed that my dockable dialog boxes seem to have no margin around them
in comparison to QGIS 2. Was this intended? Do I need a margin or leave it
as is?

Thanks,

Calvin
___
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] QgsSettings + ows key cleanup?

2017-05-18 Thread Alessandro Pasotti
On Thu, May 18, 2017 at 1:27 PM, Richard Duivenvoorde 
wrote:

> On 18-05-17 12:11, Alessandro Pasotti wrote:
> > Hi Richard,
> >
> > Cleaning is always very welcome!
> >
> > I think that to bring some more order to the root level settings, we
> > should eventually make more use of the optional section argument:
> >
> > https://qgis.org/api/classQgsSettings.html#
> aba2f174ee000905cac8aff26665ed7c7
> >
> > This is not implemented for groups though, but if you feel it could be
> > helpful I can add it.
>
> Hi Alessandro,
>
> I do not understand: "This is not implemented for groups though..."
> Isn't a section the same concept as a group?
> Where is this 'section' element to be used?
> Or is the idea to use it in a (free chosen) group?
>

I mean that the optional section argument is not available for beginGroup
https://qgis.org/api/classQgsSettings.html#ae0ffd9ce99f3fa8a712befb9be99412b


>
> I already have > 40 groups/sections(?) (as counted in the 'Advanced
> Settings Editor').
> I do not think it is possible to bring that back to the 8 you propose,
> do you?
>

I don't know, maybe you can move some of them under one of the available
sections. The idea of the sections is to reduce (to 8, but can be expanded
if needed) the root level elements, of course you are not forced to do that
but I think that grouping GUI settings under the "gui" section, application
settings under the "app" section, plugins settings under "plugins" etc.
etc. is the first step towards a more logical tree classification.



>
> Looking into the 'Advanced Settings Editor' I also have double values in
> the following 'groups'?
> PythonPlugins
> and
> pythonplugins
> but this could be due to recent changes. Ik will remove my config
>
>
This is bad design: see rule n. 1 in
http://doc.qt.io/qt-5/qsettings.html#section-and-key-syntax


-- 
Alessandro Pasotti
w3:   www.itopen.it
___
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] Issue tracker seems to not send notifications

2017-05-18 Thread DelazJ
Hi Richard,

I didn't know about that page. Notification was set on "all events from all
projects" (translated) but note that this wasn't my previous option (I did
receive only issues I created or wanted to follow, not all changes).
While writing this message I receive a notification so things are fixed
now, for me. Thanks.

BUT given that I didn't change this setting myself, it would be weird if I
were the only one concerned by this issue, wouldn't it.

Harrissou

2017-05-18 13:08 GMT+02:00 Richard Duivenvoorde :

> On 18-05-17 12:38, DelazJ wrote:
> > Hi,
> >
> > I had chatted on this with Juergen two weeks ago but would like to
> > recall that it still looks like the issue tracker doesn't send
> > notification when issue reports are modified.
> > The only notification I got in those weeks is someone's report I closed
> > but none of my own reports that got changed (commented, closed) was sent
> > to me. This could be problematic when a feedback is expected or the
> > report was wrongly closed.
>
> Hi H,
>
> there is an option to let Redmine know for what events you want to be
> notified in
>
> https://issues.qgis.org/my/account
>
> did that maybe change during move to new server? There are different
> options there.
>
> Maybe change it and back to be sure you do not have a null or default
> value in there?
>
> Regards,
>
> Richard
>
>
>
___
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] QgsSettings + ows key cleanup?

2017-05-18 Thread Nathan Woodrow
ps Nathan: any news on your profile work?

Yeah getting there, just doing clean up etc. Busy at work at the moment but
hopefully this weekend.

We also need something to deal with these key changes to help people
migrate from 2 to 3. We need a transform settings function.

On Thu, May 18, 2017 at 9:27 PM, Richard Duivenvoorde 
wrote:

> On 18-05-17 12:11, Alessandro Pasotti wrote:
> > Hi Richard,
> >
> > Cleaning is always very welcome!
> >
> > I think that to bring some more order to the root level settings, we
> > should eventually make more use of the optional section argument:
> >
> > https://qgis.org/api/classQgsSettings.html#
> aba2f174ee000905cac8aff26665ed7c7
> >
> > This is not implemented for groups though, but if you feel it could be
> > helpful I can add it.
>
> Hi Alessandro,
>
> I do not understand: "This is not implemented for groups though..."
> Isn't a section the same concept as a group?
> Where is this 'section' element to be used?
> Or is the idea to use it in a (free chosen) group?
>
> I already have > 40 groups/sections(?) (as counted in the 'Advanced
> Settings Editor').
> I do not think it is possible to bring that back to the 8 you propose,
> do you?
>
> Looking into the 'Advanced Settings Editor' I also have double values in
> the following 'groups'?
> PythonPlugins
> and
> pythonplugins
> but this could be due to recent changes. Ik will remove my config
>
> Regards,
>
> Richard
>
> ps Nathan: any news on your profile work?
> ___
> 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] QgsSettings + ows key cleanup?

2017-05-18 Thread Richard Duivenvoorde
On 18-05-17 12:11, Alessandro Pasotti wrote:
> Hi Richard,
> 
> Cleaning is always very welcome!
> 
> I think that to bring some more order to the root level settings, we
> should eventually make more use of the optional section argument:
> 
> https://qgis.org/api/classQgsSettings.html#aba2f174ee000905cac8aff26665ed7c7
> 
> This is not implemented for groups though, but if you feel it could be
> helpful I can add it.

Hi Alessandro,

I do not understand: "This is not implemented for groups though..."
Isn't a section the same concept as a group?
Where is this 'section' element to be used?
Or is the idea to use it in a (free chosen) group?

I already have > 40 groups/sections(?) (as counted in the 'Advanced
Settings Editor').
I do not think it is possible to bring that back to the 8 you propose,
do you?

Looking into the 'Advanced Settings Editor' I also have double values in
the following 'groups'?
PythonPlugins
and
pythonplugins
but this could be due to recent changes. Ik will remove my config

Regards,

Richard

ps Nathan: any news on your profile work?
___
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] Issue tracker seems to not send notifications

2017-05-18 Thread Richard Duivenvoorde
On 18-05-17 12:38, DelazJ wrote:
> Hi,
> 
> I had chatted on this with Juergen two weeks ago but would like to
> recall that it still looks like the issue tracker doesn't send
> notification when issue reports are modified.
> The only notification I got in those weeks is someone's report I closed
> but none of my own reports that got changed (commented, closed) was sent
> to me. This could be problematic when a feedback is expected or the
> report was wrongly closed.

Hi H,

there is an option to let Redmine know for what events you want to be
notified in

https://issues.qgis.org/my/account

did that maybe change during move to new server? There are different
options there.

Maybe change it and back to be sure you do not have a null or default
value in there?

Regards,

Richard


___
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] Issue tracker seems to not send notifications

2017-05-18 Thread DelazJ
Thanks, Paolo. Any particular profile setting to activate?

Checked all the folders in my mail box including spams: nothing.

2017-05-18 13:03 GMT+02:00 Paolo Cavallini :

> Il 18 maggio 2017 12:38:58 CEST, DelazJ  ha scritto:
>>
>> Hi,
>>
>> I had chatted on this with Juergen two weeks ago but would like to recall
>> that it still looks like the issue tracker doesn't send notification when
>> issue reports are modified.
>> The only notification I got in those weeks is someone's report I closed
>> but none of my own reports that got changed (commented, closed) was sent to
>> me. This could be problematic when a feedback is expected or the report was
>> wrongly closed.
>>
>> Regards,
>> Harrissou
>>
>
> I get notified.
> All the best.
> --
> Sent from mobile. Sorry for being short
>
___
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] Issue tracker seems to not send notifications

2017-05-18 Thread Paolo Cavallini
Il 18 maggio 2017 12:38:58 CEST, DelazJ  ha scritto:
>Hi,
>
>I had chatted on this with Juergen two weeks ago but would like to
>recall
>that it still looks like the issue tracker doesn't send notification
>when
>issue reports are modified.
>The only notification I got in those weeks is someone's report I closed
>but
>none of my own reports that got changed (commented, closed) was sent to
>me.
>This could be problematic when a feedback is expected or the report was
>wrongly closed.
>
>Regards,
>Harrissou

I get notified.
All the best.
-- 
Sent from mobile. Sorry for being short___
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] Issue tracker seems to not send notifications

2017-05-18 Thread DelazJ
Hi,

I had chatted on this with Juergen two weeks ago but would like to recall
that it still looks like the issue tracker doesn't send notification when
issue reports are modified.
The only notification I got in those weeks is someone's report I closed but
none of my own reports that got changed (commented, closed) was sent to me.
This could be problematic when a feedback is expected or the report was
wrongly closed.

Regards,
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] QgsSettings + ows key cleanup?

2017-05-18 Thread Alessandro Pasotti
Hi Richard,

Cleaning is always very welcome!

I think that to bring some more order to the root level settings, we should
eventually make more use of the optional section argument:

https://qgis.org/api/classQgsSettings.html#aba2f174ee000905cac8aff26665ed7c7

This is not implemented for groups though, but if you feel it could be
helpful I can add it.

Cheers.




On Thu, May 18, 2017 at 12:01 PM, Richard Duivenvoorde 
wrote:

> Hi,
>
> hitting https://issues.qgis.org/issues/16528
> and fixing: https://github.com/qgis/QGIS/pull/4586
>
> with a very clean config, I see that the settings are rather messy:
>
> [Qgis] and [qgis] are/were used (in the PR I propose a further cleanup)
>
>
> But in the settings I see now different parents for the same connection:
>
> [qgis]
> WCS\aa\authcfg=
> WCS\aa\password=
> WCS\aa\username=
> connections-wcs\aa\referer=
> connections-wcs\aa\url=http://foo.com/geoserver/wcs
> connections-wcs\selected=aa
>
> And I'm wondering if we not should try to cleanup that too:
>
> All connections related to a connection in one group, and not scattered
> over those two groups. I would be ok with the use of WCS/WMS/WFS/ESRI
> Anybody else interested in this? :-)
>
> Grepping for [Qgis] I also found old plugin repo's in the
> installer_data.py:
>
> https://github.com/qgis/QGIS/blob/master/python/pyplugin_
> installer/installer_data.py#L112
>
> most of them are not even working anymore
>
> Clean?
>
> Regards,
>
> Richard
> ___
> 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




-- 
Alessandro Pasotti
w3:   www.itopen.it
___
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] QgsSettings + ows key cleanup?

2017-05-18 Thread Richard Duivenvoorde
Hi,

hitting https://issues.qgis.org/issues/16528
and fixing: https://github.com/qgis/QGIS/pull/4586

with a very clean config, I see that the settings are rather messy:

[Qgis] and [qgis] are/were used (in the PR I propose a further cleanup)


But in the settings I see now different parents for the same connection:

[qgis]
WCS\aa\authcfg=
WCS\aa\password=
WCS\aa\username=
connections-wcs\aa\referer=
connections-wcs\aa\url=http://foo.com/geoserver/wcs
connections-wcs\selected=aa

And I'm wondering if we not should try to cleanup that too:

All connections related to a connection in one group, and not scattered
over those two groups. I would be ok with the use of WCS/WMS/WFS/ESRI
Anybody else interested in this? :-)

Grepping for [Qgis] I also found old plugin repo's in the installer_data.py:

https://github.com/qgis/QGIS/blob/master/python/pyplugin_installer/installer_data.py#L112

most of them are not even working anymore

Clean?

Regards,

Richard
___
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 expression function

2017-05-18 Thread Siki Zoltan

Dear Developers,

I found some strange behaviour of Python expression functions if variable 
length parameter list is given (e.g args=-1).

If there is a NULL value among the parameters the function is not called.
See the discussion on
https://gis.stackexchange.com/questions/240470/qgis-expression-function/240480?noredirect=1#comment376061_240480

If it a feature or a bug?

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