File indexing completed on 2024-12-22 04:18:00

0001 /***************************************************************************
0002  *                                                                         *
0003  *   copyright : (C) 2013 The Kst Team                                     *
0004  *                   kst@kde.org                                           *
0005  *                                                                         *
0006  *   This program is free software; you can redistribute it and/or modify  *
0007  *   it under the terms of the GNU General Public License as published by  *
0008  *   the Free Software Foundation; either version 2 of the License, or     *
0009  *   (at your option) any later version.                                   *
0010  *                                                                         *
0011  ***************************************************************************/
0012 
0013 #ifndef ACTIVITYLEVELPLUGIN_H
0014 #define ACTIVITYLEVELPLUGIN_H
0015 
0016 #include <QFile>
0017 
0018 #include <basicplugin.h>
0019 #include <dataobjectplugin.h>
0020 
0021 class ActivityLevelSource : public Kst::BasicPlugin {
0022   Q_OBJECT
0023 
0024   public:
0025   virtual QString _automaticDescriptiveName() const;
0026   virtual QString descriptionTip() const;
0027 
0028     Kst::VectorPtr vector() const;
0029     Kst::ScalarPtr samplingTime() const;
0030     Kst::ScalarPtr windowWidth() const;
0031     Kst::ScalarPtr noiseThreshold() const;
0032 
0033     virtual void change(Kst::DataObjectConfigWidget *configWidget);
0034 
0035     void setupOutputs();
0036     virtual bool algorithm();
0037 
0038     virtual QStringList inputVectorList() const;
0039     virtual QStringList inputScalarList() const;
0040     virtual QStringList inputStringList() const;
0041     virtual QStringList outputVectorList() const;
0042     virtual QStringList outputScalarList() const;
0043     virtual QStringList outputStringList() const;
0044 
0045     virtual void saveProperties(QXmlStreamWriter &s);
0046 
0047   protected:
0048     ActivityLevelSource(Kst::ObjectStore *store);
0049     ~ActivityLevelSource();
0050 
0051   friend class Kst::ObjectStore;
0052 
0053 
0054 };
0055 
0056 
0057 class ActivityLevelPlugin : public QObject, public Kst::DataObjectPluginInterface {
0058     Q_OBJECT
0059     Q_INTERFACES(Kst::DataObjectPluginInterface)
0060     Q_PLUGIN_METADATA(IID "com.kst.DataObjectPluginInterface/2.0")
0061   public:
0062     virtual ~ActivityLevelPlugin() {}
0063 
0064     virtual QString pluginName() const;
0065     virtual QString pluginDescription() const;
0066 
0067     virtual DataObjectPluginInterface::PluginTypeID pluginType() const { return Generic; }
0068 
0069     virtual bool hasConfigWidget() const { return true; }
0070 
0071     virtual Kst::DataObject *create(Kst::ObjectStore *store, Kst::DataObjectConfigWidget *configWidget, bool setupInputsOutputs = true) const;
0072 
0073     virtual Kst::DataObjectConfigWidget *configWidget(QSettings *settingsObject) const;
0074 };
0075 
0076 #endif
0077 // vim: ts=2 sw=2 et