LibEngsas
espreadsheetprovider.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2013 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Lesser General Public License for more details.
13 
14  You should have received a copy of the GNU Lesser General Public
15  License along with this library; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17  MA 02110-1301 USA.
18 */
19 
20 #ifndef ESPREADSHEETPROVIDER_H
21 #define ESPREADSHEETPROVIDER_H
22 
23 #include "eglobal.h"
24 #include "eobject.h"
25 
26 class ESettingsWidget;
27 
28 class QFile;
29 
39 {
40  public:
41  virtual ~ESpreadsheetProvider() {}
42 
43  virtual QString name() const = 0;
44  virtual QString providerId() const = 0;
45  virtual ESettingsWidget* settingsWidget() const = 0;
46 
47  virtual QStringList filters() const = 0;
53  virtual bool sheetsSupported() const = 0;
54  virtual bool create(QFile *file) = 0;
55  virtual bool load(QFile *file) = 0;
56  virtual bool writeData() = 0;
60  virtual void close() = 0;
61  virtual ESpreadsheet* appendSpreadsheet(QString name) = 0;
62  virtual EngSaS::Spreadsheets spreadsheets() = 0;
63 };
64 
65 #if QT_VERSION >= 0x050000
66 #define LibEngsasESpreadsheetProviderIID "de.engsas.libengsas.ESpreadhsheetProvider"
67 Q_DECLARE_INTERFACE(ESpreadsheetProvider, LibEngsasESpreadsheetProviderIID)
68 #else
69 Q_DECLARE_INTERFACE ( ESpreadsheetProvider, "LibEngsas.ESpreadsheetProvider/0.1.0" );
70 #endif
71 
72 #endif // ESPREADSHEETPROVIDER_H