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
13class 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
Q_CLASSINFO("ChannelGroups", "type=V2ChannelGroup")
void Copy(const V2ChannelGroupList *src)
Q_CLASSINFO("Version", "1.0")
Q_DISABLE_COPY(V2ChannelGroupList)
V2ChannelGroup * AddNewChannelGroup()
Q_INVOKABLE V2ChannelGroupList(QObject *parent=nullptr)
SERVICE_PROPERTY2(QVariantList, ChannelGroups)
Q_DECLARE_METATYPE(std::chrono::seconds)