[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    shape lock properites
From:       Thomas Zander <zander () kde ! org>
Date:       2009-04-20 7:55:27
Message-ID: 200904200955.27863.zander () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


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 influence
> > > 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 
around.  This is quite common for real world usage.
Imagine having a template where the content is positioned correctly but you 
might want to change the actual content later.
Or imagine you spent a day working on proper alignment and positioning in the 
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 
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 case 
change the position since the text is centered and the user requested it to 
be locked.

> (that said, does it really make sense to 
> protect the content of text ?), 

The API docs say; 
 Content protection is a hint for tools to disallow the user editing 
 the content.
So you can have a text-shape that is not editable. Which is common for usage 
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 document 
that is vector art and the user is not allowed to edit it (accidentally, for 
example). Much like your example of not being able to select locked shapes or 
layers.

> If we agree on this, then we indeed needs the four states... 

I hope my above reasoning will help us to agree we indeed need the four 
states.

> But I would 
> 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 
default tool.
A grep shows that its used only by that tool and by the layers.  Maybe that 
means we should move the method out of KoShape and into KoShapeLayer where we 
might find a much better definition of what it means.

-- 
Thomas Zander

["signature.asc" (application/pgp-signature)]

_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic