1 /***************************************************************************
2  *                                                                         *
3  *   copyright : (C) 2007 The University of Toronto                        *
4  *                   netterfield@astro.utoronto.ca                         *
5  *   copyright : (C) 2005  University of British Columbia                  *
6  *                   dscott@phas.ubc.ca                                    *
7  *                                                                         *
8  *   This program is free software; you can redistribute it and/or modify  *
9  *   it under the terms of the GNU General Public License as published by  *
10  *   the Free Software Foundation; either version 2 of the License, or     *
11  *   (at your option) any later version.                                   *
12  *                                                                         *
13  ***************************************************************************/
14 
15 #ifndef FITSINUSOIDUNWEIGHTEDPLUGIN_H
16 #define FITSINUSOIDUNWEIGHTEDPLUGIN_H
17 
18 #include <QFile>
19 
20 #include <basicplugin.h>
21 #include <dataobjectplugin.h>
22 
23 class FitSinusoidUnweightedSource : public Kst::BasicPlugin {
24   Q_OBJECT
25 
26   public:
27     virtual QString _automaticDescriptiveName() const;
28 
29     Kst::VectorPtr vectorX() const;
30     Kst::VectorPtr vectorY() const;
31     Kst::ScalarPtr scalarHarmonics() const;
32     Kst::ScalarPtr scalarPeriod() const;
33 
34     virtual void change(Kst::DataObjectConfigWidget *configWidget);
35 
36     void setupOutputs();
37     virtual bool algorithm();
38 
39     virtual QStringList inputVectorList() const;
40     virtual QStringList inputScalarList() const;
41     virtual QStringList inputStringList() const;
42     virtual QStringList outputVectorList() const;
43     virtual QStringList outputScalarList() const;
44     virtual QStringList outputStringList() const;
45 
46     virtual void saveProperties(QXmlStreamWriter &s);
47 
48   protected:
49     FitSinusoidUnweightedSource(Kst::ObjectStore *store);
50     ~FitSinusoidUnweightedSource();
51 
52     virtual QString parameterName(int index) const;
53 
54   friend class Kst::ObjectStore;
55 
56 
57 };
58 
59 
60 class FitSinusoidUnweightedPlugin : public QObject, public Kst::DataObjectPluginInterface {
61     Q_OBJECT
Q_INTERFACES(Kst::DataObjectPluginInterface)62     Q_INTERFACES(Kst::DataObjectPluginInterface)
63     Q_PLUGIN_METADATA(IID "com.kst.DataObjectPluginInterface/2.0")
64   public:
65     virtual ~FitSinusoidUnweightedPlugin() {}
66 
67     virtual QString pluginName() const;
68     virtual QString pluginDescription() const;
69 
pluginType()70     virtual DataObjectPluginInterface::PluginTypeID pluginType() const { return Fit; }
71 
hasConfigWidget()72     virtual bool hasConfigWidget() const { return true; }
73 
74     virtual Kst::DataObject *create(Kst::ObjectStore *store, Kst::DataObjectConfigWidget *configWidget, bool setupInputsOutputs = true) const;
75 
76     virtual Kst::DataObjectConfigWidget *configWidget(QSettings *settingsObject) const;
77 };
78 
79 #endif
80 // vim: ts=2 sw=2 et
81