Changeset View
Changeset View
Standalone View
Standalone View
src/acbf/AcbfPublishinfo.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 ACBFPUBLISHINFO_H | 22 | #ifndef ACBFPUBLISHINFO_H | ||
23 | #define ACBFPUBLISHINFO_H | 23 | #define ACBFPUBLISHINFO_H | ||
24 | 24 | | |||
25 | #include <memory> | ||||
26 | | ||||
25 | #include "AcbfMetadata.h" | 27 | #include "AcbfMetadata.h" | ||
26 | 28 | | |||
27 | #include <QDate> | 29 | #include <QDate> | ||
28 | 30 | | |||
29 | namespace AdvancedComicBookFormat | 31 | namespace AdvancedComicBookFormat | ||
30 | { | 32 | { | ||
31 | class ACBF_EXPORT PublishInfo : public QObject | 33 | class ACBF_EXPORT PublishInfo : public QObject | ||
32 | { | 34 | { | ||
33 | Q_OBJECT | 35 | Q_OBJECT | ||
34 | public: | 36 | public: | ||
35 | explicit PublishInfo(Metadata* parent = nullptr); | 37 | explicit PublishInfo(Metadata* parent = nullptr); | ||
36 | ~PublishInfo() override; | 38 | ~PublishInfo() override; | ||
37 | 39 | | |||
38 | void toXml(QXmlStreamWriter *writer); | 40 | void toXml(QXmlStreamWriter *writer); | ||
39 | bool fromXml(QXmlStreamReader *xmlReader); | 41 | bool fromXml(QXmlStreamReader *xmlReader); | ||
40 | 42 | | |||
41 | QString publisher(); | 43 | QString publisher() const; | ||
42 | void setPublisher(QString publisher); | 44 | void setPublisher(const QString& publisher); | ||
43 | 45 | | |||
44 | QDate publishDate(); | 46 | QDate publishDate() const; | ||
45 | void setPublishDate(QDate publishDate); | 47 | void setPublishDate(const QDate& publishDate); | ||
46 | 48 | | |||
47 | QString city(); | 49 | QString city() const; | ||
48 | void setCity(QString city = ""); | 50 | void setCity(const QString& city = QString()); | ||
49 | 51 | | |||
50 | QString isbn(); | 52 | QString isbn() const; | ||
51 | void setIsbn(QString isbn = ""); | 53 | void setIsbn(const QString& isbn = QString()); | ||
52 | 54 | | |||
53 | QString license(); | 55 | QString license() const; | ||
54 | void setLicense(QString license = ""); | 56 | void setLicense(const QString& license = QString()); | ||
55 | private: | 57 | private: | ||
56 | class Private; | 58 | class Private; | ||
57 | Private* d; | 59 | std::unique_ptr<Private> d; | ||
58 | }; | 60 | }; | ||
59 | } | 61 | } | ||
60 | 62 | | |||
61 | #endif//ACBFPUBLISHINFO_H | 63 | #endif//ACBFPUBLISHINFO_H |