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

List:       koffice-devel
Subject:    Re: koffice
From:       Thomas Zander <zander () kde ! org>
Date:       2006-12-28 8:35:10
Message-ID: 200612280935.11453.zander () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Thursday 28 December 2006 06:30, Thorsten Zachmann wrote:
> > * fetch factory
> > * use factory to create new shape instance
> > * set values on new shape
> > * set parent on new shape (KoShape::setParent())
> > * use shapeController::addShape(shape) to add it to the document.
> >
> > you seem to add an extra step at the end to add it to the page. Which I
> > do in step 4 by setting it as a parent.
>
> Thanks for the explanation. I can see now how it can work. That was the
> part that was missing for me. This sounds good as it moves all to flake
> which is a good thing :-).
>
> Just to be sure the setParent should be done at the end of
> KoShapeController::addShape?

Fine with me,
just be sure to not overwrite a parent that already is set by the tool.

> Why not add it to the canvas? Is there a good reason to add it to the
> KoSelection. As for setting and getting it in the appcation you have to do
> something like m_canvas->shapeManager()->selection()->activeLayer(). So
> would it not be wise to move it to the canvas? Which would then just be a
> m_canvas->activeLayer().

If I have to choose between the levels of inderection and the proper place, I 
choose the proper place any time.
Sure the amount of arrows (->) may be bigger but you will much more likely 
look for the selected layer on the selection object then on the canvas while 
reading the API docs.

> Sound like a good plan.

Glad to hear it :)
-- 
Thomas Zander

[Attachment #5 (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