MythTV  master
input.h
Go to the documentation of this file.
1 // Program Name: input.h
3 // Created : Nov. 20, 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 INPUT_H_
12 #define INPUT_H_
13 
14 #include <QString>
15 
16 #include "serviceexp.h"
17 #include "datacontracthelper.h"
18 
19 namespace DTC
20 {
21 
23 
24 class SERVICE_PUBLIC Input : public QObject
25 {
26  Q_OBJECT
27  Q_CLASSINFO( "version" , "1.0" );
28 
29  Q_PROPERTY( uint Id READ Id WRITE setId )
30  Q_PROPERTY( uint CardId READ CardId WRITE setCardId )
31  Q_PROPERTY( uint SourceId READ SourceId WRITE setSourceId )
32  Q_PROPERTY( QString InputName READ InputName WRITE setInputName )
33  Q_PROPERTY( QString DisplayName READ DisplayName WRITE setDisplayName )
34 // Q_PROPERTY( QString StartChan READ StartChan WRITE setStartChan )
35  Q_PROPERTY( bool QuickTune READ QuickTune WRITE setQuickTune )
36  Q_PROPERTY( int RecPriority READ RecPriority WRITE setRecPriority )
37  Q_PROPERTY( int ScheduleOrder READ ScheduleOrder WRITE setScheduleOrder )
38  Q_PROPERTY( int LiveTVOrder READ LiveTVOrder WRITE setLiveTVOrder )
39 
40  PROPERTYIMP ( uint , Id )
41  PROPERTYIMP ( uint , CardId )
42  PROPERTYIMP ( uint , SourceId )
43  PROPERTYIMP ( QString , InputName )
44  PROPERTYIMP ( QString , DisplayName )
45 // PROPERTYIMP ( QString , StartChan )
46  PROPERTYIMP ( bool , QuickTune )
47  PROPERTYIMP ( uint , RecPriority )
50 
51  public:
52 
53  static inline void InitializeCustomTypes();
54 
55  Q_INVOKABLE Input(QObject *parent = nullptr)
56  : QObject ( parent ),
57  m_Id ( 0 ),
58  m_CardId ( 0 ),
59  m_SourceId ( 0 ),
60  m_QuickTune ( false ),
61  m_RecPriority ( 0 ),
62  m_ScheduleOrder ( 0 ),
63  m_LiveTVOrder ( 0 )
64  {
65  }
66 
67  void Copy( const Input *src )
68  {
69  m_Id = src->m_Id;
70  m_CardId = src->m_CardId;
71  m_SourceId = src->m_SourceId;
72  m_InputName = src->m_InputName;
73  m_DisplayName = src->m_DisplayName;
74 // m_StartChan = src->m_StartChan;
75  m_QuickTune = src->m_QuickTune;
76  m_RecPriority = src->m_RecPriority;
77  m_ScheduleOrder = src->m_ScheduleOrder;
78  m_LiveTVOrder = src->m_LiveTVOrder;
79  }
80 
81  private:
82  Q_DISABLE_COPY(Input);
83 };
84 
86 {
87  qRegisterMetaType< Input* >();
88 }
89 
90 } // namespace DTC
91 
92 #endif
void Copy(const Input *src)
Definition: input.h:67
#define PROPERTYIMP(type, name)
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:85
unsigned int uint
Definition: compat.h:140
static void InitializeCustomTypes()
Definition: input.h:85