LibEngsas
espreadsheethandler.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 ESPREADSHEETHANDLER_H
21 #define ESPREADSHEETHANDLER_H
22 
23 #include "eglobal.h"
24 #include "eobject.h"
25 
26 class ESpreadsheet;
27 class ESpreadsheetFile;
29 class ESettingsModelItem;
30 
31 #include <QMultiMap>
32 #include <QStringList>
33 
63 {
64  Q_OBJECT
65  public:
66  ESpreadsheetHandler(QObject *parent = NULL);
68 
72  static QList<ESpreadsheetProvider*> provider();
78  static ESettingsModelItem* settings();
82  QStringList filters() const;
86  bool handles(QString fileSuffix) const;
98  bool create(QString file);
99  bool create(QFile *file);
109  bool load(QString file);
110  bool load(QFile *file);
120  bool writeData();
132  void close();
133  ESpreadsheet* appendSpreadsheet(QString name);
134  EngSaS::Spreadsheets spreadsheets() const;
135 
136  private:
143  bool loadProvider(QString file);
144 
146  QMultiMap<QString, ESpreadsheetProvider* > mapFilterToProvider;
147 
148 };
149 
150 #endif // ESPREADSHEETHANDLER_H
151