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

List:       koffice-devel
Subject:    Re: [Kivio] What would be a good practice to implement configurable
From:       Yue Liu <opuspace () gmail ! com>
Date:       2010-04-27 9:40:16
Message-ID: l2t9c9f22431004270240p8125f4a7m5db5fc4058edb559 () mail ! gmail ! com
[Download RAW message or body]

I investigated those suggestions, load a default shape and change
properties later would be a good choice, but it's troublesome to
create one shape for a stencil, 'cause there will be hundreds of
stencils. I'm considering if it's possible to use patch files for odg
formated stencils. That is, if one stencil need to be configured, we
load the original odg file, once you changed the properties of the
stencil, the orignal shape inserted would be deleted, the odg file
would be patched with the related patches and inserted to canvas. In
that way we need only one shape class for stencils.

On Sun, Apr 25, 2010 at 4:57 PM, Thomas Zander <zander@kde.org> wrote:
> On Sunday 25. April 2010 08.49.46 Yue Liu wrote:
>> For stencils no need to edit, an odg file is okay, but there should be
>> configurable stencils, for example, to a multiplexer stencil the
>> number of nodes should be configurable. How can the issue be solved in
>> your opinion?
>
> I suggest to use KoShapeFactory::createShapeOptionPanels () to create a widget
> that will be shown at the time the shape is inserted :)
> See for example how the text shape or the Divine Proportion shape do this.
>
> Another suggestion might be to have a property in the canvas resource-manager
> which can be just an integer for your node-count or similar and on creation
> this property is used by the shapeFactory to set it automatically. The user
> can then configure the node-count using something like a docker or a menu.
> Whatever works for you.
>
> Last option I can come up with is that the user just inserts a normal default
> shape and you have a tool to change the properties. Look at the 'flower' shape
> for example how that can work. Its a KoParameterShape.
> --
> Thomas Zander
> _______________________________________________
> koffice-devel mailing list
> koffice-devel@kde.org
> https://mail.kde.org/mailman/listinfo/koffice-devel
>
_______________________________________________
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