[Kst] branches/work/kst/pluginify/kst

Adam Treat treat at kde.org
Wed Sep 20 20:46:19 CEST 2006


SVN commit 586845 by treat:

* Change X-Kst-Plugin-Library --> X-KDE-Library
for all data source plugins.  There was no reason
to keep the kst version as the KDE infrastructure
assumes X-KDE-Library.
* Document the change
* Add X-Kst-Plugin-Version
* Change linefit and crossspectrum to fit in with
the naming scheme. Oh, and I forgot to add the 
desktop files before...


 M  +1 -1      devel-docs/plugins/KstBasicPlugins  
 M  +2 -1      devel-docs/plugins/KstDataSources  
 M  +14 -13    devel-docs/plugins/StartHere  
 M  +1 -1      src/datasources/ascii/kstdata_ascii.desktop  
 M  +1 -1      src/datasources/cdf/kstdata_cdf.desktop  
 M  +1 -1      src/datasources/dirfile/kstdata_dirfile.desktop  
 M  +1 -1      src/datasources/fitsimage/kstdata_fitsimage.desktop  
 M  +1 -1      src/datasources/frame/kstdata_frame.desktop  
 M  +1 -1      src/datasources/healpix/kstdata_healpix.desktop  
 M  +1 -1      src/datasources/indirect/kstdata_indirect.desktop  
 M  +1 -1      src/datasources/lfiio/kstdata_lfiio.desktop  
 M  +1 -1      src/datasources/nad/kstdata_nad.desktop  
 M  +1 -1      src/datasources/naddirect/kstdata_naddirect.desktop  
 M  +1 -1      src/datasources/netcdf/kstdata_netcdf.desktop  
 M  +1 -1      src/datasources/planck/kstdata_planck.desktop  
 M  +1 -1      src/datasources/qimagesource/kstdata_qimagesource.desktop  
 M  +1 -1      src/datasources/template/kstdata_template.desktop  
 M  +1 -1      src/kst/kstplugin.desktop  
 M  +1 -1      src/libkst/kstdataplugin.h  
 M  +1 -1      src/libkstapp/kstdatamanager_i.cpp  
 M  +2 -2      src/libkstmath/kstdataobject.cpp  
 M  +4 -4      src/plugins/crossspectrum/Makefile.am  
 M  +2 -2      src/plugins/crossspectrum/crosspowerspectrum.cpp  
 A             src/plugins/crossspectrum/kstobject_crossspectrum.desktop  
 M  +0 -1      src/plugins/effective_bandwidth/kstobject_effbandwidth.desktop  
 M  +4 -4      src/plugins/linefit/Makefile.am  
 D             src/plugins/linefit/kst_linefit.desktop  
 A             src/plugins/linefit/kstobject_linefit.desktop   src/plugins/linefit/kst_linefit.desktop#586492
 M  +2 -2      src/plugins/linefit/linefit.cpp  
 M  +0 -1      src/plugins/testplugin/kstobject_testplugin.desktop  


--- branches/work/kst/pluginify/kst/devel-docs/plugins/KstBasicPlugins #586844:586845
@@ -14,8 +14,8 @@
     ServiceTypes=Kst Data Object
     X-KDE-ModuleType=Plugin
     X-KDE-Library=kstobject_fooplugin
-    X-Kst-Plugin-Library=kstobject_fooplugin
     X-Kst-Plugin-Author=Your Name
+    X-Kst-Plugin-Version=0.1
     Name=Foo
     Comment=A plugin that provides Foo algorithm.
 
--- branches/work/kst/pluginify/kst/devel-docs/plugins/KstDataSources #586844:586845
@@ -29,8 +29,9 @@
 Type=Service
 ServiceTypes=Kst Data Source
 X-KDE-ModuleType=Plugin
-X-Kst-Plugin-Library=myplugin
+X-KDE-Library=myplugin
 X-Kst-Plugin-Author=Your Name
+X-Kst-Plugin-Version=0.1
 Name=My Plugin
 Comment=A long description of what this thing actually does.
 
