File indexing completed on 2024-12-22 04:17:53

0001 /***************************************************************************
0002  *                                                                         *
0003  *   copyright : (C) 2007 The University of Toronto                        *
0004  *                   netterfield@astro.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 DATAOBJECTPLUGIN_H
0014 #define DATAOBJECTPLUGIN_H
0015 
0016 #include <QtPlugin>
0017 #include <QSettings>
0018 
0019 #include "sharedptr.h"
0020 #include "dataobject.h"
0021 #include "dataplugin.h"
0022 
0023 namespace Kst {
0024 
0025 class ObjectStore;
0026 
0027 class DataObjectPluginInterface : public PluginInterface {
0028   public:
0029     enum PluginTypeID { Generic, Fit, Filter };
0030 
0031     virtual ~DataObjectPluginInterface() {}
0032 
0033     virtual DataObject *create(ObjectStore *store, DataObjectConfigWidget *configWidget, bool setupInputsOutputs = true) const = 0;
0034 
0035     virtual DataObjectConfigWidget *configWidget(QSettings *settingsObject) const = 0;
0036 
0037     virtual PluginTypeID pluginType() const = 0;
0038 };
0039 
0040 
0041 class BasicPluginInterface : public DataObjectPluginInterface {
0042   public:
0043     virtual ~BasicPluginInterface() {}
0044 
0045     virtual QStringList inputVectorList() const = 0;
0046 
0047     virtual QStringList inputScalarList() const = 0;
0048 
0049     virtual QStringList inputStringList() const = 0;
0050 
0051     virtual QStringList outputVectorList() const = 0;
0052 
0053     virtual QStringList outputScalarList() const = 0;
0054 
0055     virtual QStringList outputStringList() const = 0;
0056 };
0057 
0058 
0059 typedef ObjectList<DataObjectPluginInterface> DataObjectPluginList;
0060 
0061 }
0062 
0063 Q_DECLARE_INTERFACE(Kst::DataObjectPluginInterface, "com.kst.DataObjectPluginInterface/2.0")
0064 Q_DECLARE_INTERFACE(Kst::BasicPluginInterface, "com.kst.BasicPluginInterface/2.0")
0065 
0066 #endif