MythTV  master
v2titleInfoList.h
Go to the documentation of this file.
1 // Program Name: titleInfoList.h
3 // Created : June 14, 2013
4 //
5 // Copyright (c) 2013 Chris Pinkham <cpinkham@mythtv.org>
6 //
7 // Licensed under the GPL v2 or later, see COPYING for details
8 //
10 
11 #ifndef V2TITLEINFOLIST_H_
12 #define V2TITLEINFOLIST_H_
13 
14 #include <QVariantList>
15 
17 
18 #include "v2titleInfo.h"
19 
20 class V2TitleInfoList : public QObject
21 {
22  Q_OBJECT
23  Q_CLASSINFO( "Version", "1.0" );
24 
25  Q_CLASSINFO( "TitleInfos", "type=V2TitleInfo");
26 
27  SERVICE_PROPERTY2( QVariantList, TitleInfos );
28 
29  public:
30 
31  Q_INVOKABLE V2TitleInfoList(QObject *parent = nullptr)
32  : QObject( parent )
33  {
34  }
35 
36  void Copy( const V2TitleInfoList *src )
37  {
38  CopyListContents< V2TitleInfo >( this, m_TitleInfos, src->m_TitleInfos );
39  }
40 
42  {
43  // We must make sure the object added to the QVariantList has
44  // a parent of 'this'
45 
46  auto *pObject = new V2TitleInfo( this );
47  m_TitleInfos.append( QVariant::fromValue<QObject *>( pObject ));
48 
49  return pObject;
50  }
51 
52  private:
54 };
55 
57 
58 #endif
V2TitleInfoList::Copy
void Copy(const V2TitleInfoList *src)
Definition: v2titleInfoList.h:36
V2TitleInfoList::SERVICE_PROPERTY2
SERVICE_PROPERTY2(QVariantList, TitleInfos)
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(StandardSetting *)
V2TitleInfoList::Q_DISABLE_COPY
Q_DISABLE_COPY(V2TitleInfoList)
V2TitleInfoList::V2TitleInfoList
Q_INVOKABLE V2TitleInfoList(QObject *parent=nullptr)
Definition: v2titleInfoList.h:31
V2TitleInfoList::Q_CLASSINFO
Q_CLASSINFO("Version", "1.0")
v2titleInfo.h
mythhttpservice.h
V2TitleInfoList::AddNewTitleInfo
V2TitleInfo * AddNewTitleInfo()
Definition: v2titleInfoList.h:41
V2TitleInfoList
Definition: v2titleInfoList.h:20
V2TitleInfo
Definition: v2titleInfo.h:20