--===============0733667316== Content-Type: multipart/signed; boundary="nextPart1639983.CNcd39kNj0"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1639983.CNcd39kNj0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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? =46ine 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=20 choose the proper place any time. Sure the amount of arrows (->) may be bigger but you will much more likely= =20 look for the selected layer on the selection object then on the canvas whil= e=20 reading the API docs. > Sound like a good plan. Glad to hear it :) =2D-=20 Thomas Zander --nextPart1639983.CNcd39kNj0 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQBFk4G/CojCW6H2z/QRAu1YAJ9sMyVbkXnHMHwlTH/Qyp2JphxYEQCfTNy5 m0I6av+9ac0Apd9jfG17Vh8= =WZhp -----END PGP SIGNATURE----- --nextPart1639983.CNcd39kNj0-- --===============0733667316== 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 --===============0733667316==--