Changeset View
Changeset View
Standalone View
Standalone View
src/acbf/AcbfData.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 ACBFDATA_H | 22 | #ifndef ACBFDATA_H | ||
23 | #define ACBFDATA_H | 23 | #define ACBFDATA_H | ||
24 | 24 | | |||
25 | #include <memory> | ||||
26 | | ||||
25 | #include <QObject> | 27 | #include <QObject> | ||
26 | #include <QXmlStreamReader> | 28 | #include <QXmlStreamReader> | ||
27 | 29 | | |||
28 | #include "AcbfDocument.h" | 30 | #include "AcbfDocument.h" | ||
29 | #include "AcbfBinary.h" | 31 | #include "AcbfBinary.h" | ||
30 | 32 | | |||
31 | namespace AdvancedComicBookFormat | 33 | namespace AdvancedComicBookFormat | ||
32 | { | 34 | { | ||
33 | class ACBF_EXPORT Data : public QObject | 35 | class ACBF_EXPORT Data : public QObject | ||
34 | { | 36 | { | ||
35 | Q_OBJECT | 37 | Q_OBJECT | ||
36 | public: | 38 | public: | ||
37 | explicit Data(Document* parent = nullptr); | 39 | explicit Data(Document* parent = nullptr); | ||
38 | ~Data() override; | 40 | ~Data() override; | ||
39 | 41 | | |||
40 | void toXml(QXmlStreamWriter *writer); | 42 | void toXml(QXmlStreamWriter *writer); | ||
41 | bool fromXml(QXmlStreamReader *xmlReader); | 43 | bool fromXml(QXmlStreamReader *xmlReader); | ||
42 | 44 | | |||
43 | Binary* binary(QString id); | 45 | Binary* binary(const QString& id) const; | ||
44 | private: | 46 | private: | ||
45 | class Private; | 47 | class Private; | ||
46 | Private* d; | 48 | std::unique_ptr<Private> d; | ||
47 | }; | 49 | }; | ||
48 | } | 50 | } | ||
49 | 51 | | |||
50 | #endif // ACBFDATA_H | 52 | #endif // ACBFDATA_H |