MythTV  master
castMember.h
Go to the documentation of this file.
1 // Program Name: castMember.h
3 // Created : Nov. 25, 2013
4 //
5 // Copyright (c) 2013 Stuart Morgan <smorgan@mythtv.org>
6 //
7 // Licensed under the GPL v2 or later, see COPYING for details
8 //
10 
11 #ifndef DTCCASTMEMBER_H_
12 #define DTCCASTMEMBER_H_
13 
14 #include <QObject>
15 #include <QString>
16 
17 #include "serviceexp.h"
18 #include "datacontracthelper.h"
19 
20 namespace DTC
21 {
22 
23 class SERVICE_PUBLIC CastMember : public QObject
24 {
25  Q_OBJECT
26  Q_CLASSINFO( "version", "0.99" );
27 
28  // Q_CLASSINFO Used to augment Metadata for properties.
29  // See datacontracthelper.h for details
30 
31  Q_PROPERTY( QString Name READ Name WRITE setName )
32  Q_PROPERTY( QString CharacterName READ CharacterName WRITE setCharacterName )
33  Q_PROPERTY( QString Role READ Role WRITE setRole )
34  Q_PROPERTY( QString TranslatedRole READ TranslatedRole WRITE setTranslatedRole )
35 
36  PROPERTYIMP ( QString , Name )
37  PROPERTYIMP ( QString , CharacterName )
38  PROPERTYIMP ( QString , Role )
39  PROPERTYIMP ( QString , TranslatedRole )
40 
41  public:
42 
43  static void InitializeCustomTypes();
44 
45  Q_INVOKABLE explicit CastMember(QObject *parent = nullptr)
46  : QObject ( parent )
47  {
48  }
49 
50  void Copy( const CastMember *src )
51  {
52  m_Name = src->m_Name ;
53  m_CharacterName = src->m_CharacterName ;
54  m_Role = src->m_Role ;
55  m_TranslatedRole = src->m_TranslatedRole;
56  }
57 
58  private:
60 };
61 
63 {
64  qRegisterMetaType< CastMember* >();
65 }
66 
67 }
68 
69 #endif
SERVICE_PUBLIC
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
DTC::CastMember::CastMember
Q_INVOKABLE CastMember(QObject *parent=nullptr)
Definition: castMember.h:45
datacontracthelper.h
DTC::CastMember::Copy
void Copy(const CastMember *src)
Definition: castMember.h:50
serviceexp.h
DTC::CastMember::InitializeCustomTypes
static void InitializeCustomTypes()
Definition: castMember.h:62
DTC::CastMember
Definition: castMember.h:24
PROPERTYIMP
#define PROPERTYIMP(type, name)
Definition: datacontracthelper.h:56
Name
Definition: channelsettings.cpp:47
DTC
Definition: datacontracthelper.h:110
DTC::CastMember::Q_DISABLE_COPY
Q_DISABLE_COPY(CastMember)