Re: [Qgis-user] Set variables by UI

2020-11-26 Thread L.W.

Thanks for your thoughts.

But, I asked for having the values to easily change (on little points)
them without writing the whole value (e.g. text).


If there were an event "onClosing"-Attribute-Dialog (UI, not list) then
everything would be fine for my needs.


I haven't found out how I can code a plugin the easy way ... python
isn't the easy way for me :-)


Am 26.11.2020 um 11:09 schrieb Bernd Vogelgesang:


Without knowing more about your project than A and B, it is a guessing
game what could be best.

But to me, if I understood correctly, it sounds like you are about to
create a data-redundancy over several layers.

If those attributes are really the same, and stay the same, it would
maybe me wiser to work with relations and/or virtual layers where you
could deliver those common values without having to really store them
individually in each layer.



On 25.11.20 22:43, L.W. wrote:

That's what I want to use, but how to set the "default value" - no, not
per propertier and form builder.

I want to set the DV by input in "UI A" (add feature to layer A) and
then add new feature to B, and in UI B the DV is set to value from
form A.


Am 25.11.2020 um 21:19 schrieb Harrissou:

Hi,
Something like setting default values for field:
https://docs.qgis.org/3.16/en/docs/user_manual/working_with_vector/vector_properties.html#default-values



?

Regards,
Harrissou

Le 25 novembre 2020 20:49:17 GMT+01:00, "L.W."  a
écrit :

    Hello,

    I have a question again, I know the possibility of the project
    variables, which can be queried from all layers.
    I have to insert several points and lines or polygons in
different layers.
    All inserted features have in common that they have certain
attributes
    that are the same for all.
    It would be nice if I only have to enter these common attributes
for the
    first feature and the values ​​are then automatically inserted as
    default values ​​for each new feature.
    One possible way would of course be a link to a shared data
table, but I
    don't necessarily want to go this way for reasons.
    I know the option of giving a UI a Python script when it is
