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 LICENSE for details
8 //
10 
11 #ifndef SETTINGLIST_H_
12 #define SETTINGLIST_H_
13 
14 #include <QString>
15 #include <QVariantMap>
16 
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 )
35 
36  PROPERTYIMP_REF ( 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
DTC::SettingList
Definition: settingList.h:23
DTC::SettingList::Copy
void Copy(const SettingList *src)
Definition: settingList.h:48
SERVICE_PUBLIC
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
PROPERTYIMP_RO_REF
#define PROPERTYIMP_RO_REF(type, name)
Definition: datacontracthelper.h:114
datacontracthelper.h
serviceexp.h
DTC::SettingList::InitializeCustomTypes
static void InitializeCustomTypes()
Definition: settingList.h:58
DTC
Definition: datacontracthelper.h:123
PROPERTYIMP_REF
#define PROPERTYIMP_REF(type, name)
Definition: datacontracthelper.h:70