MythTV  master
genre.h
Go to the documentation of this file.
1 // Program Name: genre.h
3 // Created : Mar. 08, 2017
4 //
5 // Copyright (c) 2017 Paul Harrison <pharrison@mythtv.org>
6 //
7 // Licensed under the GPL v2 or later, see COPYING for details
8 //
10 
11 #ifndef GENRE_H_
12 #define GENRE_H_
13 
14 #include <QString>
15 
16 #include "serviceexp.h"
17 #include "datacontracthelper.h"
18 
19 namespace DTC
20 {
21 
23 
24 class SERVICE_PUBLIC Genre : public QObject
25 {
26  Q_OBJECT
27  Q_CLASSINFO( "version" , "1.0" );
28 
29  Q_PROPERTY( QString Name READ Name WRITE setName )
30 
31  PROPERTYIMP ( QString , Name );
32 
33  public:
34 
35  static inline void InitializeCustomTypes();
36 
37  Q_INVOKABLE Genre(QObject *parent = nullptr)
38  : QObject ( parent )
39  {
40  }
41 
42  void Copy( const Genre *src )
43  {
44  m_Name = src->m_Name ;
45  }
46 
47  private:
48  Q_DISABLE_COPY(Genre);
49 };
50 
52 {
53  qRegisterMetaType< Genre* >();
54 }
55 
56 } // namespace DTC
57 
58 #endif
Q_INVOKABLE Genre(QObject *parent=nullptr)
Definition: genre.h:37
#define PROPERTYIMP(type, name)
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
static void InitializeCustomTypes()
Definition: genre.h:51
void Copy(const Genre *src)
Definition: genre.h:42