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 
9 class 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
v2storageGroupDir.h
V2StorageGroupDirList::SERVICE_PROPERTY2
SERVICE_PROPERTY2(QVariantList, StorageGroupDirs)
V2StorageGroupDirList::Q_DISABLE_COPY
Q_DISABLE_COPY(V2StorageGroupDirList)
V2StorageGroupDirList::AddNewStorageGroupDir
V2StorageGroupDir * AddNewStorageGroupDir()
Definition: v2storageGroupDirList.h:30
V2StorageGroupDirList::Q_CLASSINFO
Q_CLASSINFO("version", "1.0")
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(StandardSetting *)
V2StorageGroupDirList::V2StorageGroupDirList
Q_INVOKABLE V2StorageGroupDirList(QObject *parent=nullptr)
Definition: v2storageGroupDirList.h:20
V2StorageGroupDirList
Definition: v2storageGroupDirList.h:9
mythhttpservice.h
V2StorageGroupDirList::Copy
void Copy(const V2StorageGroupDirList *src)
Definition: v2storageGroupDirList.h:25
V2StorageGroupDir
Definition: v2storageGroupDir.h:6