MythTV
master
programs
mythbackend
servicesv2
v2frontendList.h
Go to the documentation of this file.
1
// Program Name: frontendList.h
3
// Created : May. 30, 2014
4
//
5
// Copyright (c) 2014 Stuart Morgan <smorgan@mythtv.org>
6
//
7
// Licensed under the GPL v2 or later, see COPYING for details
8
//
10
11
#ifndef V2FRONTENDLIST_H_
12
#define V2FRONTENDLIST_H_
13
14
#include "
libmythbase/http/mythhttpservice.h
"
15
#include "
v2frontend.h
"
16
17
18
class
V2FrontendList
:
public
QObject
19
{
20
Q_OBJECT
21
Q_CLASSINFO
(
"version"
,
"1.0"
);
22
23
// Q_CLASSINFO Used to augment Metadata for properties.
24
// See datacontracthelper.h for details
25
26
Q_CLASSINFO
(
"Frontends"
,
"type=V2Frontend"
);
27
28
SERVICE_PROPERTY2
( QVariantList, Frontends );
29
30
public
:
31
32
Q_INVOKABLE
V2FrontendList
(QObject *parent =
nullptr
)
33
: QObject( parent )
34
{
35
}
36
37
void
Copy
(
const
V2FrontendList
*src )
38
{
39
CopyListContents< V2Frontend >(
this
, m_Frontends, src->m_Frontends );
40
}
41
42
// This is needed so that common routines can get a non-const m_Encoders
43
// reference
44
QVariantList&
GetFrontends
() {
return
m_Frontends;}
45
V2Frontend
*
AddNewFrontend
()
46
{
47
// We must make sure the object added to the QVariantList has
48
// a parent of 'this'
49
50
auto
*pObject =
new
V2Frontend
(
this
);
51
m_Frontends.append( QVariant::fromValue<QObject *>( pObject ));
52
53
return
pObject;
54
}
55
56
private
:
57
Q_DISABLE_COPY
(
V2FrontendList
);
58
};
59
60
Q_DECLARE_METATYPE
(
V2FrontendList
*)
61
62
#endif
V2FrontendList::V2FrontendList
Q_INVOKABLE V2FrontendList(QObject *parent=nullptr)
Definition:
v2frontendList.h:32
V2FrontendList::AddNewFrontend
V2Frontend * AddNewFrontend()
Definition:
v2frontendList.h:45
V2Frontend
Definition:
v2frontend.h:18
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(StandardSetting *)
V2FrontendList::Copy
void Copy(const V2FrontendList *src)
Definition:
v2frontendList.h:37
mythhttpservice.h
V2FrontendList::Q_CLASSINFO
Q_CLASSINFO("version", "1.0")
V2FrontendList::SERVICE_PROPERTY2
SERVICE_PROPERTY2(QVariantList, Frontends)
v2frontend.h
V2FrontendList
Definition:
v2frontendList.h:18
V2FrontendList::Q_DISABLE_COPY
Q_DISABLE_COPY(V2FrontendList)
V2FrontendList::GetFrontends
QVariantList & GetFrontends()
Definition:
v2frontendList.h:44
Generated on Thu Jun 1 2023 03:21:36 for MythTV by
1.8.17