Writing plugins for konqueror

David Faure faure at kde.org
Tue Dec 7 15:26:34 GMT 2004


On Tuesday 07 December 2004 14:34, Richard Taylor wrote:
> Hi
> 
> Before I embark on reading the source code...
> 
> I want to write a pluging to konqueror that will generate dashboard clue 
> packets. 
> 
> The plugin needs to be notified when a new web page is loaded, grab the 
> contents of the page, build an XML document fragement and send the XML to a 
> local socket.

Ah, I just answered on kde-devel...

The plugin knows the parent KHTMLPart. So you can simply connect to
its completed(), completed(bool) signals, to be notified when a web page 
was loaded -- you probably want started(...) too. Those signals are
defined in KParts::ReadOnlyPart btw.

Then you can grab the contents of the page (maybe using the DOM tree
is the best way? - see document() in KHTMLPart) and do whatever you want
with it :-)


-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kfm-devel mailing list