MythTV master
v2captureCardList.h
Go to the documentation of this file.
1
2// Program Name: captureCardList.h
3// Created : Sep. 21, 2011
4//
5// Copyright (c) 2011 Robert McNamara <rmcnamara@mythtv.org>
6//
7// Licensed under the GPL v2 or later, see COPYING for details
8//
10
11#ifndef V2CAPTURECARDLIST_H_
12#define V2CAPTURECARDLIST_H_
13
14#include <QString>
15#include <QVariantList>
16
18
19#include "v2captureCard.h"
20
21class V2CaptureCardList : public QObject
22{
23 Q_OBJECT
24 Q_CLASSINFO( "Version", "1.0" );
25 Q_CLASSINFO( "CaptureCards", "type=V2CaptureCard");
26
27 SERVICE_PROPERTY2( QVariantList, CaptureCards );
28
29 public:
30
31 Q_INVOKABLE V2CaptureCardList(QObject *parent = nullptr)
32 : QObject( parent )
33 {
34 }
35
36 void Copy( const V2CaptureCardList *src )
37 {
38 CopyListContents< V2CaptureCard >( this, m_CaptureCards, src->m_CaptureCards );
39 }
40
42 {
43 // We must make sure the object added to the QVariantList has
44 // a parent of 'this'
45
46 auto *pObject = new V2CaptureCard( this );
47 m_CaptureCards.append( QVariant::fromValue<QObject *>( pObject ));
48
49 return pObject;
50 }
51
52 private:
54};
55
57
58class V2CardTypeList : public QObject
59{
60 Q_OBJECT
61 Q_CLASSINFO( "Version", "1.0" );
62 Q_CLASSINFO( "CardTypes", "type=V2CardType");
63
64 SERVICE_PROPERTY2( QVariantList, CardTypes );
65
66 public:
67
68 Q_INVOKABLE V2CardTypeList(QObject *parent = nullptr)
69 : QObject( parent )
70 {
71 }
72
73 void Copy( const V2CardTypeList *src )
74 {
75 CopyListContents< V2CardTypeList >( this, m_CardTypes, src->m_CardTypes );
76 }
77
78 V2CardType *AddCardType(const QString &description, const QString &cardType)
79 {
80 // We must make sure the object added to the QVariantList has
81 // a parent of 'this'
82
83 auto *pObject = new V2CardType( this );
84 pObject->setCardType(cardType);
85 pObject->setDescription(description);
86 m_CardTypes.append( QVariant::fromValue<QObject *>( pObject ));
87
88 return pObject;
89 }
90
91 private:
93};
94
96
97class V2CaptureDeviceList : public QObject
98{
99 Q_OBJECT
100 Q_CLASSINFO( "Version", "1.0" );
101 Q_CLASSINFO( "CaptureDevices", "type=V2CaptureDevice");
102
103 SERVICE_PROPERTY2( QVariantList, CaptureDevices );
104
105 public:
106
107 Q_INVOKABLE V2CaptureDeviceList(QObject *parent = nullptr)
108 : QObject( parent )
109 {
110 }
111
112 void Copy( const V2CaptureDeviceList *src )
113 {
114 CopyListContents< V2CaptureDeviceList >( this, m_CaptureDevices, src->m_CaptureDevices );
115 }
116
118 {
119 // We must make sure the object added to the QVariantList has
120 // a parent of 'this'
121
122 auto *pObject = new V2CaptureDevice( this );
123 m_CaptureDevices.append( QVariant::fromValue<QObject *>( pObject ));
124 return pObject;
125 }
126
127 private:
129};
130
132
133
134class V2InputGroupList : public QObject
135{
136 Q_OBJECT
137 Q_CLASSINFO( "Version", "1.0" );
138 Q_CLASSINFO( "InputGroups", "type=V2InputGroup");
139
140 SERVICE_PROPERTY2( QVariantList, InputGroups );
141
142 public:
143
144 Q_INVOKABLE V2InputGroupList(QObject *parent = nullptr)
145 : QObject( parent )
146 {
147 }
148
149 void Copy( const V2InputGroupList *src )
150 {
151 CopyListContents< V2InputGroupList >( this, m_InputGroups,
152 src->m_InputGroups );
153 }
154
155 V2InputGroup *AddInputGroup(uint cardInputId, uint inputGroupId,
156 const QString &inputGroupName)
157 {
158 // We must make sure the object added to the QVariantList has
159 // a parent of 'this'
160
161 auto *pObject = new V2InputGroup( this );
162 pObject->setCardInputId(cardInputId);
163 pObject->setInputGroupId(inputGroupId);
164 pObject->setInputGroupName(inputGroupName);
165 m_InputGroups.append( QVariant::fromValue<QObject *>( pObject ));
166
167 return pObject;
168 }
169
170 private:
172};
173
175
176
177class V2DiseqcTreeList : public QObject
178{
179 Q_OBJECT
180 Q_CLASSINFO( "Version", "1.0" );
181 Q_CLASSINFO( "DiseqcTrees", "type=V2DiseqcTree");
182
183 SERVICE_PROPERTY2( QVariantList, DiseqcTrees );
184
185 public:
186
187 Q_INVOKABLE V2DiseqcTreeList(QObject *parent = nullptr)
188 : QObject( parent )
189 {
190 }
191
192 void Copy( const V2DiseqcTreeList *src )
193 {
194 CopyListContents< V2DiseqcTreeList >( this, m_DiseqcTrees, src->m_DiseqcTrees );
195 }
196
198 {
199 // We must make sure the object added to the QVariantList has
200 // a parent of 'this'
201
202 auto *pObject = new V2DiseqcTree( this );
203 m_DiseqcTrees.append( QVariant::fromValue<QObject *>( pObject ));
204 return pObject;
205 }
206
207 private:
209};
210
212
213class V2DiseqcConfigList : public QObject
214{
215 Q_OBJECT
216 Q_CLASSINFO( "Version", "1.0" );
217 Q_CLASSINFO( "DiseqcConfigs", "type=V2DiseqcConfig");
218
219 SERVICE_PROPERTY2( QVariantList, DiseqcConfigs );
220
221 public:
222
223 Q_INVOKABLE V2DiseqcConfigList(QObject *parent = nullptr)
224 : QObject( parent )
225 {
226 }
227
228 void Copy( const V2DiseqcConfigList *src )
229 {
230 CopyListContents< V2DiseqcConfigList >( this, m_DiseqcConfigs, src->m_DiseqcConfigs );
231 }
232
234 {
235 // We must make sure the object added to the QVariantList has
236 // a parent of 'this'
237
238 auto *pObject = new V2DiseqcConfig( this );
239 m_DiseqcConfigs.append( QVariant::fromValue<QObject *>( pObject ));
240 return pObject;
241 }
242
243 private:
245};
246
248
249
250
251#endif
Q_INVOKABLE V2CaptureCardList(QObject *parent=nullptr)
Q_DISABLE_COPY(V2CaptureCardList)
Q_CLASSINFO("CaptureCards", "type=V2CaptureCard")
Q_CLASSINFO("Version", "1.0")
SERVICE_PROPERTY2(QVariantList, CaptureCards)
V2CaptureCard * AddNewCaptureCard()
void Copy(const V2CaptureCardList *src)
Q_CLASSINFO("CaptureDevices", "type=V2CaptureDevice")
Q_DISABLE_COPY(V2CaptureDeviceList)
Q_INVOKABLE V2CaptureDeviceList(QObject *parent=nullptr)
void Copy(const V2CaptureDeviceList *src)
V2CaptureDevice * AddCaptureDevice()
Q_CLASSINFO("Version", "1.0")
SERVICE_PROPERTY2(QVariantList, CaptureDevices)
Q_DISABLE_COPY(V2CardTypeList)
Q_CLASSINFO("Version", "1.0")
V2CardType * AddCardType(const QString &description, const QString &cardType)
SERVICE_PROPERTY2(QVariantList, CardTypes)
Q_CLASSINFO("CardTypes", "type=V2CardType")
void Copy(const V2CardTypeList *src)
Q_INVOKABLE V2CardTypeList(QObject *parent=nullptr)
Q_CLASSINFO("Version", "1.0")
Q_INVOKABLE V2DiseqcConfigList(QObject *parent=nullptr)
SERVICE_PROPERTY2(QVariantList, DiseqcConfigs)
void Copy(const V2DiseqcConfigList *src)
V2DiseqcConfig * AddDiseqcConfig()
Q_CLASSINFO("DiseqcConfigs", "type=V2DiseqcConfig")
Q_DISABLE_COPY(V2DiseqcConfigList)
Q_INVOKABLE V2DiseqcTreeList(QObject *parent=nullptr)
void Copy(const V2DiseqcTreeList *src)
SERVICE_PROPERTY2(QVariantList, DiseqcTrees)
Q_CLASSINFO("DiseqcTrees", "type=V2DiseqcTree")
Q_CLASSINFO("Version", "1.0")
Q_DISABLE_COPY(V2DiseqcTreeList)
V2DiseqcTree * AddDiseqcTree()
Q_DISABLE_COPY(V2InputGroupList)
V2InputGroup * AddInputGroup(uint cardInputId, uint inputGroupId, const QString &inputGroupName)
Q_CLASSINFO("InputGroups", "type=V2InputGroup")
void Copy(const V2InputGroupList *src)
Q_INVOKABLE V2InputGroupList(QObject *parent=nullptr)
SERVICE_PROPERTY2(QVariantList, InputGroups)
Q_CLASSINFO("Version", "1.0")
unsigned int uint
Definition: freesurround.h:24
Q_DECLARE_METATYPE(std::chrono::seconds)