MythTV
master
libs
libmythservicecontracts
datacontracts
castMemberList.h
Go to the documentation of this file.
1
#ifndef CASTMEMBERLIST_H_
2
#define CASTMEMBERLIST_H_
3
4
#include <QVariantList>
5
#include <QString>
6
#include <QDateTime>
7
8
#include "
libmythservicecontracts/serviceexp.h
"
9
#include "
libmythservicecontracts/datacontracthelper.h
"
10
11
#include "
castMember.h
"
12
13
namespace
DTC
14
{
15
16
class
SERVICE_PUBLIC
CastMemberList
:
public
QObject
17
{
18
Q_OBJECT
19
Q_CLASSINFO(
"version"
,
"0.99"
);
20
21
// Q_CLASSINFO Used to augment Metadata for properties.
22
// See datacontracthelper.h for details
23
24
Q_CLASSINFO(
"CastMembers"
,
"type=DTC::CastMember"
);
25
26
Q_PROPERTY( QVariantList CastMembers READ CastMembers )
27
28
PROPERTYIMP_RO_REF
( QVariantList, CastMembers );
29
30
public
:
31
32
static
inline
void
InitializeCustomTypes();
33
34
Q_INVOKABLE
explicit
CastMemberList
(QObject *parent =
nullptr
)
35
: QObject( parent )
36
{
37
}
38
39
void
Copy
(
const
CastMemberList
*src )
40
{
41
CopyListContents< CastMember >(
this
, m_CastMembers, src->m_CastMembers );
42
}
43
44
CastMember
*
AddNewCastMember
()
45
{
46
// We must make sure the object added to the QVariantList has
47
// a parent of 'this'
48
49
auto
*pObject =
new
CastMember
(
this
);
50
m_CastMembers.append( QVariant::fromValue<QObject *>( pObject ));
51
52
return
pObject;
53
}
54
55
private
:
56
Q_DISABLE_COPY(
CastMemberList
);
57
};
58
59
inline
void
CastMemberList::InitializeCustomTypes
()
60
{
61
qRegisterMetaType< CastMemberList* >();
62
63
CastMember::InitializeCustomTypes
();
64
}
65
66
}
// namespace DTC
67
68
#endif
DTC::CastMemberList::AddNewCastMember
CastMember * AddNewCastMember()
Definition:
castMemberList.h:44
DTC::CastMemberList::InitializeCustomTypes
static void InitializeCustomTypes()
Definition:
castMemberList.h:59
DTC::CastMemberList::Copy
void Copy(const CastMemberList *src)
Definition:
castMemberList.h:39
SERVICE_PUBLIC
#define SERVICE_PUBLIC
Definition:
serviceexp.h:9
DTC::CastMemberList::CastMemberList
Q_INVOKABLE CastMemberList(QObject *parent=nullptr)
Definition:
castMemberList.h:34
PROPERTYIMP_RO_REF
#define PROPERTYIMP_RO_REF(type, name)
Definition:
datacontracthelper.h:114
DTC::CastMemberList
Definition:
castMemberList.h:16
datacontracthelper.h
serviceexp.h
castMember.h
DTC::CastMember::InitializeCustomTypes
static void InitializeCustomTypes()
Definition:
castMember.h:62
DTC::CastMember
Definition:
castMember.h:23
DTC
Definition:
datacontracthelper.h:123
Generated on Wed Dec 6 2023 03:20:01 for MythTV by
1.8.17