MythTV
master
mythtv
programs
mythbackend
servicesv2
v2systemEventList.h
Go to the documentation of this file.
1
#ifndef V2SYSTEMEVENTLIST_H_
2
#define V2SYSTEMEVENTLIST_H_
3
4
#include <QVariantList>
5
6
#include "
libmythbase/http/mythhttpservice.h
"
7
8
class
V2SystemEvent
:
public
QObject
9
{
10
Q_OBJECT
11
Q_CLASSINFO
(
"Version"
,
"1.0"
);
12
13
SERVICE_PROPERTY2
( QString , Key )
14
SERVICE_PROPERTY2
( QString , LocalizedName )
15
SERVICE_PROPERTY2
( QString , Value )
16
17
public
:
18
Q_INVOKABLE
V2SystemEvent
(QObject *parent =
nullptr
)
19
: QObject( parent )
20
{
21
}
22
23
private
:
24
Q_DISABLE_COPY(
V2SystemEvent
)
25
};
26
27
Q_DECLARE_METATYPE
(
V2SystemEvent
*)
28
29
30
class
V2SystemEventList
: public QObject
31
{
32
Q_OBJECT
33
Q_CLASSINFO(
"version"
,
"1.0"
);
34
35
Q_CLASSINFO(
"SystemEvents"
,
"type=V2SystemEvent"
);
36
37
SERVICE_PROPERTY2
( QVariantList, SystemEvents );
38
39
public
:
40
41
Q_INVOKABLE
V2SystemEventList
(QObject *parent =
nullptr
)
42
: QObject( parent )
43
{
44
}
45
46
V2SystemEvent
*
AddNewSystemEvent
()
47
{
48
// We must make sure the object added to the QVariantList has
49
// a parent of 'this'
50
51
auto
*pObject =
new
V2SystemEvent
(
this
);
52
m_SystemEvents.append( QVariant::fromValue<QObject *>( pObject ));
53
54
return
pObject;
55
}
56
57
private
:
58
Q_DISABLE_COPY(
V2SystemEventList
);
59
};
60
61
Q_DECLARE_METATYPE
(
V2SystemEventList
*)
62
63
#endif //V2SYSTEMEVENTLIST_H_
V2SystemEvent::V2SystemEvent
Q_INVOKABLE V2SystemEvent(QObject *parent=nullptr)
Definition:
v2systemEventList.h:18
V2SystemEvent::Q_CLASSINFO
Q_CLASSINFO("Version", "1.0")
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(std::chrono::seconds)
SERVICE_PROPERTY2
#define SERVICE_PROPERTY2(Type, Name)
Definition:
mythhttpservice.h:72
V2SystemEventList::AddNewSystemEvent
V2SystemEvent * AddNewSystemEvent()
Definition:
v2systemEventList.h:46
V2SystemEvent
Definition:
v2systemEventList.h:8
V2SystemEventList::V2SystemEventList
Q_INVOKABLE V2SystemEventList(QObject *parent=nullptr)
Definition:
v2systemEventList.h:41
mythhttpservice.h
V2SystemEventList
Definition:
v2systemEventList.h:30
Generated on Wed Feb 26 2025 03:18:04 for MythTV by
1.8.17