MythTV
master
programs
mythbackend
servicesv2
v2countryList.h
Go to the documentation of this file.
1
#ifndef V2COUNTRYLIST_H_
2
#define V2COUNTRYLIST_H_
3
4
#include <QVariantList>
5
6
#include "
libmythbase/http/mythhttpservice.h
"
7
#include "
v2country.h
"
8
9
class
V2CountryList
:
public
QObject
10
{
11
Q_OBJECT
12
Q_CLASSINFO
(
"version"
,
"1.0"
);
13
14
Q_CLASSINFO
(
"Countries"
,
"type=V2Country"
);
15
16
SERVICE_PROPERTY2
( QVariantList, Countries );
17
18
public
:
19
20
Q_INVOKABLE
V2CountryList
(QObject *parent =
nullptr
)
21
: QObject( parent )
22
{
23
}
24
25
void
Copy
(
const
V2CountryList
*src )
26
{
27
CopyListContents< V2Country >(
this
, m_Countries, src->m_Countries );
28
}
29
30
V2Country
*
AddNewCountry
()
31
{
32
// We must make sure the object added to the QVariantList has
33
// a parent of 'this'
34
35
auto
*pObject =
new
V2Country
(
this
);
36
m_Countries.append( QVariant::fromValue<QObject *>( pObject ));
37
38
return
pObject;
39
}
40
41
private
:
42
Q_DISABLE_COPY
(
V2CountryList
);
43
};
44
45
Q_DECLARE_METATYPE
(
V2CountryList
*)
46
47
#endif
V2CountryList::Q_DISABLE_COPY
Q_DISABLE_COPY(V2CountryList)
V2CountryList::V2CountryList
Q_INVOKABLE V2CountryList(QObject *parent=nullptr)
Definition:
v2countryList.h:20
V2CountryList::Copy
void Copy(const V2CountryList *src)
Definition:
v2countryList.h:25
V2CountryList
Definition:
v2countryList.h:9
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(StandardSetting *)
V2CountryList::SERVICE_PROPERTY2
SERVICE_PROPERTY2(QVariantList, Countries)
V2Country
Definition:
v2country.h:6
mythhttpservice.h
V2CountryList::AddNewCountry
V2Country * AddNewCountry()
Definition:
v2countryList.h:30
v2country.h
V2CountryList::Q_CLASSINFO
Q_CLASSINFO("version", "1.0")
Generated on Wed Dec 6 2023 03:20:22 for MythTV by
1.8.17