Re: [Qgis-user] set layer not editable

2016-11-03 Thread Matthias Kuhn
I think there was a method QgsVectorLayer.setReadOnly exposed to python
before.
You could try to use that. I'm not sure what it did exactly before 2.16,
I did a lot of changes for QGIS 2.16 to integrate this flag properly in
the user interface. And I'm not even sure if it was saved in the project
file or only saved within one QGIS session.

Regards, Matthias

On 11/03/2016 11:07 AM, Juerg Lindauer wrote:
> Thanks Mathias.
> 
> Because we had a plugin for 2.8 , we could not change to QGIS 2.16 or
> higher.
> 
> Is there any possibility to set a layer not editable for a qgis (2.8.9)
> Project?
> 
> Regards, Jürg
> 
> 
> 
> Message: 4
> Date: Wed, 2 Nov 2016 11:25:03 +0100
> From: Matthias Kuhn <matth...@opengis.ch>
> To: qgis-user@lists.osgeo.org
> Subject: Re: [Qgis-user] set layer not editable
> Message-ID: <824f80e6-2b43-b8f2-121b-e7bb11873...@opengis.ch>
> Content-Type: text/plain; charset=utf-8
> 
> Hi Jürg,
> 
> Yes, this is available since QGIS 2.16
> 
> https://www.qgis.org/en/site/forusers/visualchangelog216/index.html#feature-make-readonly-mode-of-vector-layers-configurable-in-project
> 
> Best regards
> Matthias
> 
> On 11/02/2016 10:49 AM, Juerg Lindauer wrote:
>> Hi 
>>
>> Is there a way to set a layer not editable for a qgis project?
>>
>> Thanks for any hint.
>>
>> Jürg Lindauer
>>
>>  
>> Amt für Landwirtschaft
>> Abt. Agrarmassnahmen und Bodenrecht
>> Hirschistrasse 15
>> Postfach 5182 
>> 6431 Schwyz
>> Telefon: 041 819 15 17
>> Telefax: 041 819 15 19
>> E-Mail: juerg.linda...@sz.ch
>> Internet: www.sz.ch/landwirtschaft 
>>
>>
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
> 
> 
> 
> 
> 
> Amt für Landwirtschaft
> Abt. Agrarmassnahmen und Bodenrecht
> Hirschistrasse 15
> Postfach 5182 
> 6431 Schwyz
> Telefon: 041 819 15 17
> Telefax: 041 819 15 19
> E-Mail: juerg.linda...@sz.ch
> Internet: www.sz.ch/landwirtschaft 
> 
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
> 
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] set layer not editable

2016-11-03 Thread Juerg Lindauer
Thanks Mathias.

Because we had a plugin for 2.8 , we could not change to QGIS 2.16 or
higher.

Is there any possibility to set a layer not editable for a qgis (2.8.9)
Project?

Regards, Jürg



Message: 4
Date: Wed, 2 Nov 2016 11:25:03 +0100
From: Matthias Kuhn <matth...@opengis.ch>
To: qgis-user@lists.osgeo.org
Subject: Re: [Qgis-user] set layer not editable
Message-ID: <824f80e6-2b43-b8f2-121b-e7bb11873...@opengis.ch>
Content-Type: text/plain; charset=utf-8

Hi Jürg,

Yes, this is available since QGIS 2.16

https://www.qgis.org/en/site/forusers/visualchangelog216/index.html#feature-make-readonly-mode-of-vector-layers-configurable-in-project

Best regards
Matthias

On 11/02/2016 10:49 AM, Juerg Lindauer wrote:
> Hi 
> 
> Is there a way to set a layer not editable for a qgis project?
> 
> Thanks for any hint.
> 
> Jürg Lindauer
> 
>  
> Amt für Landwirtschaft
> Abt. Agrarmassnahmen und Bodenrecht
> Hirschistrasse 15
> Postfach 5182 
> 6431 Schwyz
> Telefon: 041 819 15 17
> Telefax: 041 819 15 19
> E-Mail: juerg.linda...@sz.ch
> Internet: www.sz.ch/landwirtschaft 
> 
> 
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
> 





Amt für Landwirtschaft
Abt. Agrarmassnahmen und Bodenrecht
Hirschistrasse 15
Postfach 5182 
6431 Schwyz
Telefon: 041 819 15 17
Telefax: 041 819 15 19
E-Mail: juerg.linda...@sz.ch
Internet: www.sz.ch/landwirtschaft 

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

Re: [Qgis-user] set layer not editable

2016-11-02 Thread Matthias Kuhn
Hi Jürg,

Yes, this is available since QGIS 2.16

https://www.qgis.org/en/site/forusers/visualchangelog216/index.html#feature-make-readonly-mode-of-vector-layers-configurable-in-project

Best regards
Matthias

On 11/02/2016 10:49 AM, Juerg Lindauer wrote:
> Hi 
> 
> Is there a way to set a layer not editable for a qgis project?
> 
> Thanks for any hint.
> 
> Jürg Lindauer
> 
>  
> Amt für Landwirtschaft
> Abt. Agrarmassnahmen und Bodenrecht
> Hirschistrasse 15
> Postfach 5182 
> 6431 Schwyz
> Telefon: 041 819 15 17
> Telefax: 041 819 15 19
> E-Mail: juerg.linda...@sz.ch
> Internet: www.sz.ch/landwirtschaft 
> 
> 
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
> 
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] set layer not editable

2016-11-02 Thread Juerg Lindauer
Hi 

Is there a way to set a layer not editable for a qgis project?

Thanks for any hint.

Jürg Lindauer

 
Amt für Landwirtschaft
Abt. Agrarmassnahmen und Bodenrecht
Hirschistrasse 15
Postfach 5182 
6431 Schwyz
Telefon: 041 819 15 17
Telefax: 041 819 15 19
E-Mail: juerg.linda...@sz.ch
Internet: www.sz.ch/landwirtschaft 


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