MythTV  master
channelGroup.h
Go to the documentation of this file.
1 // Program Name: channelGroup.h
3 // Created : Nov. 15, 2013
4 //
5 // Copyright (c) 2013 Stuart Morgan <smorgan@mythtv.org>
6 //
7 // Licensed under the GPL v2 or later, see COPYING for details
8 //
10 
11 #ifndef DTCCHANNELGROUP_H_
12 #define DTCCHANNELGROUP_H_
13 
14 #include <QObject>
15 #include <QString>
16 
17 #include "serviceexp.h"
18 #include "datacontracthelper.h"
19 
20 namespace DTC
21 {
22 
23 class SERVICE_PUBLIC ChannelGroup : public QObject
24 {
25  Q_OBJECT
26  Q_CLASSINFO( "version", "0.99" );
27 
28  // Q_CLASSINFO Used to augment Metadata for properties.
29  // See datacontracthelper.h for details
30 
31  Q_PROPERTY( uint GroupId READ GroupId WRITE setGroupId )
32  Q_PROPERTY( QString Name READ Name WRITE setName )
33  Q_PROPERTY( QString Password READ Password WRITE setPassword )
34 
35  PROPERTYIMP ( uint , GroupId )
36  PROPERTYIMP ( QString , Name )
37  PROPERTYIMP ( QString , Password );
38 
39  public:
40 
41  static void InitializeCustomTypes();
42 
43  Q_INVOKABLE ChannelGroup(QObject *parent = nullptr)
44  : QObject ( parent ),
45  m_GroupId ( 0 )
46  {
47  }
48 
49  void Copy( const ChannelGroup *src )
50  {
51  m_GroupId = src->m_GroupId ;
52  m_Name = src->m_Name ;
53  m_Password = src->m_Password ;
54  }
55 
56  private:
57  Q_DISABLE_COPY(ChannelGroup);
58 };
59 
61 {
62  qRegisterMetaType< ChannelGroup* >();
63 }
64 
65 }
66 
67 #endif
unsigned int uint
Definition: compat.h:140
#define PROPERTYIMP(type, name)
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
void Copy(const ChannelGroup *src)
Definition: channelGroup.h:49
static void InitializeCustomTypes()
Definition: channelGroup.h:60
static StandardSetting * Password(bool enabled)
Setting for changing password.