MythTV
master
programs
mythbackend
servicesv2
v2inputList.h
Go to the documentation of this file.
1
// Program Name: inputList.h
3
// Created : Nov. 20, 2013
4
//
5
// Copyright (c) 2013 Stuart Morgan <smorgan@mythtv.org>
6
//
7
// Licensed under the GPL v2 or later, see COPYING for details
8
//
10
11
#ifndef V2INPUTLIST_H_
12
#define V2INPUTLIST_H_
13
14
#include <QVariantList>
15
16
#include "
libmythbase/http/mythhttpservice.h
"
17
18
#include "
v2input.h
"
19
20
class
V2InputList
:
public
QObject
21
{
22
Q_OBJECT
23
Q_CLASSINFO
(
"Version"
,
"1.0"
);
24
Q_CLASSINFO
(
"Inputs"
,
"type=V2Input"
);
25
26
SERVICE_PROPERTY2
( QVariantList, Inputs );
27
28
public
:
29
30
Q_INVOKABLE
V2InputList
(QObject *parent =
nullptr
)
31
: QObject( parent )
32
{
33
}
34
35
void
Copy
(
const
V2InputList
*src )
36
{
37
CopyListContents< V2Input >(
this
, m_Inputs, src->m_Inputs );
38
}
39
40
V2Input
*
AddNewInput
()
41
{
42
// We must make sure the object added to the QVariantList has
43
// a parent of 'this'
44
45
auto
*pObject =
new
V2Input
(
this
);
46
m_Inputs.append( QVariant::fromValue<QObject *>( pObject ));
47
48
return
pObject;
49
}
50
51
private
:
52
Q_DISABLE_COPY
(
V2InputList
);
53
};
54
55
Q_DECLARE_METATYPE
(
V2InputList
*)
56
57
#endif
V2InputList::Q_CLASSINFO
Q_CLASSINFO("Version", "1.0")
V2InputList
Definition:
v2inputList.h:20
V2InputList::AddNewInput
V2Input * AddNewInput()
Definition:
v2inputList.h:40
V2InputList::SERVICE_PROPERTY2
SERVICE_PROPERTY2(QVariantList, Inputs)
V2InputList::Q_DISABLE_COPY
Q_DISABLE_COPY(V2InputList)
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(StandardSetting *)
V2InputList::V2InputList
Q_INVOKABLE V2InputList(QObject *parent=nullptr)
Definition:
v2inputList.h:30
mythhttpservice.h
v2input.h
V2InputList::Copy
void Copy(const V2InputList *src)
Definition:
v2inputList.h:35
V2Input
Definition:
v2input.h:20
Generated on Sat May 27 2023 03:21:55 for MythTV by
1.8.17