File indexing completed on 2024-12-22 04:18:15
0001 /*************************************************************************** 0002 * * 0003 * copyright : (C) 2007 The University of Toronto * 0004 * netterfield@astro.utoronto.ca * 0005 * copyright : (C) 2005 University of British Columbia * 0006 * dscott@phas.ubc.ca * 0007 * * 0008 * This program is free software; you can redistribute it and/or modify * 0009 * it under the terms of the GNU General Public License as published by * 0010 * the Free Software Foundation; either version 2 of the License, or * 0011 * (at your option) any later version. * 0012 * * 0013 ***************************************************************************/ 0014 0015 #ifndef FITSINUSOIDUNWEIGHTEDPLUGIN_H 0016 #define FITSINUSOIDUNWEIGHTEDPLUGIN_H 0017 0018 #include <QFile> 0019 0020 #include <basicplugin.h> 0021 #include <dataobjectplugin.h> 0022 0023 class FitSinusoidUnweightedSource : public Kst::BasicPlugin { 0024 Q_OBJECT 0025 0026 public: 0027 virtual QString _automaticDescriptiveName() const; 0028 0029 Kst::VectorPtr vectorX() const; 0030 Kst::VectorPtr vectorY() const; 0031 Kst::ScalarPtr scalarHarmonics() const; 0032 Kst::ScalarPtr scalarPeriod() const; 0033 0034 virtual void change(Kst::DataObjectConfigWidget *configWidget); 0035 0036 void setupOutputs(); 0037 virtual bool algorithm(); 0038 0039 virtual QStringList inputVectorList() const; 0040 virtual QStringList inputScalarList() const; 0041 virtual QStringList inputStringList() const; 0042 virtual QStringList outputVectorList() const; 0043 virtual QStringList outputScalarList() const; 0044 virtual QStringList outputStringList() const; 0045 0046 virtual void saveProperties(QXmlStreamWriter &s); 0047 0048 protected: 0049 FitSinusoidUnweightedSource(Kst::ObjectStore *store); 0050 ~FitSinusoidUnweightedSource(); 0051 0052 virtual QString parameterName(int index) const; 0053 0054 friend class Kst::ObjectStore; 0055 0056 0057 }; 0058 0059 0060 class FitSinusoidUnweightedPlugin : public QObject, public Kst::DataObjectPluginInterface { 0061 Q_OBJECT 0062 Q_INTERFACES(Kst::DataObjectPluginInterface) 0063 Q_PLUGIN_METADATA(IID "com.kst.DataObjectPluginInterface/2.0") 0064 public: 0065 virtual ~FitSinusoidUnweightedPlugin() {} 0066 0067 virtual QString pluginName() const; 0068 virtual QString pluginDescription() const; 0069 0070 virtual DataObjectPluginInterface::PluginTypeID pluginType() const { return Fit; } 0071 0072 virtual bool hasConfigWidget() const { return true; } 0073 0074 virtual Kst::DataObject *create(Kst::ObjectStore *store, Kst::DataObjectConfigWidget *configWidget, bool setupInputsOutputs = true) const; 0075 0076 virtual Kst::DataObjectConfigWidget *configWidget(QSettings *settingsObject) const; 0077 }; 0078 0079 #endif 0080 // vim: ts=2 sw=2 et