File indexing completed on 2025-01-05 04:12:54
0001 /*************************************************************************** 0002 * * 0003 * copyright : (C) 2010 The University of Toronto * 0004 * sbenton@physics.utoronto.ca * 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 LOCKINPLUGIN_H 0014 #define LOCKINPLUGIN_H 0015 0016 #include <QFile> 0017 0018 #include <basicplugin.h> 0019 #include <dataobjectplugin.h> 0020 0021 class LockInSource : public Kst::BasicPlugin { 0022 Q_OBJECT 0023 0024 public: 0025 virtual QString _automaticDescriptiveName() const; 0026 0027 Kst::VectorPtr inputVector() const; 0028 Kst::VectorPtr refVector() const; 0029 0030 virtual void change(Kst::DataObjectConfigWidget *configWidget); 0031 0032 void setupOutputs(); 0033 virtual bool algorithm(); 0034 0035 virtual QStringList inputVectorList() const; 0036 virtual QStringList inputScalarList() const; 0037 virtual QStringList inputStringList() const; 0038 virtual QStringList outputVectorList() const; 0039 virtual QStringList outputScalarList() const; 0040 virtual QStringList outputStringList() const; 0041 0042 virtual void saveProperties(QXmlStreamWriter &s); 0043 0044 protected: 0045 LockInSource(Kst::ObjectStore *store); 0046 ~LockInSource(); 0047 0048 friend class Kst::ObjectStore; 0049 0050 0051 }; 0052 0053 0054 class LockInPlugin : public QObject, public Kst::DataObjectPluginInterface { 0055 Q_OBJECT 0056 Q_INTERFACES(Kst::DataObjectPluginInterface) 0057 Q_PLUGIN_METADATA(IID "com.kst.DataObjectPluginInterface/2.0") 0058 public: 0059 virtual ~LockInPlugin() {} 0060 0061 virtual QString pluginName() const; 0062 virtual QString pluginDescription() const; 0063 0064 virtual DataObjectPluginInterface::PluginTypeID pluginType() const { return Generic; } 0065 0066 virtual bool hasConfigWidget() const { return true; } 0067 0068 virtual Kst::DataObject *create(Kst::ObjectStore *store, Kst::DataObjectConfigWidget *configWidget, bool setupInputsOutputs = true) const; 0069 0070 virtual Kst::DataObjectConfigWidget *configWidget(QSettings *settingsObject) const; 0071 }; 0072 0073 #endif 0074 // vim: ts=2 sw=2 et