MythTV  0.28pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
videoMetadataInfo.h
Go to the documentation of this file.
1 // Program Name: videoMetadataInfo.h
3 // Created : Apr. 21, 2011
4 //
5 // Copyright (c) 2010 Robert McNamara <rmcnamara@mythtv.org>
6 // Copyright (c) 2013 Stuart Morgan <smorgan@mythtv.org>
7 //
8 // Licensed under the GPL v2 or later, see COPYING for details
9 //
11 
12 #ifndef VIDEOMETADATAINFO_H_
13 #define VIDEOMETADATAINFO_H_
14 
15 #include <QString>
16 #include <QDateTime>
17 
18 #include "serviceexp.h"
19 #include "datacontracthelper.h"
20 #include "artworkInfoList.h"
21 #include "castMemberList.h"
22 
23 namespace DTC
24 {
25 
27 
28 class SERVICE_PUBLIC VideoMetadataInfo : public QObject
29 {
30  Q_OBJECT
31  Q_CLASSINFO( "version" , "2.0" );
32 
33  Q_PROPERTY( int Id READ Id WRITE setId )
34  Q_PROPERTY( QString Title READ Title WRITE setTitle )
35  Q_PROPERTY( QString SubTitle READ SubTitle WRITE setSubTitle )
36  Q_PROPERTY( QString Tagline READ Tagline WRITE setTagline )
37  Q_PROPERTY( QString Director READ Director WRITE setDirector )
38  Q_PROPERTY( QString Studio READ Studio WRITE setStudio )
39  Q_PROPERTY( QString Description READ Description WRITE setDescription )
40  Q_PROPERTY( QString Certification READ Certification WRITE setCertification )
41  Q_PROPERTY( QString Inetref READ Inetref WRITE setInetref )
42  Q_PROPERTY( int Collectionref READ Collectionref WRITE setCollectionref )
43  Q_PROPERTY( QString HomePage READ HomePage WRITE setHomePage )
44  Q_PROPERTY( QDateTime ReleaseDate READ ReleaseDate WRITE setReleaseDate )
45  Q_PROPERTY( QDateTime AddDate READ AddDate WRITE setAddDate )
46  Q_PROPERTY( float UserRating READ UserRating WRITE setUserRating )
47  Q_PROPERTY( int Length READ Length WRITE setLength )
48  Q_PROPERTY( int PlayCount READ PlayCount WRITE setPlayCount )
49  Q_PROPERTY( int Season READ Season WRITE setSeason )
50  Q_PROPERTY( int Episode READ Episode WRITE setEpisode )
51  Q_PROPERTY( int ParentalLevel READ ParentalLevel WRITE setParentalLevel )
52  Q_PROPERTY( bool Visible READ Visible WRITE setVisible )
53  Q_PROPERTY( bool Watched READ Watched WRITE setWatched )
54  Q_PROPERTY( bool Processed READ Processed WRITE setProcessed )
55  Q_PROPERTY( QString ContentType READ ContentType WRITE setContentType )
56  Q_PROPERTY( QString FileName READ FileName WRITE setFileName )
57  Q_PROPERTY( QString Hash READ Hash WRITE setHash )
58  Q_PROPERTY( QString HostName READ HostName WRITE setHostName )
59  Q_PROPERTY( QString Coverart READ Coverart WRITE setCoverart )
60  Q_PROPERTY( QString Fanart READ Fanart WRITE setFanart )
61  Q_PROPERTY( QString Banner READ Banner WRITE setBanner )
62  Q_PROPERTY( QString Screenshot READ Screenshot WRITE setScreenshot )
63  Q_PROPERTY( QString Trailer READ Trailer WRITE setTrailer )
64 
65  Q_PROPERTY( QObject* Artwork READ Artwork DESIGNABLE SerializeArtwork )
66  Q_PROPERTY( QObject* Cast READ Cast DESIGNABLE SerializeCast )
67 
68  PROPERTYIMP ( int , Id )
69  PROPERTYIMP ( QString , Title )
70  PROPERTYIMP ( QString , SubTitle )
71  PROPERTYIMP ( QString , Tagline )
72  PROPERTYIMP ( QString , Director )
73  PROPERTYIMP ( QString , Studio )
74  PROPERTYIMP ( QString , Description )
75  PROPERTYIMP ( QString , Certification )
76  PROPERTYIMP ( QString , Inetref )
77  PROPERTYIMP ( int , Collectionref )
78  PROPERTYIMP ( QString , HomePage )
79  PROPERTYIMP ( QDateTime , ReleaseDate )
80  PROPERTYIMP ( QDateTime , AddDate )
81  PROPERTYIMP ( float , UserRating )
82  PROPERTYIMP ( int , Length )
83  PROPERTYIMP ( int , PlayCount )
84  PROPERTYIMP ( int , Season )
85  PROPERTYIMP ( int , Episode )
86  PROPERTYIMP ( int , ParentalLevel )
87  PROPERTYIMP ( bool , Visible )
88  PROPERTYIMP ( bool , Watched )
89  PROPERTYIMP ( bool , Processed )
90  PROPERTYIMP ( QString , ContentType )
91  PROPERTYIMP ( QString , FileName )
92  PROPERTYIMP ( QString , Hash )
93  PROPERTYIMP ( QString , HostName )
94  PROPERTYIMP ( QString , Coverart )
95  PROPERTYIMP ( QString , Fanart )
96  PROPERTYIMP ( QString , Banner )
97  PROPERTYIMP ( QString , Screenshot )
98  PROPERTYIMP ( QString , Trailer )
99 
100  PROPERTYIMP_PTR( ArtworkInfoList, Artwork )
101  PROPERTYIMP_PTR( CastMemberList , Cast )
102 
103  PROPERTYIMP ( bool , SerializeArtwork)
104  PROPERTYIMP ( bool , SerializeCast )
105 
106  public:
107 
108  static inline void InitializeCustomTypes();
109 
110  public:
111 
112  VideoMetadataInfo(QObject *parent = 0)
113  : QObject ( parent ),
114  m_Id ( 0 ),
115  m_Collectionref ( 0 ),
116  m_UserRating ( 0 ),
117  m_Length ( 0 ),
118  m_PlayCount ( 0 ),
119  m_Season ( 0 ),
120  m_Episode ( 0 ),
121  m_ParentalLevel ( 0 ),
122  m_Visible ( false ),
123  m_Watched ( false ),
124  m_Processed ( false ),
125  m_Artwork ( NULL ),
126  m_Cast ( NULL ),
127  m_SerializeArtwork( true ),
128  m_SerializeCast ( true )
129  {
130  }
131 
133  {
134  Copy( src );
135  }
136 
137  void Copy( const VideoMetadataInfo &src )
138  {
139  m_Id = src.m_Id;
140  m_SerializeArtwork = src.m_SerializeArtwork;
141  m_SerializeCast = src.m_SerializeCast;
142 
143  if ( src.m_Artwork != NULL)
144  Artwork()->Copy( src.m_Artwork );
145 
146  if (src.m_Cast != NULL)
147  Cast()->Copy( src.m_Cast );
148  }
149 };
150 
151 } // namespace DTC
152 
154 Q_DECLARE_METATYPE( DTC::VideoMetadataInfo* )
155 
156 namespace DTC
157 {
158 inline void VideoMetadataInfo::InitializeCustomTypes()
159 {
160  qRegisterMetaType< VideoMetadataInfo >();
161  qRegisterMetaType< VideoMetadataInfo* >();
162 
163  if (QMetaType::type( "DTC::ArtworkInfoList" ) == 0)
164  ArtworkInfoList::InitializeCustomTypes();
165 
166  if (QMetaType::type( "DTC::CastMemberList" ) == 0)
167  CastMemberList::InitializeCustomTypes();
168 }
169 }
170 
171 #endif
AllMusic * parent
GLint GLenum GLsizei GLint GLenum GLenum type
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:83
VideoMetadataInfo(const VideoMetadataInfo &src)
VERBOSE_PREAMBLE Most Errors or other very important messages true
Definition: verbosedefs.h:91
ContentType
Definition: httprequest.h:52
void Copy(const VideoMetadataInfo &src)
Q_DECLARE_METATYPE(DTC::VideoMetadataInfo) Q_DECLARE_METATYPE(DTC
src
Definition: minilzo.cpp:2074