File indexing completed on 2024-12-29 04:11:44

0001 /***************************************************************************
0002  *                                                                         *
0003  *   Copyright : (C) 2003 The University of Toronto                        *
0004  *   email     : 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 ASCII_PLUGIN_H
0014 #define ASCII_PLUGIN_H
0015 
0016 #include "asciisource.h"
0017 #include "dataplugin.h"
0018 
0019 
0020 class AsciiPlugin : public QObject, public Kst::DataSourcePluginInterface
0021 {
0022     Q_OBJECT
0023     Q_INTERFACES(Kst::DataSourcePluginInterface)
0024     Q_PLUGIN_METADATA(IID "com.kst.DataSourcePluginInterface/2.0")
0025 
0026   public:
0027     virtual ~AsciiPlugin() {}
0028 
0029     virtual QString pluginName() const;
0030     virtual QString pluginDescription() const;
0031 
0032     virtual bool hasConfigWidget() const { return true; }
0033 
0034     virtual Kst::DataSource *create(Kst::ObjectStore *store,
0035                                   QSettings *cfg,
0036                                   const QString &filename,
0037                                   const QString &type,
0038                                   const QDomElement &element) const;
0039 
0040     virtual QStringList matrixList(QSettings *cfg,
0041                                   const QString& filename,
0042                                   const QString& type,
0043                                   QString *typeSuggestion,
0044                                   bool *complete) const;
0045 
0046     virtual QStringList fieldList(QSettings *cfg,
0047                                   const QString& filename,
0048                                   const QString& type,
0049                                   QString *typeSuggestion,
0050                                   bool *complete) const;
0051 
0052     virtual QStringList scalarList(QSettings *cfg,
0053                                   const QString& filename,
0054                                   const QString& type,
0055                                   QString *typeSuggestion,
0056                                   bool *complete) const;
0057 
0058     virtual QStringList stringList(QSettings *cfg,
0059                                   const QString& filename,
0060                                   const QString& type,
0061                                   QString *typeSuggestion,
0062                                   bool *complete) const;
0063 
0064     virtual int understands(QSettings *cfg, const QString& filename) const;
0065 
0066     virtual bool supportsTime(QSettings *cfg, const QString& filename) const;
0067 
0068     virtual QStringList provides() const;
0069 
0070     virtual Kst::DataSourceConfigWidget *configWidget(QSettings *cfg, const QString& filename) const;
0071 };
0072 
0073 
0074 #endif
0075 // vim: ts=2 sw=2 et