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