Changeset View
Changeset View
Standalone View
Standalone View
src/musicartist.h
Show All 16 Lines | |||||
17 | 17 | | |||
18 | #ifndef MUSICARTIST_H | 18 | #ifndef MUSICARTIST_H | ||
19 | #define MUSICARTIST_H | 19 | #define MUSICARTIST_H | ||
20 | 20 | | |||
21 | #include "elisaLib_export.h" | 21 | #include "elisaLib_export.h" | ||
22 | 22 | | |||
23 | #include <QString> | 23 | #include <QString> | ||
24 | #include <QMetaType> | 24 | #include <QMetaType> | ||
25 | #include <QSharedDataPointer> | ||||
25 | 26 | | |||
26 | #include <memory> | 27 | #include <memory> | ||
27 | 28 | | |||
28 | class MusicArtistPrivate; | 29 | class MusicArtistPrivate; | ||
29 | class QDebug; | 30 | class QDebug; | ||
30 | 31 | | |||
31 | class ELISALIB_EXPORT MusicArtist | 32 | class ELISALIB_EXPORT MusicArtist | ||
32 | { | 33 | { | ||
33 | public: | 34 | public: | ||
34 | 35 | | |||
35 | MusicArtist(); | 36 | MusicArtist(); | ||
36 | 37 | | |||
37 | MusicArtist(MusicArtist &&other); | 38 | MusicArtist(MusicArtist &&other) noexcept; | ||
38 | 39 | | |||
39 | MusicArtist(const MusicArtist &other); | 40 | MusicArtist(const MusicArtist &other); | ||
40 | 41 | | |||
41 | MusicArtist& operator=(MusicArtist &&other); | 42 | MusicArtist& operator=(MusicArtist &&other) noexcept; | ||
42 | 43 | | |||
43 | MusicArtist& operator=(const MusicArtist &other); | 44 | MusicArtist& operator=(const MusicArtist &other); | ||
44 | 45 | | |||
45 | ~MusicArtist(); | 46 | ~MusicArtist(); | ||
46 | 47 | | |||
47 | void setValid(bool value); | 48 | void setValid(bool value); | ||
48 | 49 | | |||
49 | bool isValid() const; | 50 | bool isValid() const; | ||
Show All 11 Lines | |||||
61 | qulonglong databaseId() const; | 62 | qulonglong databaseId() const; | ||
62 | 63 | | |||
63 | void setAlbumsCount(int value); | 64 | void setAlbumsCount(int value); | ||
64 | 65 | | |||
65 | int albumsCount() const; | 66 | int albumsCount() const; | ||
66 | 67 | | |||
67 | private: | 68 | private: | ||
68 | 69 | | |||
69 | std::unique_ptr<MusicArtistPrivate> d; | 70 | QSharedDataPointer<MusicArtistPrivate> d; | ||
70 | 71 | | |||
71 | }; | 72 | }; | ||
72 | 73 | | |||
73 | QDebug& operator<<(QDebug &stream, const MusicArtist &data); | 74 | QDebug& operator<<(QDebug &stream, const MusicArtist &data); | ||
74 | 75 | | |||
75 | bool operator==(const MusicArtist &artist1, const MusicArtist &artist2); | 76 | bool operator==(const MusicArtist &artist1, const MusicArtist &artist2); | ||
76 | 77 | | |||
78 | Q_DECLARE_TYPEINFO(MusicArtist, Q_MOVABLE_TYPE); | ||||
79 | | ||||
77 | Q_DECLARE_METATYPE(MusicArtist) | 80 | Q_DECLARE_METATYPE(MusicArtist) | ||
78 | 81 | | |||
79 | #endif // MUSICARTIST_H | 82 | #endif // MUSICARTIST_H |