--- branches/work/kst/pluginify/kst/devel-docs/plugins/StartHere #586844:586845
@@ -24,25 +24,26 @@
 All KstPlugins except KstCPlugins are KDE style plugins and therefore require
 a .desktop file and must be installed in the KDE standard plugins directories.
 They derive from the base servicetype "Kst/Plugin".  This base type includes
-three properties:
+two kst specific properties:
 
 X-Kst-Plugin-Author: A string containing the name of the author.
-X-Kst-Plugin-Library: The library name.  This is not the filename, but a name
-                      that is used to construct it.  For instance, it could
-                      be "myplugin" where the library might be named
-                      "kstdata_myplugin.so".  This must also be a legal C
-                      variable name as it is used to construct the function
-                      names inside the library.
 X-Kst-Plugin-Version: A string containing the version of the plugin.
 
-KstDataObject and KstBasicPlugin plugins have an additional required property:
+,desktop files also have additional properties.  Here are the required ones:
 
-X-KDE-Library: This should be the same as X-Kst-Plugin-Library.
+Name: A string containing the name of the plugin.  For instance, "My Plugin".
+ServiceTypes: For KstDataSource this is "Kst Data Source" and for KstDataObjects this is "Kst Data Object" etc, etc...
+X-KDE-ModuleType: This should be set to "Plugin".
+X-KDE-Library: The library name.  This is not the filename, but a name
+               that is used to construct it.  For instance, it could
+               be "kstobject_myplugin" where the library might be named
+               "kstobject_myplugin.so".  This must also be a legal C
+               variable name as it is used to construct the function
+               names inside the library.
 
-Some other desktop properties are also common to all plugins:
+Some other .desktop properties are also common to all plugins:
 
-Name: The name of the plugin.
 Comment: The description of the plugin.
 
-To find out more about creating these plugins look in the respect file of the
-same name.
+To find out more about creating these plugins look in the respective file for
+the type of plugin you are interested in creating.
--- branches/work/kst/pluginify/kst/src/datasources/ascii/kstdata_ascii.desktop #586844:586845
@@ -3,7 +3,7 @@
 Type=Service
 ServiceTypes=Kst Data Source
 X-KDE-ModuleType=Plugin
-X-Kst-Plugin-Library=ascii
+X-KDE-Library=ascii
 X-Kst-Plugin-Author=The University of Toronto
 Name=ASCII File Reader
 Name[br]=Lenner ar restroù ASCII
--- branches/work/kst/pluginify/kst/src/datasources/cdf/kstdata_cdf.desktop #586844:586845
@@ -3,7 +3,7 @@
 Type=Service
 ServiceTypes=Kst Data Source
 X-KDE-ModuleType=Plugin
-X-Kst-Plugin-Library=cdf
+X-KDE-Library=cdf
 X-Kst-Plugin-Author=Nicolas Brisset
 Name=CDF File Reader
 Name[br]=Lenner ar restroù CDF
--- branches/work/kst/pluginify/kst/src/datasources/dirfile/kstdata_dirfile.desktop #586844:586845
@@ -3,7 +3,7 @@
 Type=Service
 ServiceTypes=Kst Data Source
 X-KDE-ModuleType=Plugin
-X-Kst-Plugin-Library=dirfile
+X-KDE-Library=dirfile
 X-Kst-Plugin-Author=The University of Toronto
 Name=DirFile Reader
 Name[bs]=DirFile čitač
--- branches/work/kst/pluginify/kst/src/datasources/fitsimage/kstdata_fitsimage.desktop #586844:586845
@@ -3,7 +3,7 @@
 Type=Service
 ServiceTypes=Kst Data Source
 X-KDE-ModuleType=Plugin
-X-Kst-Plugin-Library=fitsimage
+X-KDE-Library=fitsimage
 X-Kst-Plugin-Author=Barth Netterfield
 Name=fitsimage
 Name[el]=εικόναfits
