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

2017-06-04 Thread Stéphane Henriod
Hi Alessandro

I just downloaded the latest nightly build and will make some tests in the
coming days. What would be the most efficient / useful way to give you
feedback and comments? On this thread?

Thanks and cheers

Stéphane

Le jeudi 1 juin 2017, Alessandro Pasotti  a écrit :

> On Thu, Jun 1, 2017 at 11:22 AM, Stéphane Henriod  > wrote:
>
>> I really look forward to testing it :-) Thanks a lot for our involvement
>> here!
>>
>>
>
> Thanks to Boundless for funding the development and thanks to all of you
> who participated with design, mockups, ideas, comments and reviews!
>
> This was a nice and effective cooperation.
>
>
> BTW, if you can't wait, a Docker with a nigthly build of the PR branch is
> available as "boundlessgeo/qgis-testing-environment:unified-button"
>
> Cheers
>
>
>>
>> Le mercredi 31 mai 2017, Alessandro Pasotti > > a écrit :
>>
>>> Hi,
>>>
>>> final update: the development of what was in phase 1 is done.
>>>
>>> Actually, a bit more than phase 1 considering that we've redesigned the
>>> delimited text dialog GUI and I've done quite a bit of small refactorings
>>> of the providers selection dialogs interfaces.
>>>
>>> There has been a lot of feed-back, thank you all!
>>>
>>> As expected, there is no complete agreement over the final GUI bits for
>>> the menus and toolbars, and we still miss an icon (the green plus that I've
>>> used was only meant as a placeholder). I tried to keep the old toolbar
>>> available (disabled by default) mainly because it can spare a click and
>>> power users might want it back. Also, the new icon is the most prominent in
>>> the left bar and it's the first menu item in the layers menu.
>>>
>>> I have not a strong opinion about those toolbars and menus but I think I
>>> should wait no more and merge it as it is, then give the people some time
>>> to test the actual implementation and decide how to improve it.
>>>
>>> I kept the controversial part in a single commit so that it will be very
>>> easy to revert and propose a different placement for menus, icons and
>>> toolbars.
>>>
>>>
>>> Any objections if I proceed?
>>>
>>>
>>>
>>> On Wed, May 24, 2017 at 2:29 PM, Alessandro Pasotti 
>>> wrote:
>>>
 Hi,

 a quick update:

 I've prepared a PR with a working prototype in
 https://github.com/qgis/QGIS/pull/4629, I need some feed-back and some
 help, expecially UX/UI about if we want it as a dockable dialog too (and
 how to make it user-configurable).

 Feed-back welcome (but please keep it limited in scope to phase 1).

 Cheers



 On Fri, May 19, 2017 at 9:45 AM, Richard Duivenvoorde <
 rdmaili...@duif.net> wrote:

> On 19-05-17 01:23, Nyall Dawson wrote:
>
> > 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!
>
> Yep, and thanks Alessandro for the screenie. Makes me want more!
>
> @Nyall in Essen the talk was to start with what Alessandro wrote in his
> email, so 1 dialog 'merging' all buttons/widgets/dialogs into one,
> reuse
> as much as possible. So it was possible to get it into 3.0
>
> Off course people (.../me) started brainstorming about features which
> w/could be added too :-)
>
> Your idea adds (I think) to the idea to make some kind of
> 'datamanagement-console' in near future, where you can create/copy
> data(!), move data around (browser part) or delete it.
> Your note fits in this isn't it?
>
> 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

>>>
>>>
>>>
>>> --
>>> Alessandro Pasotti
>>> w3:   www.itopen.it
>>>
>>
>>
>> --
>>
>> “When you travel, remember that a foreign country is not designed to make
>> you comfortable. It is designed to make its own people comfortable." --
>> Clifton Fadiman
>>
>>
>
>
> --
> Alessandro Pasotti
> w3:   www.itopen.it
>


-- 

“When you travel, remember that a foreign country is not designed to make
you comfortable. It is designed to make its own people comfortable." --
Clifton Fadiman
___

Re: [QGIS-Developer] PyQGIS: Check if layer is already loaded?

2017-06-04 Thread Siki Zoltan

Dear Magnus.

you can iterate through the layers:

for lay in QgsMapLayerRegistry.instance().mapLayers().values():
if lay.name() == your_layer_name:
your layer is loaded


Regards,
Zoltan

On Sun, 4 Jun 2017, Magnus Homann wrote:

I'm writing a plugin that adds feature to a SHP-layer, specified as a 
filename.
If the layer already is loaded in Qgis, I want to check for and use the 
loaded

layer instead of creating a new from the same SHP-file.

Is this even possible?
___
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] PyQGIS: Check if layer is already loaded?

2017-06-04 Thread Magnus Homann

I'm writing a plugin that adds feature to a SHP-layer, specified as a filename.
If the layer already is loaded in Qgis, I want to check for and use the loaded
layer instead of creating a new from the same SHP-file.

Is this even possible?
___
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