Changeset View
Changeset View
Standalone View
Standalone View
src/acbf/AcbfContentrating.h
Context not available. | |||||
25 | #include <memory> | 25 | #include <memory> | ||
---|---|---|---|---|---|
26 | 26 | | |||
27 | #include "AcbfBookinfo.h" | 27 | #include "AcbfBookinfo.h" | ||
28 | 28 | /** | |||
29 | * \brief Class to handle the content rating of the work. | ||||
30 | * | ||||
31 | * Because there are multiple ContentRating systems over various | ||||
32 | * countries, ACBF can handle multiple content rating objects, and | ||||
33 | * has entries for handling which system said rating is in. | ||||
34 | * | ||||
35 | * This is used in the BookInfo object. | ||||
36 | */ | ||||
29 | namespace AdvancedComicBookFormat | 37 | namespace AdvancedComicBookFormat | ||
30 | { | 38 | { | ||
31 | class ACBF_EXPORT ContentRating : public QObject | 39 | class ACBF_EXPORT ContentRating : public QObject | ||
Context not available. | |||||
35 | explicit ContentRating(BookInfo* parent = nullptr); | 43 | explicit ContentRating(BookInfo* parent = nullptr); | ||
36 | ~ContentRating() override; | 44 | ~ContentRating() override; | ||
37 | 45 | | |||
46 | /** | ||||
47 | * \brief write this content rating to the xml writer. | ||||
48 | */ | ||||
38 | void toXml(QXmlStreamWriter* writer); | 49 | void toXml(QXmlStreamWriter* writer); | ||
50 | /** | ||||
51 | * \brief load a content-rating section from the xml into this object. | ||||
52 | * @return True if the xmlReader encountered no errors. | ||||
53 | */ | ||||
39 | bool fromXml(QXmlStreamReader *xmlReader); | 54 | bool fromXml(QXmlStreamReader *xmlReader); | ||
40 | 55 | | |||
56 | /** | ||||
57 | * @return the system that the content rating belongs to. | ||||
58 | */ | ||||
41 | QString type() const; | 59 | QString type() const; | ||
60 | /** | ||||
61 | * \brief set the system that defines this rating. | ||||
62 | * @param type - the name of the system. | ||||
63 | */ | ||||
42 | void setType(const QString& type); | 64 | void setType(const QString& type); | ||
43 | 65 | | |||
66 | /** | ||||
67 | * @return the rating label as a string. | ||||
68 | */ | ||||
44 | QString rating() const; | 69 | QString rating() const; | ||
70 | /** | ||||
71 | * \brief set the rating. | ||||
72 | * @param rating - the name of the rating label as a QString. | ||||
73 | */ | ||||
45 | void setRating(const QString& rating); | 74 | void setRating(const QString& rating); | ||
46 | private: | 75 | private: | ||
47 | class Private; | 76 | class Private; | ||
Context not available. |