[Kst] branches/work/kst/pluginify/kst/devel-docs/plugins

Adam Treat treat at kde.org
Wed Sep 20 21:37:13 CEST 2006

SVN commit 586856 by treat:

* More documentation for the various kinds of plugins

 M  +3 -3      KstBasicPlugins  
 M  +37 -1     KstDataObjects  

--- branches/work/kst/pluginify/kst/devel-docs/plugins/KstBasicPlugins #586855:586856
@@ -1,5 +1,5 @@
+KstBasicPlugin Plugins
 The purpose of a KstBasicPlugin plugin is to provide an implementation of the
 virtual class "KstDataObject" via the abstract class "KstBasicPlugin."  Plugin
@@ -126,4 +126,4 @@
 configuration widget for your plugin.  The one thing it doesn't do is provide
 the actual algorithm or the names of the inputs/outputs.
-See the linefit plugin for an example implementation.
+See the Line Fit plugin for an example implementation.
--- branches/work/kst/pluginify/kst/devel-docs/plugins/KstDataObjects #586855:586856
@@ -1 +1,37 @@
\ No newline at end of file
+KstDataObject Plugins
+The purpose of a KstDataObject plugin is to provide an implementation of the
+virtual class "KstDataObject."  Plugin writers need to provide a class that
+inherits "KstDataObject" directly.  You will also need to provide a .desktop
+file and a configuration widget for this plugin.  The benefit of this type of
+plugin over KstBasicPlugin plugins is the degree of control you'll have over
+the implementation.  Most plugins should probably use KstBasicPlugin, but if
+you need a custom dialog for instance, this is the type of plugin for you.
+Here is an example of the .desktop file named 'kstobject_myplugin.desktop':
+    [Desktop Entry]
+    Encoding=UTF-8
+    Type=Service
+    ServiceTypes=Kst Data Object
+    X-KDE-ModuleType=Plugin
+    X-KDE-Library=kstobject_fooplugin
+    X-Kst-Plugin-Author=Your Name
+    X-Kst-Plugin-Version=0.1
+    Name=Foo
+    Comment=A plugin that provides Foo algorithm.
+You C++ class should inherit KstDataObject and provide implementations of the
+pure virtual methods found in KstDataObject:
+    virtual UpdateType update(int updateCounter = -1) = 0;
+    virtual QString propertyString() const = 0;
+    virtual void showNewDialog() = 0;
+    virtual void showEditDialog() = 0;
+There is also a number of regular virtual methods that can be reimplemented
+as needed.
+See the Cross Power Spectrum plugin for an example implementation and the
+KstDataObject header file for API declarations.

More information about the Kst mailing list