Mercurial > clickerconvert
comparison src/xlsx/xlsxabstractooxmlfile.h @ 1:93d3106bb9a4
Add qt xlsx library
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Tue, 22 Mar 2016 10:38:08 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:49cd5cc0b072 | 1:93d3106bb9a4 |
---|---|
1 /**************************************************************************** | |
2 ** Copyright (c) 2013-2014 Debao Zhang <hello@debao.me> | |
3 ** All right reserved. | |
4 ** | |
5 ** Permission is hereby granted, free of charge, to any person obtaining | |
6 ** a copy of this software and associated documentation files (the | |
7 ** "Software"), to deal in the Software without restriction, including | |
8 ** without limitation the rights to use, copy, modify, merge, publish, | |
9 ** distribute, sublicense, and/or sell copies of the Software, and to | |
10 ** permit persons to whom the Software is furnished to do so, subject to | |
11 ** the following conditions: | |
12 ** | |
13 ** The above copyright notice and this permission notice shall be | |
14 ** included in all copies or substantial portions of the Software. | |
15 ** | |
16 ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
17 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
18 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
19 ** NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
20 ** LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
21 ** OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
22 ** WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
23 ** | |
24 ****************************************************************************/ | |
25 | |
26 #ifndef QXLSX_XLSXABSTRACTOOXMLFILE_H | |
27 #define QXLSX_XLSXABSTRACTOOXMLFILE_H | |
28 | |
29 #include "xlsxglobal.h" | |
30 | |
31 class QIODevice; | |
32 class QByteArray; | |
33 | |
34 QT_BEGIN_NAMESPACE_XLSX | |
35 class Relationships; | |
36 class AbstractOOXmlFilePrivate; | |
37 | |
38 class Q_XLSX_EXPORT AbstractOOXmlFile | |
39 { | |
40 Q_DECLARE_PRIVATE(AbstractOOXmlFile) | |
41 public: | |
42 enum CreateFlag | |
43 { | |
44 F_NewFromScratch, | |
45 F_LoadFromExists | |
46 }; | |
47 | |
48 virtual ~AbstractOOXmlFile(); | |
49 | |
50 virtual void saveToXmlFile(QIODevice *device) const = 0; | |
51 virtual bool loadFromXmlFile(QIODevice *device) = 0; | |
52 | |
53 virtual QByteArray saveToXmlData() const; | |
54 virtual bool loadFromXmlData(const QByteArray &data); | |
55 | |
56 Relationships *relationships() const; | |
57 | |
58 void setFilePath(const QString path); | |
59 QString filePath() const; | |
60 | |
61 protected: | |
62 AbstractOOXmlFile(CreateFlag flag); | |
63 AbstractOOXmlFile(AbstractOOXmlFilePrivate *d); | |
64 | |
65 AbstractOOXmlFilePrivate *d_ptr; | |
66 }; | |
67 | |
68 QT_END_NAMESPACE_XLSX | |
69 | |
70 #endif // QXLSX_XLSXABSTRACTOOXMLFILE_H |