MythTV master
v2storageGroupDirList.h
Go to the documentation of this file.
1#ifndef V2STORAGEGROUPDIRLIST_H_
2#define V2STORAGEGROUPDIRLIST_H_
3
4#include <QVariantList>
5
7#include "v2storageGroupDir.h"
8
9class V2StorageGroupDirList : public QObject
10{
11 Q_OBJECT
12 Q_CLASSINFO( "version", "1.0" );
13
14 Q_CLASSINFO( "StorageGroupDirs", "type=V2StorageGroupDir");
15
16 SERVICE_PROPERTY2( QVariantList, StorageGroupDirs );
17
18 public:
19
20 Q_INVOKABLE V2StorageGroupDirList(QObject *parent = nullptr)
21 : QObject( parent )
22 {
23 }
24
25 void Copy( const V2StorageGroupDirList *src )
26 {
27 CopyListContents< V2StorageGroupDir >( this, m_StorageGroupDirs, src->m_StorageGroupDirs );
28 }
29
31 {
32 // We must make sure the object added to the QVariantList has
33 // a parent of 'this'
34
35 auto *pObject = new V2StorageGroupDir( this );
36 m_StorageGroupDirs.append( QVariant::fromValue<QObject *>( pObject ));
37
38 return pObject;
39 }
40
41 private:
43};
44
46
47#endif
Q_CLASSINFO("version", "1.0")
void Copy(const V2StorageGroupDirList *src)
Q_DISABLE_COPY(V2StorageGroupDirList)
SERVICE_PROPERTY2(QVariantList, StorageGroupDirs)
V2StorageGroupDir * AddNewStorageGroupDir()
Q_CLASSINFO("StorageGroupDirs", "type=V2StorageGroupDir")
Q_INVOKABLE V2StorageGroupDirList(QObject *parent=nullptr)
Q_DECLARE_METATYPE(std::chrono::seconds)