--- branches/work/kst/pluginify/kst/src/datasources/frame/kstdata_frame.desktop #586844:586845
@@ -3,7 +3,7 @@
 Type=Service
 ServiceTypes=Kst Data Source
 X-KDE-ModuleType=Plugin
-X-Kst-Plugin-Library=frame
+X-KDE-Library=frame
 X-Kst-Plugin-Author=The University of Toronto
 Name=Frame Reader
 Name[bs]=Frame čitač
--- branches/work/kst/pluginify/kst/src/datasources/healpix/kstdata_healpix.desktop #586844:586845
@@ -3,7 +3,7 @@
 Type=Service
 ServiceTypes=Kst Data Source
 X-KDE-ModuleType=Plugin
-X-Kst-Plugin-Library=healpix
+X-KDE-Library=healpix
 X-Kst-Plugin-Author=Ted Kisner
 Name=Healpix File Reader
 Name[br]=Lenner ar restroù Healpix
--- branches/work/kst/pluginify/kst/src/datasources/indirect/kstdata_indirect.desktop #586844:586845
@@ -3,7 +3,7 @@
 Type=Service
 ServiceTypes=Kst Data Source
 X-KDE-ModuleType=Plugin
-X-Kst-Plugin-Library=indirect
+X-KDE-Library=indirect
 X-Kst-Plugin-Author=The University of Toronto
 Name=Indirect File Reader
 Name[bs]=Čitač Indirect datoteka
--- branches/work/kst/pluginify/kst/src/datasources/lfiio/kstdata_lfiio.desktop #586844:586845
@@ -3,7 +3,7 @@
 Type=Service
 ServiceTypes=Kst Data Source
 X-KDE-ModuleType=Plugin
-X-Kst-Plugin-Library=lfiio
+X-KDE-Library=lfiio
 X-Kst-Plugin-Author=The University of British Columbia
 Name=LFIIO Reader
 Name[br]=Lenner LFIIO
--- branches/work/kst/pluginify/kst/src/datasources/nad/kstdata_nad.desktop #586844:586845
@@ -3,7 +3,7 @@
 Type=Service
 ServiceTypes=Kst Data Source
 X-KDE-ModuleType=Plugin
-X-Kst-Plugin-Library=nad
+X-KDE-Library=nad
 X-Kst-Plugin-Author=Staikos Computing Services Inc.
 Name=NAD plugin
 Name[cs]=NAD modul
--- branches/work/kst/pluginify/kst/src/datasources/naddirect/kstdata_naddirect.desktop #586844:586845
@@ -3,7 +3,7 @@
 Type=Service
 ServiceTypes=Kst Data Source
 X-KDE-ModuleType=Plugin
-X-Kst-Plugin-Library=naddirect
+X-KDE-Library=naddirect
 X-Kst-Plugin-Author=Staikos Computing Services Inc.
 Name=Direct NAD plugin
 Name[cs]=Modul Direct NAD
--- branches/work/kst/pluginify/kst/src/datasources/netcdf/kstdata_netcdf.desktop #586844:586845
@@ -3,7 +3,7 @@
 Type=Service
 ServiceTypes=Kst Data Source
 X-KDE-ModuleType=Plugin
-X-Kst-Plugin-Library=netcdf
+X-KDE-Library=netcdf
 X-Kst-Plugin-Author=Nicolas Brisset
 Name=netCDF File Reader
 Name[br]=Lenner ar restroù netCDF
--- branches/work/kst/pluginify/kst/src/datasources/planck/kstdata_planck.desktop #586844:586845
@@ -3,7 +3,7 @@
 Type=Service
 ServiceTypes=Kst Data Source
 X-KDE-ModuleType=Plugin
-X-Kst-Plugin-Library=planck
+X-KDE-Library=planck
 X-Kst-Plugin-Author=The University of Toronto
 Name=PLANCK Plugin
 Name[br]=Lugent PLANCK
--- branches/work/kst/pluginify/kst/src/datasources/qimagesource/kstdata_qimagesource.desktop #586844:586845
@@ -3,7 +3,7 @@
 Type=Service
 ServiceTypes=Kst Data Source
 X-KDE-ModuleType=Plugin
