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

List:       kde-edu-devel
Subject:    Re: [kde-edu-devel] possible design math app
From:       Kevin Krammer <kevin.krammer () gmx ! at>
Date:       2002-08-11 17:47:33
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday, 11. August 2002 19:10, Dominique Devriese wrote:
> well, you're not supposed to do so, if you look at
> kdelibs/kparts/plugin.cpp, you'll see that it's mostly formed by the
> functions for loading plugins, and that they don't use desktop files.
> If you use the class without its loading functions, you could as well
> not use it, since that's about the only thing it does ( except for the
> xmlFile() and localXmlFile() funcs, which are trivial, iirc )

We didn't have a look at the code when we started using plugins :)
We use the same approach for locating and loading as we do with parts.
KTrader -> KService -> KLibLoader -> KLibFactory -> plugin

> Anyway, it seems to me that the best approach would be:
>
> an interface class which inherits KParts::Part and indirectly QObject,
> and which is passed a pointer to its shell to access and send info
> to...  The plugins inherit KXMLGUIClient, an present a function
> widget()...

We use a similar approach in Kmud.
To pass the shells' API to the parts, we have an own KmudFactory 
(subclass of KLibFactory) which every service has to provde.

This factory has this additonal method:
KmudPart* createKmudPart(KmudAPI* api, QObject* parent, KService::Ptr 
service, const QStringList& args=QStringList());

When the LibLoader returns the factory pointer, we cast it to KmudFactory 
and create out part with the specialised method and pass an implementor 
of KmudAPI to it.

> Is this something we can agree on ?  It seems to me like the
> best approach to implementing Eva's design..

I agree, sounds reasonable :)

Cheers,
kevin

- -- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kevin Krammer <kevin.krammer@gmx.at>
Developer at the Kmud Project http://www.kmud.de/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9VqM6nKMhG6pzZJIRArIVAJ9ysJRd5lxi5zJ5YlXUgHXgOOTpnQCcDIjS
9dXMEvnVkjcvENoFMy9jts4=
=ED2U
-----END PGP SIGNATURE-----
_______________________________________________
kde-edu-devel mailing list
kde-edu-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-edu-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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