comparison src/xlsx/xlsxformat_p.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 #ifndef XLSXFORMAT_P_H
26 #define XLSXFORMAT_P_H
27
28 //
29 // W A R N I N G
30 // -------------
31 //
32 // This file is not part of the Qt Xlsx API. It exists for the convenience
33 // of the Qt Xlsx. This header file may change from
34 // version to version without notice, or even be removed.
35 //
36 // We mean it.
37 //
38
39 #include "xlsxformat.h"
40 #include <QSharedData>
41 #include <QMap>
42 #include <QSet>
43
44 namespace QXlsx {
45
46 class FormatPrivate : public QSharedData
47 {
48 public:
49 enum FormatType
50 {
51 FT_Invalid = 0,
52 FT_NumFmt = 0x01,
53 FT_Font = 0x02,
54 FT_Alignment = 0x04,
55 FT_Border = 0x08,
56 FT_Fill = 0x10,
57 FT_Protection = 0x20
58 };
59
60 enum Property {
61 P_STARTID,
62
63 //numFmt
64 P_NumFmt_Id,
65 P_NumFmt_FormatCode,
66
67 //font
68 P_Font_STARTID,
69 P_Font_Size = P_Font_STARTID,
70 P_Font_Italic,
71 P_Font_StrikeOut,
72 P_Font_Color,
73 P_Font_Bold,
74 P_Font_Script,
75 P_Font_Underline,
76 P_Font_Outline,
77 P_Font_Shadow,
78 P_Font_Name,
79 P_Font_Family,
80 P_Font_Charset,
81 P_Font_Scheme,
82 P_Font_Condense,
83 P_Font_Extend,
84 P_Font_ENDID,
85
86 //border
87 P_Border_STARTID,
88 P_Border_LeftStyle = P_Border_STARTID,
89 P_Border_RightStyle,
90 P_Border_TopStyle,
91 P_Border_BottomStyle,
92 P_Border_DiagonalStyle,
93 P_Border_LeftColor,
94 P_Border_RightColor,
95 P_Border_TopColor,
96 P_Border_BottomColor,
97 P_Border_DiagonalColor,
98 P_Border_DiagonalType,
99 P_Border_ENDID,
100
101 //fill
102 P_Fill_STARTID,
103 P_Fill_Pattern = P_Fill_STARTID,
104 P_Fill_BgColor,
105 P_Fill_FgColor,
106 P_Fill_ENDID,
107
108 //alignment
109 P_Alignment_STARTID,
110 P_Alignment_AlignH = P_Alignment_STARTID,
111 P_Alignment_AlignV,
112 P_Alignment_Wrap,
113 P_Alignment_Rotation,
114 P_Alignment_Indent,
115 P_Alignment_ShinkToFit,
116 P_Alignment_ENDID,
117
118 //protection
119 P_Protection_Locked,
120 P_Protection_Hidden,
121
122 P_ENDID
123 };
124
125 FormatPrivate();
126 FormatPrivate(const FormatPrivate &other);
127 ~FormatPrivate();
128
129 bool dirty; //The key re-generation is need.
130 QByteArray formatKey;
131
132 bool font_dirty;
133 bool font_index_valid;
134 QByteArray font_key;
135 int font_index;
136
137 bool fill_dirty;
138 bool fill_index_valid;
139 QByteArray fill_key;
140 int fill_index;
141
142 bool border_dirty;
143 bool border_index_valid;
144 QByteArray border_key;
145 int border_index;
146
147 int xf_index;
148 bool xf_indexValid;
149
150 bool is_dxf_fomat;
151 int dxf_index;
152 bool dxf_indexValid;
153
154 int theme;
155
156 QMap<int, QVariant> properties;
157 };
158
159 }
160
161 #endif // XLSXFORMAT_P_H
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)