MythTV  0.28pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
liveStreamInfoList.h
Go to the documentation of this file.
1 #ifndef LIVESTREAMINFOLIST_H_
2 #define LIVESTREAMINFOLIST_H_
3 
4 #include <QVariantList>
5 
6 #include "serviceexp.h"
7 #include "datacontracthelper.h"
8 
9 #include "liveStreamInfo.h"
10 
11 namespace DTC
12 {
13 
14 class SERVICE_PUBLIC LiveStreamInfoList : public QObject
15 {
16  Q_OBJECT
17  Q_CLASSINFO( "version", "1.0" );
18 
19  // Q_CLASSINFO Used to augment Metadata for properties.
20  // See datacontracthelper.h for details
21 
22  Q_CLASSINFO( "LiveStreamInfos", "type=DTC::LiveStreamInfo");
23 
24  Q_PROPERTY( QVariantList LiveStreamInfos READ LiveStreamInfos DESIGNABLE true )
25 
26  PROPERTYIMP_RO_REF( QVariantList, LiveStreamInfos )
27 
28  public:
29 
30  static inline void InitializeCustomTypes();
31 
32  public:
33 
34  LiveStreamInfoList(QObject *parent = 0)
35  : QObject( parent )
36  {
37  }
38 
40  {
41  Copy( src );
42  }
43 
44  void Copy( const LiveStreamInfoList &src )
45  {
46  CopyListContents< LiveStreamInfo >( this, m_LiveStreamInfos, src.m_LiveStreamInfos );
47  }
48 
50  {
51  // We must make sure the object added to the QVariantList has
52  // a parent of 'this'
53 
54  LiveStreamInfo *pObject = new LiveStreamInfo( this );
55  m_LiveStreamInfos.append( QVariant::fromValue<QObject *>( pObject ));
56 
57  return pObject;
58  }
59 
60 };
61 
62 } // namespace DTC
63 
65 Q_DECLARE_METATYPE( DTC::LiveStreamInfoList* )
66 
67 namespace DTC
68 {
69 inline void LiveStreamInfoList::InitializeCustomTypes()
70 {
71  qRegisterMetaType< LiveStreamInfoList >();
72  qRegisterMetaType< LiveStreamInfoList* >();
73 
74  LiveStreamInfo::InitializeCustomTypes();
75 }
76 }
77 
78 #endif
AllMusic * parent
LiveStreamInfoList(const LiveStreamInfoList &src)
void Copy(const LiveStreamInfoList &src)
LiveStreamInfo * AddNewLiveStreamInfo()
Q_DECLARE_METATYPE(DTC::LiveStreamInfoList) Q_DECLARE_METATYPE(DTC
src
Definition: minilzo.cpp:2074