MythTV
master
libs
libmythservicecontracts
datacontracts
storageGroupDirList.h
Go to the documentation of this file.
1
#ifndef STORAGEGROUPDIRLIST_H_
2
#define STORAGEGROUPDIRLIST_H_
3
4
#include <QVariantList>
5
6
#include "
libmythservicecontracts/serviceexp.h
"
7
#include "
libmythservicecontracts/datacontracthelper.h
"
8
9
#include "
storageGroupDir.h
"
10
11
namespace
DTC
12
{
13
14
class
SERVICE_PUBLIC
StorageGroupDirList
:
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(
"StorageGroupDirs"
,
"type=DTC::StorageGroupDir"
);
23
24
Q_PROPERTY( QVariantList StorageGroupDirs READ StorageGroupDirs )
25
26
PROPERTYIMP_RO_REF
( QVariantList, StorageGroupDirs );
27
28
public
:
29
30
static
inline
void
InitializeCustomTypes();
31
32
Q_INVOKABLE
StorageGroupDirList
(QObject *parent =
nullptr
)
33
: QObject( parent )
34
{
35
}
36
37
void
Copy
(
const
StorageGroupDirList
*src )
38
{
39
CopyListContents< StorageGroupDir >(
this
, m_StorageGroupDirs, src->m_StorageGroupDirs );
40
}
41
42
StorageGroupDir
*
AddNewStorageGroupDir
()
43
{
44
// We must make sure the object added to the QVariantList has
45
// a parent of 'this'
46
47
auto
*pObject =
new
StorageGroupDir
(
this
);
48
m_StorageGroupDirs.append( QVariant::fromValue<QObject *>( pObject ));
49
50
return
pObject;
51
}
52
53
private
:
54
Q_DISABLE_COPY(
StorageGroupDirList
);
55
};
56
57
inline
void
StorageGroupDirList::InitializeCustomTypes
()
58
{
59
qRegisterMetaType< StorageGroupDirList* >();
60
61
StorageGroupDir::InitializeCustomTypes
();
62
}
63
64
}
// namespace DTC
65
66
#endif
DTC::StorageGroupDir::InitializeCustomTypes
static void InitializeCustomTypes()
Definition:
storageGroupDir.h:63
storageGroupDir.h
SERVICE_PUBLIC
#define SERVICE_PUBLIC
Definition:
serviceexp.h:9
DTC::StorageGroupDirList::InitializeCustomTypes
static void InitializeCustomTypes()
Definition:
storageGroupDirList.h:57
PROPERTYIMP_RO_REF
#define PROPERTYIMP_RO_REF(type, name)
Definition:
datacontracthelper.h:114
DTC::StorageGroupDir
Definition:
storageGroupDir.h:14
DTC::StorageGroupDirList
Definition:
storageGroupDirList.h:14
datacontracthelper.h
serviceexp.h
DTC::StorageGroupDirList::AddNewStorageGroupDir
StorageGroupDir * AddNewStorageGroupDir()
Definition:
storageGroupDirList.h:42
DTC::StorageGroupDirList::StorageGroupDirList
Q_INVOKABLE StorageGroupDirList(QObject *parent=nullptr)
Definition:
storageGroupDirList.h:32
DTC
Definition:
datacontracthelper.h:123
DTC::StorageGroupDirList::Copy
void Copy(const StorageGroupDirList *src)
Definition:
storageGroupDirList.h:37
Generated on Tue May 30 2023 03:19:35 for MythTV by
1.8.17