Originally posted by David Boosalis
Thank you for the feed back, so if I don't use the XML file what is the call I make for a KIconedit part instance. I have searched the for kiconedit.h and have found it only in the KDE source directory.
Well, very likely there is no such thing as a KIconEdit KPart.
I have only KDE3.2 here so I can't speak for the more recent KDE3.3, but on KIconEdit from 3.2 does not install any libs, which would be necessary if it was available as a KPart.
Remember that a KPart is some kind of plugin, so it is implemented inside a shared library (.so file)
The kiconeditui.rc file tells me nothing on how to create a Class( or does it).
No, the ui.rc file describes the placement of actions in menus and toolbars (and those menus and toolbars)
Is there a special directory for .h files with respect to kparts.
Not necessarily.
If a component which is available as a KPart has a lot of headers to install, it might have its own subdirectory in KDE's include directory.
There are two ways to use a part:
- directly create an instance of a known class, as you did in your KHTMLPart example
- load a potentially unknown part depending on requested properties/capabilities.
First usage is like with any other class:
- include header
- new Classname(parameters);
- link program to necessary libs
Loading is more complicated but keeps the application from depending on the parts library.
Usual steps here:
- include interface headers
- make a service lookup
- load factory depending on result
- have factory create a part instance
- cast to interface
Cheers,
_