MythTV master
v2artworkInfoList.h
Go to the documentation of this file.
1
2// Program Name: artworkInfoList.h
3// Created : Nov. 12, 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 V2ARTWORKINFOLIST_H_
12#define V2ARTWORKINFOLIST_H_
13
14#include <QString>
15#include <QVariantList>
16
18
19#include "v2artworkInfo.h"
20
21
22class V2ArtworkInfoList : public QObject
23{
24 Q_OBJECT
25 Q_CLASSINFO( "Version", "1.0" );
26
27 // Q_CLASSINFO Used to augment Metadata for properties.
28 // See datacontracthelper.h for details
29
30 Q_CLASSINFO( "ArtworkInfos", "type=V2ArtworkInfo");
31
32 SERVICE_PROPERTY2( QVariantList, ArtworkInfos );
33
34 public:
35
36 Q_INVOKABLE V2ArtworkInfoList(QObject *parent = nullptr)
37 : QObject ( parent )
38 {
39 }
40
41 void Copy( const V2ArtworkInfoList *src )
42 {
43 CopyListContents< V2ArtworkInfo >( this, m_ArtworkInfos, src->m_ArtworkInfos );
44 }
45
47 {
48 // We must make sure the object added to the QVariantList has
49 // a parent of 'this'
50
51 auto *pObject = new V2ArtworkInfo( this );
52 m_ArtworkInfos.append( QVariant::fromValue<QObject *>( pObject ));
53
54 return pObject;
55 }
56
57 private:
59};
60
62
63#endif
Q_CLASSINFO("Version", "1.0")
V2ArtworkInfo * AddNewArtworkInfo()
Q_INVOKABLE V2ArtworkInfoList(QObject *parent=nullptr)
Q_CLASSINFO("ArtworkInfos", "type=V2ArtworkInfo")
Q_DISABLE_COPY(V2ArtworkInfoList)
SERVICE_PROPERTY2(QVariantList, ArtworkInfos)
void Copy(const V2ArtworkInfoList *src)
Q_DECLARE_METATYPE(std::chrono::seconds)