![]() Registered Member ![]()
|
I'm writing an application which I want to make plugin-based. The only documentation I can find about this is at http://techbase.kde.org/Development/Tut ... es/Plugins and this tutorial doesn't describe all aspects.
My questions are:
Any help would be greatly appreciated! |
![]() Administrator ![]()
|
The export macros are usually added to the class definition in the Header:
While you do not need to use desktop files, it is the usual and least hard coded way to do it.
Where X-KDE-ServiceType is your custom service type, and X-KDE-Library is the name of the .so file that contains the plugin code. You do not need to do anything special for plugins in CMake. In order to allow others to write plugins, you need to provide the following:
To make things easy, I recommend creating a service type, since it will allow you to locate all plugins for your app easily. ServiceTypes are installed to $KDEDIR/share/kde4/servicetypes/ and are desktop files containing the following:
Where X-KDE-ServiceType must be the same as the X-KDE-ServiceTypes field in your plugin desktop files. If you need any pointers, look at how I did it for System Settings: BaseMode ( plugin interface ) and SystemSettingsView service type declaration System Settings icon view plugin
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]