Warning, /graphics/kst-plot/devel-docs/plugins/KstDataSources is written in an unsupported language. File is not indexed.
0001 KstDataSource Plugins 0002 --------------------- 0003 0004 The purpose of a KstDataSource plugin is to provide an implementation of the 0005 virtual class "KstDataSource". By default this class does nothing, which means 0006 that there is no direct way to load external data into Kst. Such a plugin 0007 provides three symbols: 0008 0009 extern "C" { 0010 // Create a data source. 0011 KstDataSource *create_<libname>(const QString& filename, const QString& type); 0012 0013 // Does this plugin understand the file indicated by the argument? 0014 bool understands_<libname>(const QString& filename); 0015 0016 // Which types of data does this plugin provide a data source for? 0017 QStringList provides_<libname>(); 0018 } 0019 0020 Generally you will have to create one or more derived classes of KstDataSource 0021 which implement your I/O system. 0022 0023 Along with the shared object, you must also create a desktop file: 0024 0025 => kstdata_myplugin.desktop 0026 0027 [Desktop Entry] 0028 Encoding=UTF-8 0029 Type=Service 0030 ServiceTypes=Kst Data Source 0031 X-KDE-ModuleType=Plugin 0032 X-KDE-Library=myplugin 0033 X-Kst-Plugin-Author=Your Name 0034 X-Kst-Plugin-Version=0.1 0035 Name=My Plugin 0036 Comment=A long description of what this thing actually does. 0037 0038 0039 You can find a template datasource plugin in kst/datasources/template/. It 0040 includes a proper Makefile.am, source files, and a desktop service file.