From koffice-devel Mon Jun 25 14:58:55 2007 From: Boudewijn Rempt Date: Mon, 25 Jun 2007 14:58:55 +0000 To: koffice-devel Subject: Re: how to put my document in the resourceProvider Message-Id: <200706251658.57522.boud () valdyas ! org> X-MARC-Message: https://marc.info/?l=koffice-devel&m=118278357804239 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1873792219==" --===============1873792219== Content-Type: multipart/signed; boundary="nextPart2176070.xQNpqKbSSC"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart2176070.xQNpqKbSSC Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 25 June 2007, Thomas Zander wrote: > As one thing that I wanted to make easy for plugins to use, I wanted to > put the current document instance in the KoCanvasResouceProvider. > Unfortunately I can't seem to get anything to compile that puts a > KWDocument* in a QVariant. > Does anyone have a hint? > > Why can Krita place a layer in the QVariant just fine, if its 'wrapped' in > a KisSharedPtr ? Is that a way to go? I'm not sure whether it's the shared pointer that makes it work, but this=20 macro in kis_layer.h did the trick for me: Q_DECLARE_METATYPE( KisLayerSP ) > I have a similar problem with a QTextCursor. I'm guessing I need to create > a struct with things like the document and selection etc which I then > make possible to place in a QVariant. > > Any thoughts appreciated. =2D-=20 Boudewijn Rempt=20 http://www.valdyas.org/fading/index.cgi --nextPart2176070.xQNpqKbSSC Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBGf9gxdaCcgCmN5d8RAopXAKDNBdR0zTM8MIizsqbOaeUKs4jsiQCfWJiI k8oDqNYaCdhRaIAMG4omUws= =P6pB -----END PGP SIGNATURE----- --nextPart2176070.xQNpqKbSSC-- --===============1873792219== 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 --===============1873792219==--