FB2Style.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* libe-book
3  * Version: MPL 2.0 / LGPLv2.1+
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * Alternatively, the contents of this file may be used under the terms
10  * of the GNU Lesser General Public License Version 2.1 or later
11  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
12  * applicable instead of those above.
13  *
14  * For further information visit http://libebook.sourceforge.net
15  */
16 
17 #ifndef FB2STYLE_H_INCLUDED
18 #define FB2STYLE_H_INCLUDED
19 
20 #include "libebook_utils.h"
21 
22 class WPXPropertyList;
23 
24 namespace libebook
25 {
26 
28 {
29  FB2TextFormat();
30 
31  uint8_t a;
32  uint8_t code;
33  uint8_t emphasis;
34  uint8_t strikethrough;
35  uint8_t strong;
36  uint8_t sub;
37  uint8_t sup;
38 };
39 
41 {
43 
44  uint8_t annotation;
45  uint8_t cite;
46  uint8_t epigraph;
47  bool headerRow;
48  bool p;
49  uint8_t poem;
50  bool stanza;
51  bool subtitle;
52  bool table;
53  bool textAuthor;
54  bool title;
55  bool v;
56 };
57 
58 class FB2Style
59 {
60 public:
61  explicit FB2Style(const FB2BlockFormat &blockFormat);
62 
64  const FB2TextFormat &getTextFormat() const;
65  const FB2BlockFormat &getBlockFormat() const;
66 
67 private:
70 };
71 
72 WPXPropertyList makePropertyList(const FB2Style &style);
73 WPXPropertyList makePropertyList(const FB2TextFormat &format, const FB2BlockFormat &blockFormat);
74 WPXPropertyList makePropertyList(const FB2BlockFormat &format);
75 
76 }
77 
78 #endif // FB2STYLE_H_INCLUDED
79 
80 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
FB2BlockFormat()
Definition: FB2Style.cpp:35
bool headerRow
Definition: FB2Style.h:47
optional< Style > style
Definition: TDParser.cpp:114
uint8_t epigraph
Definition: FB2Style.h:46
uint8_t sub
Definition: FB2Style.h:36
bool p
Definition: FB2Style.h:48
FB2TextFormat & getTextFormat()
Definition: FB2Style.cpp:57
uint8_t cite
Definition: FB2Style.h:45
uint8_t sup
Definition: FB2Style.h:37
WPXPropertyList makePropertyList(const FB2Style &style)
Definition: FB2Style.cpp:72
uint8_t emphasis
Definition: FB2Style.h:33
bool stanza
Definition: FB2Style.h:50
FB2TextFormat m_textFormat
Definition: FB2Style.h:68
bool v
Definition: FB2Style.h:55
Definition: FB2Style.h:58
const FB2BlockFormat & getBlockFormat() const
Definition: FB2Style.cpp:67
uint8_t strong
Definition: FB2Style.h:35
uint8_t annotation
Definition: FB2Style.h:44
bool subtitle
Definition: FB2Style.h:51
uint8_t code
Definition: FB2Style.h:32
Definition: FB2Style.h:27
bool table
Definition: FB2Style.h:52
uint8_t strikethrough
Definition: FB2Style.h:34
bool title
Definition: FB2Style.h:54
uint8_t poem
Definition: FB2Style.h:49
FB2Style(const FB2BlockFormat &blockFormat)
Definition: FB2Style.cpp:51
uint8_t a
Definition: FB2Style.h:31
const FB2BlockFormat m_blockFormat
Definition: FB2Style.h:69
bool textAuthor
Definition: FB2Style.h:53
Definition: FB2Style.h:40
FB2TextFormat()
Definition: FB2Style.cpp:24

Generated for libe-book by doxygen 1.8.5