Changeset View
Changeset View
Standalone View
Standalone View
src/musicaudiogenre.h
Show All 16 Lines | |||||
17 | 17 | | |||
18 | #ifndef MUSICAUDIOGENRE_H | 18 | #ifndef MUSICAUDIOGENRE_H | ||
19 | #define MUSICAUDIOGENRE_H | 19 | #define MUSICAUDIOGENRE_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 MusicAudioGenrePrivate; | 29 | class MusicAudioGenrePrivate; | ||
29 | class QDebug; | 30 | class QDebug; | ||
30 | 31 | | |||
31 | class ELISALIB_EXPORT MusicAudioGenre | 32 | class ELISALIB_EXPORT MusicAudioGenre | ||
32 | { | 33 | { | ||
33 | 34 | | |||
34 | public: | 35 | public: | ||
35 | 36 | | |||
36 | MusicAudioGenre(); | 37 | MusicAudioGenre(); | ||
37 | 38 | | |||
38 | MusicAudioGenre(MusicAudioGenre &&other); | 39 | MusicAudioGenre(MusicAudioGenre &&other) noexcept; | ||
39 | 40 | | |||
40 | MusicAudioGenre(const MusicAudioGenre &other); | 41 | MusicAudioGenre(const MusicAudioGenre &other); | ||
41 | 42 | | |||
42 | MusicAudioGenre& operator=(MusicAudioGenre &&other); | 43 | MusicAudioGenre& operator=(MusicAudioGenre &&other) noexcept; | ||
43 | 44 | | |||
44 | MusicAudioGenre& operator=(const MusicAudioGenre &other); | 45 | MusicAudioGenre& operator=(const MusicAudioGenre &other); | ||
45 | 46 | | |||
46 | ~MusicAudioGenre(); | 47 | ~MusicAudioGenre(); | ||
47 | 48 | | |||
48 | void setName(const QString &aName); | 49 | void setName(const QString &aName); | ||
49 | 50 | | |||
50 | QString name() const; | 51 | QString name() const; | ||
51 | 52 | | |||
52 | void setDatabaseId(qulonglong value); | 53 | void setDatabaseId(qulonglong value); | ||
53 | 54 | | |||
54 | qulonglong databaseId() const; | 55 | qulonglong databaseId() const; | ||
55 | 56 | | |||
56 | private: | 57 | private: | ||
57 | 58 | | |||
58 | std::unique_ptr<MusicAudioGenrePrivate> d; | 59 | QSharedDataPointer<MusicAudioGenrePrivate> d; | ||
59 | 60 | | |||
60 | }; | 61 | }; | ||
61 | 62 | | |||
62 | QDebug& operator<<(QDebug &stream, const MusicAudioGenre &data); | 63 | QDebug& operator<<(QDebug &stream, const MusicAudioGenre &data); | ||
63 | 64 | | |||
64 | bool operator==(const MusicAudioGenre &genre1, const MusicAudioGenre &genre2); | 65 | bool operator==(const MusicAudioGenre &genre1, const MusicAudioGenre &genre2); | ||
65 | 66 | | |||
67 | Q_DECLARE_TYPEINFO(MusicAudioGenre, Q_MOVABLE_TYPE); | ||||
68 | | ||||
66 | Q_DECLARE_METATYPE(MusicAudioGenre) | 69 | Q_DECLARE_METATYPE(MusicAudioGenre) | ||
67 | 70 | | |||
68 | #endif // MUSICAUDIOGENRE_H | 71 | #endif // MUSICAUDIOGENRE_H |