Changeset View
Changeset View
Standalone View
Standalone View
src/acbf/AcbfAuthor.h
Show All 17 Lines | |||||
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 ACBFAUTHORINFO_H | 22 | #ifndef ACBFAUTHORINFO_H | ||
23 | #define ACBFAUTHORINFO_H | 23 | #define ACBFAUTHORINFO_H | ||
24 | 24 | | |||
25 | #include "AcbfMetadata.h" | 25 | #include "AcbfMetadata.h" | ||
26 | #include <memory> | ||||
leinir: std things scare me! (no, but really, i need to get used to those, they're cool :) ). We are… | |||||
it does with msvc > 2013 or with any mingw thing. tcanabrava: it does with msvc > 2013 or with any mingw thing.
(std started to be good around c++11.) | |||||
Cool, really just wanted to be sure :) i vividly remember us doing some niftiness during the KO days and then discovering that the features weren't supported in msvc, which was... much fun ;) That, of course, was msvc2012, and things have moved considerably since then :) leinir: Cool, really just wanted to be sure :) i vividly remember us doing some niftiness during the KO… | |||||
26 | 27 | | |||
27 | namespace AdvancedComicBookFormat | 28 | namespace AdvancedComicBookFormat | ||
28 | { | 29 | { | ||
29 | class ACBF_EXPORT Author : public QObject | 30 | class ACBF_EXPORT Author : public QObject | ||
30 | { | 31 | { | ||
31 | Q_OBJECT | 32 | Q_OBJECT | ||
32 | public: | 33 | public: | ||
33 | // Author is used in both Bookinfo and Documentinfo, and as such it is parented to Metadata | 34 | // Author is used in both Bookinfo and Documentinfo, and as such it is parented to Metadata | ||
34 | explicit Author(Metadata* parent = nullptr); | 35 | explicit Author(Metadata* parent = nullptr); | ||
35 | ~Author() override; | 36 | ~Author(); | ||
36 | 37 | | |||
37 | void toXml(QXmlStreamWriter* writer); | 38 | void toXml(QXmlStreamWriter* writer); | ||
38 | bool fromXml(QXmlStreamReader *xmlReader); | 39 | bool fromXml(QXmlStreamReader *xmlReader); | ||
39 | 40 | | |||
40 | Q_INVOKABLE QString displayName(); | 41 | Q_INVOKABLE QString displayName() const; | ||
41 | 42 | | |||
42 | Q_INVOKABLE QString activity(); | 43 | Q_INVOKABLE QString activity() const; | ||
43 | Q_INVOKABLE void setActivity(QString activity); | 44 | Q_INVOKABLE void setActivity(const QString& activity); | ||
44 | Q_INVOKABLE static QStringList availableActivities(); | 45 | Q_INVOKABLE static QStringList availableActivities(); | ||
45 | 46 | | |||
46 | // The language this author worked in for this book. Activity dependent (writer, translator, letterer...) | 47 | // The language this author worked in for this book. Activity dependent (writer, translator, letterer...) | ||
47 | Q_INVOKABLE QString language(); | 48 | Q_INVOKABLE QString language() const; | ||
48 | Q_INVOKABLE void setLanguage(QString language = ""); | 49 | Q_INVOKABLE void setLanguage(const QString& language = QString()); | ||
49 | 50 | | |||
50 | Q_INVOKABLE QString firstName(); | 51 | Q_INVOKABLE QString firstName() const; | ||
51 | Q_INVOKABLE void setFirstName(QString name); | 52 | Q_INVOKABLE void setFirstName(const QString& name); | ||
52 | Q_INVOKABLE QString middleName(); | 53 | Q_INVOKABLE QString middleName() const; | ||
53 | Q_INVOKABLE void setMiddleName(QString name); | 54 | Q_INVOKABLE void setMiddleName(const QString& name); | ||
54 | Q_INVOKABLE QString lastName(); | 55 | Q_INVOKABLE QString lastName() const; | ||
55 | Q_INVOKABLE void setLastName(QString name); | 56 | Q_INVOKABLE void setLastName(const QString& name); | ||
56 | Q_INVOKABLE QString nickName(); | 57 | Q_INVOKABLE QString nickName() const; | ||
57 | Q_INVOKABLE void setNickName(QString name); | 58 | Q_INVOKABLE void setNickName(const QString& name); | ||
58 | Q_INVOKABLE QString homePage(); | 59 | Q_INVOKABLE QString homePage() const; | ||
59 | Q_INVOKABLE void setHomePage(QString homepage); | 60 | Q_INVOKABLE void setHomePage(const QString& homepage); | ||
60 | Q_INVOKABLE QString email(); | 61 | Q_INVOKABLE QString email() const; | ||
61 | Q_INVOKABLE void setEmail(QString email); | 62 | Q_INVOKABLE void setEmail(const QString& email); | ||
62 | private: | 63 | private: | ||
63 | class Private; | 64 | class Private; | ||
64 | Private* d; | 65 | std::unique_ptr<Private> d; | ||
65 | }; | 66 | }; | ||
66 | } | 67 | } | ||
67 | 68 | | |||
68 | #endif//ACBFAUTHORINFO_H | 69 | #endif//ACBFAUTHORINFO_H |
std things scare me! (no, but really, i need to get used to those, they're cool :) ). We are absolutely certain this works on Windows, right?