opened (even
    if I can't Python), but I haven't found anything to execute a
script
    after closing, for example.
    Obviously logical, you can of course set the variables
beforehand, but
    that would be another step that you have to take beforehand and you
    cannot get to these variables without a whole series of mouse
clicks.

    Any ideas?

    Regards


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

    Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user



--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
excuser ma brièveté.



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


Re: [Qgis-user] Set variables by UI

2020-11-26 Thread Bernd Vogelgesang

Without knowing more about your project than A and B, it is a guessing
game what could be best.

But to me, if I understood correctly, it sounds like you are about to
create a data-redundancy over several layers.

If those attributes are really the same, and stay the same, it would
maybe me wiser to work with relations and/or virtual layers where you
could deliver those common values without having to really store them
individually in each layer.



On 25.11.20 22:43, L.W. wrote:

That's what I want to use, but how to set the "default value" - no, not
per propertier and form builder.

I want to set the DV by input in "UI A" (add feature to layer A) and
then add new feature to B, and in UI B the DV is set to value from
form A.


Am 25.11.2020 um 21:19 schrieb Harrissou:

Hi,
Something like setting default values for field:
https://docs.qgis.org/3.16/en/docs/user_manual/working_with_vector/vector_properties.html#default-values



?

Regards,
Harrissou

Le 25 novembre 2020 20:49:17 GMT+01:00, "L.W."  a
écrit :

    Hello,

    I have a question again, I know the possibility of the project
    variables, which can be queried from all layers.
    I have to insert several points and lines or polygons in
different layers.
    All inserted features have in common that they have certain
attributes
    that are the same for all.
    It would be nice if I only have to enter these common attributes
for the
    first feature and the values ​​are then automatically inserted as
    default values ​​for each new feature.
    One possible way would of course be a link to a shared data
table, but I
    don't necessarily want to go this way for reasons.
    I know the option of giving a UI a Python script when it is
opened (even
    if I can't Python), but I haven't found anything to execute a script
    after closing, for example.
    Obviously logical, you can of course set the variables
beforehand, but
    that would be another step that you have to take beforehand and you
    cannot get to these variables without a whole series of mouse
clicks.

    Any ideas?

    Regards

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

Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user



--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
excuser ma brièveté.



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


Re: [Qgis-user] Set variables by UI

2020-11-26 Thread Phil Wyatt
In Settings, Options, Digitizing you can set "Reuse last entered attribute 
values" but I think its ALL fields.

Cheers - Phil

-Original Message-
From: Qgis-user  On Behalf Of Richard 
Duivenvoorde
Sent: Thursday, 26 November 2020 7:50 PM
To: Harrissou ; qgis-user@lists.osgeo.org; L.W. 

Subject: Re: [Qgis-user] Set variables by UI

Hi,

Some days ago while browsing code, I got the feeling that there was also some 
kind of option like "Remember last inserted value of this field, and use it as 
'default' for the next new feature to create...".
But I cannot find it in the gui (and no time to search for it in the code).

Does anybody is aware of such function?
Not sure if it is usefull for the original question though... It would not work 
over different layers...

Regards,

Richard Duivenvoorde

On 11/25/20 9:19 PM, Harrissou wrote:
> Hi,
> Something like setting default values for field: 
> https://docs.qgis.org/3.16/en/docs/user_manual/working_with_vector/vector_properties.html#default-values
>  
> <https://docs.qgis.org/3.16/en/docs/user_manual/working_with_vector/vector_properties.html#default-values>
>  ?
> 
> Regards,
> Harrissou
> 
> Le 25 novembre 2020 20:49:17 GMT+01:00, "L.W."  a écrit :
> 
> Hello,
> 
> I have a question again, I know the possibility of the project
> variables, which can be queried from all layers.
> I have to insert several points and lines or polygons in different layers.
> All inserted features have in common that they have certain attributes
> that are the same for all.
> It would be nice if I only have to enter these common attributes for the
> first feature and the values ​​are then automatically inserted as
> default values ​​for each new feature.
> One possible way would of course be a link to a shared data table, but I
> don't necessarily want to go this way for reasons.
> I know the option of giving a UI a Python script when it is opened (even
> if I can't Python), but I haven't found anything to execute a script
> after closing, for example.
> Obviously logical, you can of course set the variables beforehand, but
> that would be another step that you have to take beforehand and you
> cannot get to these variables without a whole series of mouse clicks.
> 
> Any ideas?
> 
> Regards
> 
> --
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user 
> <https://lists.osgeo.org/mailman/listinfo/qgis-user>
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user 
> <https://lists.osgeo.org/mailman/listinfo/qgis-user>
> 
> 
> -- 
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma 
> brièveté.
> 
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> 

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

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


Re: [Qgis-user] Set variables by UI

2020-11-26 Thread Richard Duivenvoorde
On 11/26/20 10:03 AM, Phil Wyatt wrote:
> In Settings, Options, Digitizing you can set "Reuse last entered attribute 
> values" but I think its ALL fields.

Ah, Thanks. Yes that is it, and it is ALL fields, and it separate for EACH 
layer.

You can see it here:
https://docs.qgis.org/testing/en/docs/user_manual/introduction/qgis_configuration.html
search for 'Reuse' (although there is no description...). 

Would it not be more consequent if (just like the option 'Suppress attribute 
form pop-up after feature creation') if the 'Reuse' option could also be 
overridden in the Layer Properties/Fields  just like the 'Suppres' option?

(Or maybe even Removed from the General Options?)

Regards,

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


Re: [Qgis-user] Set variables by UI

2020-11-26 Thread Richard Duivenvoorde
Hi,

Some days ago while browsing code, I got the feeling that there was also some 
kind of option like "Remember last inserted value of this field, and use it as 
'default' for the next new feature to create...".
But I cannot find it in the gui (and no time to search for it in the code).

Does anybody is aware of such function?
Not sure if it is usefull for the original question though... It would not work 
over different layers...

Regards,

Richard Duivenvoorde

On 11/25/20 9:19 PM, Harrissou wrote:
> Hi,
> Something like setting default values for field: 
> https://docs.qgis.org/3.16/en/docs/user_manual/working_with_vector/vector_properties.html#default-values
>  
> 
>  ?
> 
> Regards,
> Harrissou
> 
> Le 25 novembre 2020 20:49:17 GMT+01:00, "L.W."  a écrit :
> 
> Hello,
> 
> I have a question again, I know the possibility of the project
> variables, which can be queried from all layers.
> I have to insert several points and lines or polygons in different layers.
> All inserted features have in common that they have certain attributes
> that are the same for all.
> It would be nice if I only have to enter these common attributes for the
> first feature and the values ​​are then automatically inserted as
> default values ​​for each new feature.
> One possible way would of course be a link to a shared data table, but I
> don't necessarily want to go this way for reasons.
> I know the option of giving a UI a Python script when it is opened (even
> if I can't Python), but I haven't found anything to execute a script
> after closing, for example.
> Obviously logical, you can of course set the variables beforehand, but
> that would be another step that you have to take beforehand and you
> cannot get to these variables without a whole series of mouse clicks.
> 
> Any ideas?
> 
> Regards
> 
> --
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user 
> 
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user 
> 
> 
> 
> -- 
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma 
> brièveté.
> 
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> 

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


Re: [Qgis-user] Set variables by UI

2020-11-25 Thread Stefan Giese (WhereGroup)
you can use one of the signals emitted by a QgsVectorLayer, for example 
|attributeAdded| 
 
or |afterCommitChanges| 
 
(see https://qgis.org/pyqgis/3.14/core/QgsVectorLayer.html) for the 
whole list of signals. Then you will need a python script to connect a 
slot (function) to that signal doing what you wanted to be done with 
your layer(s). at least you will need a place where to put your function 
in and connect it to the signal, this can be done manual from the 
console or you can put in the open project macro or in a 
startup.py...this depends what you want to achieve. I described  a bit 
different example in this post on stackexchange: 
https://gis.stackexchange.com/questions/379781/forcing-choice-for-default-value-during-data-entry/379827#379827 
but it will show you, how you can start with signals and slots.


hope this helps a bit

Stefan

Am 25.11.2020 um 22:43 schrieb L.W.:


That's what I want to use, but how to set the "default value" - no, 
not per propertier and form builder.


I want to set the DV by input in "UI A" (add feature to layer A) and 
then add new feature to B, and in UI B the DV is set to value from form A.



Am 25.11.2020 um 21:19 schrieb Harrissou:

Hi,
Something like setting default values for field: 
https://docs.qgis.org/3.16/en/docs/user_manual/working_with_vector/vector_properties.html#default-values 
 
?


Regards,
Harrissou

Le 25 novembre 2020 20:49:17 GMT+01:00, "L.W."  a 
écrit :


Hello,

I have a question again, I know the possibility of the project
variables, which can be queried from all layers.
I have to insert several points and lines or polygons in different layers.
All inserted features have in common that they have certain attributes
that are the same for all.
It would be nice if I only have to enter these common attributes for the
first feature and the values ​​are then automatically inserted as
default values ​​for each new feature.
One possible way would of course be a link to a shared data table, but I
don't necessarily want to go this way for reasons.
I know the option of giving a UI a Python script when it is opened (even
if I can't Python), but I haven't found anything to execute a script
after closing, for example.
Obviously logical, you can of course set the variables beforehand, but
that would be another step that you have to take beforehand and you
cannot get to these variables without a whole series of mouse clicks.

Any ideas?

Regards

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

Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user  



--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez 
excuser ma brièveté. 


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


--
Mit freundlichen Grüßen
Stefan Giese
Projektleiter/Consultant
--
Aufwind durch Wissen!
Jetzt neu: Webinare und Online-Schulungen
bei der www.foss-academy.com
--

WhereGroup GmbH
Schwimmbadstr. 2
79100 Freiburg
Germany

Fon: +49 (0)761 / 519 102 - 61
Fax: +49 (0)761 / 519 102 - 11

stefan.gi...@wheregroup.com
www.wheregroup.com
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885



OpenPGP_signature
Description: OpenPGP digital signature
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Set variables by UI

2020-11-25 Thread L.W.

That's what I want to use, but how to set the "default value" - no, not
per propertier and form builder.

I want to set the DV by input in "UI A" (add feature to layer A) and
then add new feature to B, and in UI B the DV is set to value from form A.


Am 25.11.2020 um 21:19 schrieb Harrissou:

Hi,
Something like setting default values for field:
https://docs.qgis.org/3.16/en/docs/user_manual/working_with_vector/vector_properties.html#default-values

?

Regards,
Harrissou

Le 25 novembre 2020 20:49:17 GMT+01:00, "L.W."  a écrit :

Hello,

I have a question again, I know the possibility of the project
variables, which can be queried from all layers.
I have to insert several points and lines or polygons in different layers.
All inserted features have in common that they have certain attributes
that are the same for all.
It would be nice if I only have to enter these common attributes for the
first feature and the values ​​are then automatically inserted as
default values ​​for each new feature.
One possible way would of course be a link to a shared data table, but I
don't necessarily want to go this way for reasons.
I know the option of giving a UI a Python script when it is opened (even
if I can't Python), but I haven't found anything to execute a script
after closing, for example.
Obviously logical, you can of course set the variables beforehand, but
that would be another step that you have to take beforehand and you
cannot get to these variables without a whole series of mouse clicks.

Any ideas?

Regards

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

Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user  



--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
excuser ma brièveté.
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Set variables by UI

2020-11-25 Thread Harrissou
Hi,
Something like setting default values for field: 
https://docs.qgis.org/3.16/en/docs/user_manual/working_with_vector/vector_properties.html#default-values
 ? 

Regards,
Harrissou

Le 25 novembre 2020 20:49:17 GMT+01:00, "L.W."  a écrit :
>Hello,
>
>I have a question again, I know the possibility of the project
>variables, which can be queried from all layers.
>I have to insert several points and lines or polygons in different
>layers.
>All inserted features have in common that they have certain attributes
>that are the same for all.
>It would be nice if I only have to enter these common attributes for
>the
>first feature and the values ​​are then automatically inserted as
>default values ​​for each new feature.
>One possible way would of course be a link to a shared data table, but
>I
>don't necessarily want to go this way for reasons.
>I know the option of giving a UI a Python script when it is opened
>(even
>if I can't Python), but I haven't found anything to execute a script
>after closing, for example.
>Obviously logical, you can of course set the variables beforehand, but
>that would be another step that you have to take beforehand and you
>cannot get to these variables without a whole series of mouse clicks.
>
>Any ideas?
>
>Regards
>
>___
>Qgis-user mailing list
>Qgis-user@lists.osgeo.org
>List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma 
brièveté.___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] Set variables by UI

2020-11-25 Thread L.W.

Hello,

I have a question again, I know the possibility of the project
variables, which can be queried from all layers.
I have to insert several points and lines or polygons in different layers.
All inserted features have in common that they have certain attributes
that are the same for all.
It would be nice if I only have to enter these common attributes for the
first feature and the values ​​are then automatically inserted as
default values ​​for each new feature.
One possible way would of course be a link to a shared data table, but I
don't necessarily want to go this way for reasons.
I know the option of giving a UI a Python script when it is opened (even
if I can't Python), but I haven't found anything to execute a script
after closing, for example.
Obviously logical, you can of course set the variables beforehand, but
that would be another step that you have to take beforehand and you
cannot get to these variables without a whole series of mouse clicks.

Any ideas?

Regards

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