Changeset View
Changeset View
Standalone View
Standalone View
src/acbf/AcbfDocument.h
Show All 16 Lines | |||||
17 | * You should have received a copy of the GNU Lesser General Public | 17 | * You should have received a copy of the GNU Lesser General Public | ||
18 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | 18 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
19 | * | 19 | * | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #ifndef ACBFDOCUMENT_H | 22 | #ifndef ACBFDOCUMENT_H | ||
23 | #define ACBFDOCUMENT_H | 23 | #define ACBFDOCUMENT_H | ||
24 | 24 | | |||
25 | #include <memory> | ||||
26 | | ||||
25 | #include <QObject> | 27 | #include <QObject> | ||
26 | #include "acbf_export.h" | 28 | #include "acbf_export.h" | ||
27 | 29 | | |||
28 | namespace AdvancedComicBookFormat | 30 | namespace AdvancedComicBookFormat | ||
29 | { | 31 | { | ||
30 | class Metadata; | 32 | class Metadata; | ||
31 | class Body; | 33 | class Body; | ||
32 | // class References; | 34 | // class References; | ||
33 | class Data; | 35 | class Data; | ||
34 | // class Stylesheet; | 36 | // class Stylesheet; | ||
35 | class ACBF_EXPORT Document : public QObject | 37 | class ACBF_EXPORT Document : public QObject | ||
36 | { | 38 | { | ||
37 | Q_OBJECT | 39 | Q_OBJECT | ||
38 | Q_PROPERTY(Metadata* metaData READ metaData NOTIFY metaDataChanged) | 40 | Q_PROPERTY(Metadata* metaData READ metaData NOTIFY metaDataChanged) | ||
39 | public: | 41 | public: | ||
40 | explicit Document(QObject* parent = nullptr); | 42 | explicit Document(QObject* parent = nullptr); | ||
41 | ~Document() override; | 43 | ~Document() override; | ||
42 | 44 | | |||
43 | QString toXml(); | 45 | QString toXml(); | ||
44 | bool fromXml(QString xmlDocument); | 46 | bool fromXml(QString xmlDocument); | ||
45 | 47 | | |||
46 | Metadata* metaData(); | 48 | Metadata* metaData() const; | ||
47 | Q_SIGNAL void metaDataChanged(); | 49 | Q_SIGNAL void metaDataChanged(); | ||
48 | 50 | | |||
49 | Body* body(); | 51 | Body* body() const; | ||
50 | // References* references(); | 52 | // References* references(); | ||
51 | Data* data(); | 53 | Data* data() const; | ||
52 | // Stylesheet* stylesheet(); | 54 | // Stylesheet* stylesheet(); | ||
53 | private: | 55 | private: | ||
54 | class Private; | 56 | class Private; | ||
55 | Private* d; | 57 | std::unique_ptr<Private> d; | ||
56 | }; | 58 | }; | ||
57 | } | 59 | } | ||
58 | 60 | | |||
59 | #endif//ACBFDOCUMENT_H | 61 | #endif//ACBFDOCUMENT_H |