From koffice-devel Mon Apr 20 07:55:27 2009 From: Thomas Zander Date: Mon, 20 Apr 2009 07:55:27 +0000 To: koffice-devel Subject: shape lock properites Message-Id: <200904200955.27863.zander () kde ! org> X-MARC-Message: https://marc.info/?l=koffice-devel&m=124022451614318 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1406403436==" --===============1406403436== Content-Type: multipart/signed; boundary="nextPart1739499.zjxZnJjMR2"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1739499.zjxZnJjMR2 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 19. April 2009 11:08:02 Cyrille Berger wrote: > > On 2009-04-18 08:07:21, Jan Hambrecht wrote: > > > Well to be honest I think we have too many shape states which influen= ce > > > editing of shapes. These are - visible > > > - locked > > > - selectable > > > - contentProtected [] > I have been thinking about this. And I think different applications have > different need. In kword/kpresenter it kind of make sense to lock the > position of a text box and still be able to edit the text, hence the need > of locked and contentProtected This is in line with my thinking; locked means you won't be able to move it= =20 around. This is quite common for real world usage. Imagine having a template where the content is positioned correctly but you= =20 might want to change the actual content later. Or imagine you spent a day working on proper alignment and positioning in t= he=20 artistictText shape and the next day someone points out you made a typo. Then that centered aligned shape changes alignment just because the length = of=20 the text changes. So, locked; Being locked means the user can not change shape or position of the shape. is useful to indicate the intend. The artistic shape-tool might in this cas= e=20 change the position since the text is centered and the user requested it to= =20 be locked. > (that said, does it really make sense to=20 > protect the content of text ?),=20 The API docs say;=20 Content protection is a hint for tools to disallow the user editing=20 the content. So you can have a text-shape that is not editable. Which is common for usag= e=20 in forms, for example. This is what it was used for in KWord1.x But its probably useful in all apps. I can imagine adding a logo to a docum= ent=20 that is vector art and the user is not allowed to edit it (accidentally, fo= r=20 example). Much like your example of not being able to select locked shapes = or=20 layers. > If we agree on this, then we indeed needs the four states...=20 I hope my above reasoning will help us to agree we indeed need the four=20 states. > But I would=20 > suggest to rename locked to positionLocked (positionProtected ?). About > isEditable(), if we have two levels of "editability", positionLocked and > contentProtected, it's kind of difficult to return an interesting value. I have to say I agree; isEditable() seems to be mostly useful only for the= =20 default tool. A grep shows that its used only by that tool and by the layers. Maybe that= =20 means we should move the method out of KoShape and into KoShapeLayer where = we=20 might find a much better definition of what it means. =2D-=20 Thomas Zander --nextPart1739499.zjxZnJjMR2 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAknsKm8ACgkQCojCW6H2z/S7QwCg7WmyJe1SiwQpl/0XlJIA1ThZ U6oAn1CdpqhJbEL4cJKlx2911IIH+i46 =CkSB -----END PGP SIGNATURE----- --nextPart1739499.zjxZnJjMR2-- --===============1406403436== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ koffice-devel mailing list koffice-devel@kde.org https://mail.kde.org/mailman/listinfo/koffice-devel --===============1406403436==--