Changeset View
Changeset View
Standalone View
Standalone View
src/acbf/AcbfDocument.h
Context not available. | |||||
26 | 26 | | |||
---|---|---|---|---|---|
27 | #include <QObject> | 27 | #include <QObject> | ||
28 | #include "acbf_export.h" | 28 | #include "acbf_export.h" | ||
29 | 29 | /** | |||
30 | * \brief Class that handles all of the ACBF document. | ||||
31 | * | ||||
32 | * ACBF documents are made up of several subsections: | ||||
33 | * | ||||
34 | * - Metadata, which in turn holds book, publishing and document info. | ||||
35 | * - Body, which holds the pages and their frame and text definitions. | ||||
36 | * - Data, which holds embedded data like images and fonts. | ||||
37 | * - References, a section which holds notes and references that can be pointed | ||||
38 | * at from the text. Not supported currently. | ||||
39 | * - Stylesheet, which is a css stylesheet to inform how overlaid translations | ||||
40 | * should be rendered. Not supported currently. | ||||
41 | * | ||||
42 | * Of these, only Body and Metadata are necessary for a proper ACBF file. | ||||
43 | * | ||||
44 | * TODO: Support references and stylesheets. | ||||
45 | */ | ||||
30 | namespace AdvancedComicBookFormat | 46 | namespace AdvancedComicBookFormat | ||
31 | { | 47 | { | ||
32 | class Metadata; | 48 | class Metadata; | ||
Context not available. | |||||
42 | explicit Document(QObject* parent = nullptr); | 58 | explicit Document(QObject* parent = nullptr); | ||
43 | ~Document() override; | 59 | ~Document() override; | ||
44 | 60 | | |||
61 | /** | ||||
62 | * \brief write the whole document to an ACBF xml. | ||||
63 | */ | ||||
45 | QString toXml(); | 64 | QString toXml(); | ||
65 | /** | ||||
66 | * \brief load an ACBF file from XML. | ||||
67 | * @return True if the xmlReader encountered no errors. | ||||
68 | */ | ||||
46 | bool fromXml(QString xmlDocument); | 69 | bool fromXml(QString xmlDocument); | ||
47 | 70 | | |||
71 | /** | ||||
72 | * @returns The metadata object. | ||||
73 | */ | ||||
48 | Metadata* metaData() const; | 74 | Metadata* metaData() const; | ||
75 | /** | ||||
76 | * \brief triggers when the metadata is changed. | ||||
77 | */ | ||||
49 | Q_SIGNAL void metaDataChanged(); | 78 | Q_SIGNAL void metaDataChanged(); | ||
50 | 79 | | |||
80 | /** | ||||
81 | * @returns the Body object. | ||||
82 | */ | ||||
51 | Body* body() const; | 83 | Body* body() const; | ||
52 | // References* references(); | 84 | // References* references(); | ||
85 | /** | ||||
86 | * @returns the Data object. | ||||
87 | */ | ||||
53 | Data* data() const; | 88 | Data* data() const; | ||
54 | // Stylesheet* stylesheet(); | 89 | // Stylesheet* stylesheet(); | ||
55 | private: | 90 | private: | ||
Context not available. |