QtiPlot  0.9.8.2
ImportExportPlugin.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : ImportExportPlugin.h
3  Project : QtiPlot
4  --------------------------------------------------------------------
5  Copyright : (C) 2011 by Ion Vasilief
6  Email (use @ for *) : ion_vasilief*yahoo.fr
7  Description : Base class for import/export plugins
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  * This program is distributed in the hope that it will be useful, *
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21  * GNU General Public License for more details. *
22  * *
23  * You should have received a copy of the GNU General Public License *
24  * along with this program; if not, write to the Free Software *
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26  * Boston, MA 02110-1301 USA *
27  * *
28  ***************************************************************************/
29 #ifndef INTERFACES_H
30 #define INTERFACES_H
31 
32 #include <QtPlugin>
33 #include <ApplicationWindow.h>
34 
35 class QStringList;
36 
38 {
39 public:
40  virtual ~ImportExportPlugin(){}
41 
42  virtual QStringList importFormats(){return QStringList();};
43  virtual Table* import(const QString & /*fileName*/, int /*sheet*/ = -1){return 0;}
44 
45  virtual QStringList exportFormats() const {return QStringList();};
46  virtual bool exportTable(Table *, const QString& /*fname*/, bool /*withLabels*/, bool /*exportComments*/, bool /*exportSelection*/){return false;}
47  virtual bool exportMatrix(Matrix *, const QString& /*fname*/, bool /*exportSelection*/){return false;}
48  virtual bool exportGraph(Graph *, const QString& /*fname*/, const QSizeF& /*customSize*/, int /*unit*/, double /*fontsFactor*/ = 1){return false;}
49  virtual bool exportMultiLayerPlot(MultiLayer *, const QString& /*fname*/, const QSizeF& /*customSize*/, int /*unit*/, double /*fontsFactor*/ = 1){return false;}
50 
53 
54 private:
56 };
57 
58 Q_DECLARE_INTERFACE(ImportExportPlugin, "com.ProIndependent.QtiPlot.ImportExportPlugin/1.0")
59 #endif
An MDI window (MdiSubWindow) managing one or more Graph objects.
Definition: MultiLayer.h:64
virtual bool exportTable(Table *, const QString &, bool, bool, bool)
Definition: ImportExportPlugin.h:46
ApplicationWindow * applicationWindow()
Definition: ImportExportPlugin.h:52
A 2D-plotting widget.
Definition: Graph.h:123
virtual bool exportMultiLayerPlot(MultiLayer *, const QString &, const QSizeF &, int, double=1)
Definition: ImportExportPlugin.h:49
QtiPlot's main window.
Definition: ApplicationWindow.h:133
virtual QStringList exportFormats() const
Definition: ImportExportPlugin.h:45
ApplicationWindow * d_app
Definition: ImportExportPlugin.h:52
Matrix worksheet class.
Definition: Matrix.h:57
virtual bool exportMatrix(Matrix *, const QString &, bool)
Definition: ImportExportPlugin.h:47
virtual bool exportGraph(Graph *, const QString &, const QSizeF &, int, double=1)
Definition: ImportExportPlugin.h:48
void setApplicationWindow(ApplicationWindow *app)
Definition: ImportExportPlugin.h:51
Definition: ImportExportPlugin.h:37
virtual QStringList importFormats()
Definition: ImportExportPlugin.h:42
virtual ~ImportExportPlugin()
Definition: ImportExportPlugin.h:40
MDI window providing a spreadsheet table with column logic.
Definition: Table.h:57