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

List:       kfm-devel
Subject:    Re: KParts vs. Plugins in Konqi
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-10-21 18:38:16
[Download RAW message or body]

On Dimanche 21 Octobre 2001 18:37, Ryan Breen wrote:
-- > I'm writing an addon for Konqueror, and I'm having trouble determining the 
> best approach to take.  My development goal is to create a system management 
> program that looks to the end user like a web app (all user interaction is 
> driven through KHTML).  I need to be able to intercept user naviagtion, 
> translate it into the appropriate work behind the scenes, and then generate 
> the next 'page' of output and options.
> 
> I've done a good bit of reading and have played around with the alternatives, 
> but I'm still not sure which of the possible integration choices makes the 
> most sense.  As I see it, my choices are to a) write a Konqueror plugin or b) 
> to write a KPart that can provide a browser/view for Konqueror.
> 
> I'm wary of choice a) because I'm not sure I can get the level of interaction 
> (i.e. intercepting user navigation) with the KHTMLPart that I need.  With 
> option b), I can extend BrowserExtension and have a great deal more control.
> 
> However, I would like my application to be available on startup of Konqueror 
> (like a plugin) rather than simply when someone opens a document of the 
> appropriate Mimetype.  Also, since my application is not based on handling 
> files, the fact that the KPart will be loaded only when a certain Mimetype is 
> requested doesn't seem to fit my goals.

Well you could associate your part with text/html, and make it preferred
above khtml, and this way it'd get used for any HTML page.
Or do you want to selectively activate it, i.e. not for ALL html pages ?
In that case you could simply let khtml be the preferred one, and in the menus
you should see "Preview with <your part>", if you associate it with text/html.

A plugin is trickier to do, I think - it'd have to simply activate some functionality
that you would have added to khtml itself (the biggest problem is the part<->plugin
communication etc.).

--
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/ , http://www.konqueror.org/
KDE 3.0: Konquering the Desktops

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

Configure | About | News | Add a list | Sponsored by KoreLogic