-X-Kst-Plugin-Library=qimagesource
+X-KDE-Library=qimagesource
 X-Kst-Plugin-Author=The University of Toronto
 Name=qimagesource
 Name[el]=Πηγή qimage
--- branches/work/kst/pluginify/kst/src/datasources/template/kstdata_template.desktop #586844:586845
@@ -3,7 +3,7 @@
 Type=Service
 ServiceTypes=Kst Data Source
 X-KDE-ModuleType=Plugin
-X-Kst-Plugin-Library=ascii
+X-KDE-Library=ascii
 X-Kst-Plugin-Author=The University of Toronto
 Name=File Reader Template
 Name[br]=Patrom lenner ar restroù netCDF
--- branches/work/kst/pluginify/kst/src/kst/kstplugin.desktop #586844:586845
@@ -6,6 +6,6 @@
 [PropertyDef::X-Kst-Plugin-Author]
 Type=QString
 
-[PropertyDef::X-Kst-Plugin-Library]
+[PropertyDef::X-Kst-Plugin-Version]
 Type=QString
 
--- branches/work/kst/pluginify/kst/src/libkst/kstdataplugin.h #586844:586845
@@ -40,7 +40,7 @@
     public:
       Plugin(KService::Ptr svc) : KstShared(), service(svc), _lib(0L) {
         assert(service);
-        _plugLib = service->property("X-Kst-Plugin-Library").toString();
+        _plugLib = service->library();
         //kstdDebug() << "Create plugin " << (void*)this << " " << service->property("Name").toString() << endl;
       }
 
--- branches/work/kst/pluginify/kst/src/libkstapp/kstdatamanager_i.cpp #586844:586845
@@ -916,7 +916,7 @@
 
   bool ok = false;
   QStringList plugin =
-      KInputDialog::getItemList( i18n( "Plugins" ), i18n( "Create..." ), l, 0, false, &ok, this );
+      KInputDialog::getItemList( i18n( "Data Objects" ), i18n( "Create..." ), l, 0, false, &ok, this );
 
   if ( !ok || plugin.isEmpty() )
     return;
