MythTV master
v2videoMetadataInfoList.h
Go to the documentation of this file.
1
2// Program Name: videoMetadataInfoList.h
3// Created : Apr. 21, 2011
4//
5// Copyright (c) 2011 Robert McNamara <rmcnamara@mythtv.org>
6//
7// Licensed under the GPL v2 or later, see COPYING for details
8//
10
11#ifndef V2VIDEOMETADATAINFOLIST_H_
12#define V2VIDEOMETADATAINFOLIST_H_
13
14#include <QVariantList>
15
17
18#include "v2videoMetadataInfo.h"
19
20class V2VideoMetadataInfoList : public QObject
21{
22 Q_OBJECT
23 Q_CLASSINFO( "Version", "1.02" );
24
25 Q_CLASSINFO( "VideoMetadataInfos", "type=V2VideoMetadataInfo");
26 Q_CLASSINFO( "AsOf" , "transient=true" );
27
28 SERVICE_PROPERTY2 ( int , StartIndex )
29 SERVICE_PROPERTY2 ( int , Count )
30 SERVICE_PROPERTY2 ( int , CurrentPage )
31 SERVICE_PROPERTY2 ( int , TotalPages )
32 SERVICE_PROPERTY2 ( int , TotalAvailable )
33 SERVICE_PROPERTY2 ( QDateTime , AsOf )
34 SERVICE_PROPERTY2 ( QString , Version )
35 SERVICE_PROPERTY2 ( QString , ProtoVer )
36 SERVICE_PROPERTY2 (QVariantList, VideoMetadataInfos)
37
38 public:
39
40 Q_INVOKABLE V2VideoMetadataInfoList(QObject *parent = nullptr)
41 : QObject( parent )
42 {
43 }
44
45 void Copy( const V2VideoMetadataInfoList *src )
46 {
47 m_StartIndex = src->m_StartIndex ;
48 m_Count = src->m_Count ;
49 m_TotalAvailable= src->m_TotalAvailable ;
50 m_AsOf = src->m_AsOf ;
51 m_Version = src->m_Version ;
52 m_ProtoVer = src->m_ProtoVer ;
53
54 CopyListContents< V2VideoMetadataInfo >( this, m_VideoMetadataInfos, src->m_VideoMetadataInfos );
55 }
56
58 {
59 // We must make sure the object added to the QVariantList has
60 // a parent of 'this'
61
62 auto *pObject = new V2VideoMetadataInfo( this );
63 m_VideoMetadataInfos.append( QVariant::fromValue<QObject *>( pObject ));
64
65 return pObject;
66 }
67
68 private:
70};
71
73
74
75#endif
Q_CLASSINFO("AsOf", "transient=true")
Q_CLASSINFO("Version", "1.02")
Q_CLASSINFO("VideoMetadataInfos", "type=V2VideoMetadataInfo")
V2VideoMetadataInfo * AddNewVideoMetadataInfo()
Q_DISABLE_COPY(V2VideoMetadataInfoList)
Q_INVOKABLE V2VideoMetadataInfoList(QObject *parent=nullptr)
void Copy(const V2VideoMetadataInfoList *src)
Q_DECLARE_METATYPE(std::chrono::seconds)
#define SERVICE_PROPERTY2(Type, Name)