Hi,
2007/2/14, Armando Navarro-Vazquez <uscqoanv cesga.es>:
> Dear Members:
>
> I am trying that my KParts based molecular visor works
as a kind of
> netscape plugin inside konqueror. So I trap if the
parent object of the
> part is a KHTMLPart* object. I want to manage embedded
objects which are
> representd by scripts as:
>
> <EMBED src="molecule.pdb"
display3d="wireframe" >
>
> How can I get inside my KPart the text of the script?
You mean you want the attributes, or other parts of the the
container
HTML doc? Anyhow, you might check this tiny example
http:
//kmplayer.kde.org/pkgs/ktictactoe.tar.bz2
which shows the possibilities kparts have in KHTML.
To summarize:
You must install a mimetype to link to your kpart
You get all the arguments of the embed/object HTML tag in
your KPart constructor
Accessing the container document has to be done using
javascript and you can
only get info back by assigning a result to a variable or
method of
your own object (eg. evaluate a javascript like
'this.foo=location.href')
> And another question related somewhat tho this ? There
will further
> development about embedding KParts into other browsers
( the way dragoneggs
> works with KPDF) in KDE4.
I don't understand the question.
Koos
>> Visit
http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
unsubscribe <<
|