MythTV  master
settingList.h
Go to the documentation of this file.
1 // Program Name: settingList.h
3 // Created : Jan. 15, 2010
4 //
5 // Copyright (c) 2010 David Blain <dblain@mythtv.org>
6 //
7 // Licensed under the GPL v2 or later, see COPYING for details
8 //
10 
11 #ifndef SETTINGLIST_H_
12 #define SETTINGLIST_H_
13 
14 #include <QString>
15 #include <QVariantMap>
16 
17 #include "serviceexp.h"
18 #include "datacontracthelper.h"
19 
20 namespace DTC
21 {
22 
23 class SERVICE_PUBLIC SettingList : public QObject
24 {
25  Q_OBJECT
26  Q_CLASSINFO( "version" , "1.0" );
27 
28  // Q_CLASSINFO Used to augment Metadata for properties.
29  // See datacontracthelper.h for details
30 
31  Q_CLASSINFO( "Settings", "type=QString;name=String");
32 
33  Q_PROPERTY( QString HostName READ HostName WRITE setHostName )
34  Q_PROPERTY( QVariantMap Settings READ Settings DESIGNABLE true )
35 
36  PROPERTYIMP ( QString , HostName )
37  PROPERTYIMP_RO_REF( QVariantMap, Settings )
38 
39  public:
40 
41  static inline void InitializeCustomTypes();
42 
43  Q_INVOKABLE SettingList(QObject *parent = nullptr)
44  : QObject( parent )
45  {
46  }
47 
48  void Copy( const SettingList *src )
49  {
50  m_HostName = src->m_HostName;
51  m_Settings = src->m_Settings;
52  }
53 
54  private:
55  Q_DISABLE_COPY(SettingList);
56 };
57 
59 {
60  qRegisterMetaType< SettingList* >();
61 }
62 
63 } // namespace DTC
64 
65 #endif
VERBOSE_PREAMBLE Most true
Definition: verbosedefs.h:91
void Copy(const SettingList *src)
Definition: settingList.h:48
#define PROPERTYIMP(type, name)
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
#define PROPERTYIMP_RO_REF(type, name)
static void InitializeCustomTypes()
Definition: settingList.h:58