Changeset View
Changeset View
Standalone View
Standalone View
src/acbf/AcbfPublishinfo.h
Show All 21 Lines | |||||
22 | #ifndef ACBFPUBLISHINFO_H | 22 | #ifndef ACBFPUBLISHINFO_H | ||
23 | #define ACBFPUBLISHINFO_H | 23 | #define ACBFPUBLISHINFO_H | ||
24 | 24 | | |||
25 | #include <memory> | 25 | #include <memory> | ||
26 | 26 | | |||
27 | #include "AcbfMetadata.h" | 27 | #include "AcbfMetadata.h" | ||
28 | 28 | | |||
29 | #include <QDate> | 29 | #include <QDate> | ||
30 | 30 | /** | |||
31 | * \brief Class to handle the publishing info. | ||||
32 | * | ||||
33 | * The Publishing info in ACBF is about who published the book, | ||||
34 | * when, where, the ISBN number, and which license it was published | ||||
35 | * under. | ||||
36 | */ | ||||
31 | namespace AdvancedComicBookFormat | 37 | namespace AdvancedComicBookFormat | ||
32 | { | 38 | { | ||
33 | class ACBF_EXPORT PublishInfo : public QObject | 39 | class ACBF_EXPORT PublishInfo : public QObject | ||
34 | { | 40 | { | ||
35 | Q_OBJECT | 41 | Q_OBJECT | ||
36 | public: | 42 | public: | ||
37 | explicit PublishInfo(Metadata* parent = nullptr); | 43 | explicit PublishInfo(Metadata* parent = nullptr); | ||
38 | ~PublishInfo() override; | 44 | ~PublishInfo() override; | ||
39 | 45 | | |||
46 | /** | ||||
47 | * \brief Write the publishingInfo into the xml writer. | ||||
48 | */ | ||||
40 | void toXml(QXmlStreamWriter *writer); | 49 | void toXml(QXmlStreamWriter *writer); | ||
50 | /** | ||||
51 | * \brief load the publishing info into this object. | ||||
52 | * @return True if the xmlReader encountered no errors. | ||||
53 | */ | ||||
41 | bool fromXml(QXmlStreamReader *xmlReader); | 54 | bool fromXml(QXmlStreamReader *xmlReader); | ||
42 | 55 | | |||
56 | /** | ||||
57 | * @return the name of the publisher. | ||||
58 | */ | ||||
43 | QString publisher() const; | 59 | QString publisher() const; | ||
60 | /** | ||||
61 | * \brief set the name of the publisher. | ||||
62 | */ | ||||
44 | void setPublisher(const QString& publisher); | 63 | void setPublisher(const QString& publisher); | ||
45 | 64 | | |||
65 | /** | ||||
66 | * @return the publishing date as a QDate object. | ||||
67 | */ | ||||
46 | QDate publishDate() const; | 68 | QDate publishDate() const; | ||
69 | /** | ||||
70 | * \brief set the publishing date. | ||||
71 | * @param publishDate - the publishingdate as a QDate object. | ||||
72 | */ | ||||
47 | void setPublishDate(const QDate& publishDate); | 73 | void setPublishDate(const QDate& publishDate); | ||
48 | 74 | | |||
75 | /** | ||||
76 | * @return the name of the city the work was published in. | ||||
77 | */ | ||||
49 | QString city() const; | 78 | QString city() const; | ||
79 | /** | ||||
80 | * \brief set the name of the city the work was published in. | ||||
81 | * @param city - the name of the city as a QString. | ||||
82 | */ | ||||
50 | void setCity(const QString& city = QString()); | 83 | void setCity(const QString& city = QString()); | ||
51 | 84 | | |||
85 | /** | ||||
86 | * @return the ISBN number as a QString. | ||||
87 | */ | ||||
52 | QString isbn() const; | 88 | QString isbn() const; | ||
89 | /** | ||||
90 | * \brief set the ISBN number. | ||||
91 | * @param isbn - the ISBN number as a QString. ISBN numbers should be registered. | ||||
92 | */ | ||||
53 | void setIsbn(const QString& isbn = QString()); | 93 | void setIsbn(const QString& isbn = QString()); | ||
54 | 94 | | |||
95 | /** | ||||
96 | * @return the name of the license the comic was published under. | ||||
97 | */ | ||||
55 | QString license() const; | 98 | QString license() const; | ||
99 | /** | ||||
100 | * \brief set the License that the work was published under. | ||||
101 | * @param license - the name of the license as a QString. | ||||
102 | */ | ||||
56 | void setLicense(const QString& license = QString()); | 103 | void setLicense(const QString& license = QString()); | ||
57 | private: | 104 | private: | ||
58 | class Private; | 105 | class Private; | ||
59 | std::unique_ptr<Private> d; | 106 | std::unique_ptr<Private> d; | ||
60 | }; | 107 | }; | ||
61 | } | 108 | } | ||
62 | 109 | | |||
63 | #endif//ACBFPUBLISHINFO_H | 110 | #endif//ACBFPUBLISHINFO_H |