MythTV master
v2castMemberList.h
Go to the documentation of this file.
1#ifndef V2CASTMEMBERLIST_H_
2#define V2CASTMEMBERLIST_H_
3
4#include <QVariantList>
5#include <QString>
6#include <QDateTime>
7
9
10#include "v2castMember.h"
11
12
13class V2CastMemberList : public QObject
14{
15 Q_OBJECT
16 Q_CLASSINFO( "Version", "0.99" );
17
18 // Q_CLASSINFO Used to augment Metadata for properties.
19 // See mythhttpservice.h for details
20
21 Q_CLASSINFO( "CastMembers", "type=V2CastMember");
22
23 SERVICE_PROPERTY2( QVariantList, CastMembers );
24
25 public:
26
27 Q_INVOKABLE V2CastMemberList(QObject *parent = nullptr)
28 : QObject( parent )
29 {
30 }
31
32 void Copy( const V2CastMemberList *src )
33 {
34 CopyListContents< V2CastMember >( this, m_CastMembers, src->m_CastMembers );
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 V2CastMember( this );
43 m_CastMembers.append( QVariant::fromValue<QObject *>( pObject ));
44
45 return pObject;
46 }
47
48 private:
50};
51
53
54#endif
V2CastMember * AddNewCastMember()
SERVICE_PROPERTY2(QVariantList, CastMembers)
void Copy(const V2CastMemberList *src)
Q_INVOKABLE V2CastMemberList(QObject *parent=nullptr)
Q_DISABLE_COPY(V2CastMemberList)
Q_CLASSINFO("CastMembers", "type=V2CastMember")
Q_CLASSINFO("Version", "0.99")
Q_DECLARE_METATYPE(std::chrono::seconds)