--- branches/work/kst/pluginify/kst/src/libkstmath/kstdataobject.cpp #586844:586845
@@ -104,10 +104,10 @@
       QStringList(), &err);
   if (object) {
     const QString name = service->property("Name").toString();
-    const QString author = service->property("Author").toString();
     const QString description = service->property("Comment").toString();
+    const QString author = service->property("X-Kst-Plugin-Author").toString();
     const QString version = service->property("X-Kst-Plugin-Version").toString();
-    const QString library = service->property("X-Kst-Plugin-Library").toString();
+    const QString library = service->library();
     Q_ASSERT( !name.isEmpty() );
     Q_ASSERT( !library.isEmpty() );
     object->setName(name);
--- branches/work/kst/pluginify/kst/src/plugins/crossspectrum/Makefile.am #586844:586845
@@ -1,11 +1,11 @@
 INCLUDES=-I$(top_srcdir)/kst -I$(top_srcdir)/kst/src/widgets -I$(top_srcdir)/kst/src/libkst -I$(top_srcdir)/kst/src/libkstapp  -I$(top_srcdir)/kst/src/libkstmath $(all_includes)
 
-kde_module_LTLIBRARIES=kst_crossspectrum.la
+kde_module_LTLIBRARIES=kstobject_crossspectrum.la
 
-kst_crossspectrum_la_LDFLAGS=$(all_libraries) -module -avoid-version
-kst_crossspectrum_la_SOURCES=crosspowerspectrum.cpp crossspectrumdialog_i.cpp crossspectrumdialogwidget.ui crossspectrum.cpp fftsg_h.c
+kstobject_crossspectrum_la_LDFLAGS=$(all_libraries) -module -avoid-version
+kstobject_crossspectrum_la_SOURCES=crosspowerspectrum.cpp crossspectrumdialog_i.cpp crossspectrumdialogwidget.ui crossspectrum.cpp fftsg_h.c
 
-services_DATA=kst_crossspectrum.desktop
+services_DATA=kstobject_crossspectrum.desktop
 servicesdir=$(kde_servicesdir)/kst
 
 METASOURCES=AUTO
--- branches/work/kst/pluginify/kst/src/plugins/crossspectrum/crosspowerspectrum.cpp #586844:586845
@@ -41,8 +41,8 @@
 static const QString& IMAGINARY = KGlobal::staticQString("Cross Spectrum: Imaginary");
 static const QString& FREQUENCY = KGlobal::staticQString("Frequency");
 
-K_EXPORT_COMPONENT_FACTORY( kst_crossspectrum,
-    KGenericFactory<CrossPowerSpectrum>( "kst_crossspectrum" ) )
+K_EXPORT_COMPONENT_FACTORY( kstobject_crossspectrum,
+    KGenericFactory<CrossPowerSpectrum>( "kstobject_crossspectrum" ) )
 
 CrossPowerSpectrum::CrossPowerSpectrum( QObject */*parent*/, const char */*name*/, const QStringList &/*args*/ )
     : KstDataObject() {
--- branches/work/kst/pluginify/kst/src/plugins/effective_bandwidth/kstobject_effbandwidth.desktop #586844:586845
@@ -4,7 +4,6 @@
 ServiceTypes=Kst Data Object
 X-KDE-ModuleType=Plugin
 X-KDE-Library=kstobject_effbandwidth
-X-Kst-Plugin-Library=kstobject_effbandwidth
 X-Kst-Plugin-Author=Duncan Hanson
 Name=Effective Bandwidth
 Comment=Calculates effective bandwidth from an amplitude spectrum.
--- branches/work/kst/pluginify/kst/src/plugins/linefit/Makefile.am #586844:586845
@@ -1,11 +1,11 @@
 INCLUDES=-I$(top_srcdir)/kst -I$(top_srcdir)/kst/src/widgets -I$(top_srcdir)/kst/src/libkst -I$(top_srcdir)/kst/src/libkstapp  -I$(top_srcdir)/kst/src/libkstmath $(all_includes)
 
-kde_module_LTLIBRARIES=kst_linefit.la
+kde_module_LTLIBRARIES=kstobject_linefit.la
 
-kst_linefit_la_LDFLAGS=$(all_libraries) -module -avoid-version
-kst_linefit_la_SOURCES=linefit.cpp
+kstobject_linefit_la_LDFLAGS=$(all_libraries) -module -avoid-version
+kstobject_linefit_la_SOURCES=linefit.cpp
 
-services_DATA=kst_linefit.desktop
+services_DATA=kstobject_linefit.desktop
 servicesdir=$(kde_servicesdir)/kst
 
 METASOURCES=AUTO
--- branches/work/kst/pluginify/kst/src/plugins/linefit/linefit.cpp #586844:586845
@@ -30,8 +30,8 @@
 static const QString& B = KGlobal::staticQString("b");
 static const QString& CHI2 = KGlobal::staticQString("chi^2");
 
-K_EXPORT_COMPONENT_FACTORY( kst_linefit,
-    KGenericFactory<LineFit>( "kst_linefit" ) )
+K_EXPORT_COMPONENT_FACTORY( kstobject_linefit,
+    KGenericFactory<LineFit>( "kstobject_linefit" ) )
 
 LineFit::LineFit( QObject */*parent*/, const char */*name*/, const QStringList &/*args*/ )
     : KstBasicPlugin() {
--- branches/work/kst/pluginify/kst/src/plugins/testplugin/kstobject_testplugin.desktop #586844:586845
@@ -4,7 +4,6 @@
 ServiceTypes=Kst Data Object
 X-KDE-ModuleType=Plugin
 X-KDE-Library=kstobject_testplugin
-X-Kst-Plugin-Library=kstobject_testplugin
 X-Kst-Plugin-Author=The University of Toronto
 Name=Test Plugin
 Comment=A test of new data object plugin system.


More information about the Kst mailing list