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 
Mostly the same as EWidget but for QObject as base class.
Definition: eobject.h:42
QList< ESpreadsheet * > Spreadsheets
A type to replace QList with a shorter name.
Definition: eglobal.h:172
A spreadsheet, within a spreadsheet file.A spreadsheet consists of cells of type ESpreadsheetCell, which are ordered in rows and columns. An object of this type can be used to manipulate the hold data (see e. g. setData(ESpreadsheetCell)). To retrieve the cell content use data(int, int).
Definition: espreadsheet.h:58
An item in the ESettingsModel, which represents one Settingspage.
Definition: esettingsmodelitem.h:35
ESpreadsheetProvider * currentProvider
Definition: espreadsheethandler.h:145
#define E_CORE_EXPORT
Definition: eglobal.h:107
QMultiMap< QString, ESpreadsheetProvider * > mapFilterToProvider
Definition: espreadsheethandler.h:146
Class to read and write files containing spreadsheet.Use this class to read and write to spreadsheet ...
Definition: espreadsheethandler.h:62
Interface to implement spreadsheet providers (e. g. to create excel files or ods, ...
Definition: espreadsheetprovider.h:38