Warning, /graphics/kst-plot/devel-docs/plugins/KstDataObjects is written in an unsupported language. File is not indexed.
0001 KstDataObject Plugins 0002 --------------------- 0003 0004 The purpose of a KstDataObject plugin is to provide an implementation of the 0005 virtual class "KstDataObject." Plugin writers need to provide a class that 0006 inherits "KstDataObject" directly. You will also need to provide a .desktop 0007 file and a configuration widget for this plugin. The benefit of this type of 0008 plugin over KstBasicPlugin plugins is the degree of control you'll have over 0009 the implementation. Most plugins should probably use KstBasicPlugin, but if 0010 you need a custom dialog for instance, this is the type of plugin for you. 0011 0012 Here is an example of the .desktop file named 'kstobject_myplugin.desktop': 0013 0014 [Desktop Entry] 0015 Encoding=UTF-8 0016 Type=Service 0017 ServiceTypes=Kst Data Object 0018 X-KDE-ModuleType=Plugin 0019 X-KDE-Library=kstobject_fooplugin 0020 X-Kst-Plugin-Author=Your Name 0021 X-Kst-Plugin-Version=0.1 0022 Name=Foo 0023 Comment=A plugin that provides Foo algorithm. 0024 0025 You C++ class should inherit KstDataObject and provide implementations of the 0026 pure virtual methods found in KstDataObject: 0027 0028 virtual UpdateType update(int updateCounter = -1) = 0; 0029 virtual QString propertyString() const = 0; 0030 virtual void showNewDialog() = 0; 0031 virtual void showEditDialog() = 0; 0032 0033 There is also a number of regular virtual methods that can be reimplemented 0034 as needed. 0035 0036 See the Cross Power Spectrum plugin for an example implementation and the 0037 KstDataObject header file for API declarations.