MythTV  master
v2artworkInfoList.h
Go to the documentation of this file.
1 // 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 
22 class 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
V2ArtworkInfoList
Definition: v2artworkInfoList.h:22
V2ArtworkInfoList::SERVICE_PROPERTY2
SERVICE_PROPERTY2(QVariantList, ArtworkInfos)
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(StandardSetting *)
V2ArtworkInfoList::Q_CLASSINFO
Q_CLASSINFO("Version", "1.0")
V2ArtworkInfoList::AddNewArtworkInfo
V2ArtworkInfo * AddNewArtworkInfo()
Definition: v2artworkInfoList.h:46
mythhttpservice.h
V2ArtworkInfoList::V2ArtworkInfoList
Q_INVOKABLE V2ArtworkInfoList(QObject *parent=nullptr)
Definition: v2artworkInfoList.h:36
V2ArtworkInfoList::Q_DISABLE_COPY
Q_DISABLE_COPY(V2ArtworkInfoList)
V2ArtworkInfoList::Copy
void Copy(const V2ArtworkInfoList *src)
Definition: v2artworkInfoList.h:41
V2ArtworkInfo
Definition: v2artworkInfo.h:21
v2artworkInfo.h