MythTV master
v2videoLookupInfoList.h
Go to the documentation of this file.
1
2// Program Name: videoLookupInfoList.h
3// Created : Jul. 19, 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 V2VIDEOLOOKUPINFOLIST_H_
12#define V2VIDEOLOOKUPINFOLIST_H_
13
14#include <QVariantList>
15
17
18#include "v2videoLookupInfo.h"
19
20
21class V2VideoLookupList : public QObject
22{
23 Q_OBJECT
24 Q_CLASSINFO( "Version", "1.0" );
25
26 // Q_CLASSINFO Used to augment Metadata for properties.
27 // See datacontracthelper.h for details
28
29 Q_CLASSINFO( "VideoLookups", "type=V2VideoLookup");
30 Q_CLASSINFO( "AsOf" , "transient=true" );
31
32
33 SERVICE_PROPERTY2 ( int , Count )
34 SERVICE_PROPERTY2 ( QDateTime , AsOf )
35 SERVICE_PROPERTY2 ( QString , Version )
36 SERVICE_PROPERTY2 ( QString , ProtoVer )
37 SERVICE_PROPERTY2 ( QVariantList, VideoLookups );
38
39 public:
40
41 Q_INVOKABLE V2VideoLookupList(QObject *parent = nullptr)
42 : QObject( parent )
43 {
44 }
45
46 void Copy( const V2VideoLookupList *src )
47 {
48 m_Count = src->m_Count ;
49 m_AsOf = src->m_AsOf ;
50 m_Version = src->m_Version ;
51 m_ProtoVer = src->m_ProtoVer ;
52
53 CopyListContents< V2VideoLookup >( this, m_VideoLookups, src->m_VideoLookups );
54 }
55
57 {
58 // We must make sure the object added to the QVariantList has
59 // a parent of 'this'
60
61 auto *pObject = new V2VideoLookup( this );
62 m_VideoLookups.append( QVariant::fromValue<QObject *>( pObject ));
63
64 return pObject;
65 }
66
67 private:
69};
70
72
73#endif
V2VideoLookup * AddNewVideoLookup()
SERVICE_PROPERTY2(QVariantList, VideoLookups)
Q_CLASSINFO("VideoLookups", "type=V2VideoLookup")
Q_CLASSINFO("AsOf", "transient=true")
Q_DISABLE_COPY(V2VideoLookupList)
Q_CLASSINFO("Version", "1.0")
void Copy(const V2VideoLookupList *src)
Q_DECLARE_METATYPE(std::chrono::seconds)