MythTV  master
v2channelGroupList.h
Go to the documentation of this file.
1 #ifndef V2CHANNELGROUPLIST_H_
2 #define V2CHANNELGROUPLIST_H_
3 
4 #include <QVariantList>
5 #include <QString>
6 #include <QDateTime>
7 
9 
10 #include "v2channelGroup.h"
11 
12 
13 class V2ChannelGroupList : public QObject
14 {
15  Q_OBJECT
16  Q_CLASSINFO( "Version", "1.0" );
17 
18  // Q_CLASSINFO Used to augment Metadata for properties.
19  // See datacontracthelper.h for details
20 
21  Q_CLASSINFO( "ChannelGroups", "type=V2ChannelGroup");
22 
23  SERVICE_PROPERTY2( QVariantList, ChannelGroups );
24 
25  public:
26 
27  Q_INVOKABLE V2ChannelGroupList(QObject *parent = nullptr)
28  : QObject( parent )
29  {
30  }
31 
32  void Copy( const V2ChannelGroupList *src )
33  {
34  CopyListContents< V2ChannelGroup >( this, m_ChannelGroups, src->m_ChannelGroups );
35  }
36 
38  {
39  // We must make sure the object added to the QVariantList has
40  // a parent of 'this'
41 
42  auto *pObject = new V2ChannelGroup( this );
43  m_ChannelGroups.append( QVariant::fromValue<QObject *>( pObject ));
44 
45  return pObject;
46  }
47 
48  private:
50 };
51 
53 
54 #endif
V2ChannelGroupList::SERVICE_PROPERTY2
SERVICE_PROPERTY2(QVariantList, ChannelGroups)
V2ChannelGroupList::Q_DISABLE_COPY
Q_DISABLE_COPY(V2ChannelGroupList)
V2ChannelGroupList::Q_CLASSINFO
Q_CLASSINFO("Version", "1.0")
V2ChannelGroup
Definition: v2channelGroup.h:19
V2ChannelGroupList::Copy
void Copy(const V2ChannelGroupList *src)
Definition: v2channelGroupList.h:32
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(StandardSetting *)
V2ChannelGroupList
Definition: v2channelGroupList.h:13
V2ChannelGroupList::AddNewChannelGroup
V2ChannelGroup * AddNewChannelGroup()
Definition: v2channelGroupList.h:37
mythhttpservice.h
V2ChannelGroupList::V2ChannelGroupList
Q_INVOKABLE V2ChannelGroupList(QObject *parent=nullptr)
Definition: v2channelGroupList.h:27
v2channelGroup.h