00001 #ifndef VIDEOSOURCELIST_H_
00002 #define VIDEOSOURCELIST_H_
00003
00004 #include <QVariantList>
00005 #include <QDateTime>
00006
00007 #include "serviceexp.h"
00008 #include "datacontracthelper.h"
00009
00010 #include "videoSource.h"
00011
00012 namespace DTC
00013 {
00014
00015 class SERVICE_PUBLIC VideoSourceList : public QObject
00016 {
00017 Q_OBJECT
00018 Q_CLASSINFO( "version", "1.0" );
00019
00020
00021
00022
00023 Q_CLASSINFO( "VideoSources", "type=DTC::VideoSource");
00024 Q_CLASSINFO( "AsOf" , "transient=true" );
00025
00026 Q_PROPERTY( QDateTime AsOf READ AsOf WRITE setAsOf )
00027 Q_PROPERTY( QString Version READ Version WRITE setVersion )
00028 Q_PROPERTY( QString ProtoVer READ ProtoVer WRITE setProtoVer )
00029
00030 Q_PROPERTY( QVariantList VideoSources READ VideoSources DESIGNABLE true )
00031
00032 PROPERTYIMP ( QDateTime , AsOf )
00033 PROPERTYIMP ( QString , Version )
00034 PROPERTYIMP ( QString , ProtoVer )
00035
00036 PROPERTYIMP_RO_REF( QVariantList, VideoSources )
00037
00038 public:
00039
00040 static void InitializeCustomTypes()
00041 {
00042 qRegisterMetaType< VideoSourceList >();
00043 qRegisterMetaType< VideoSourceList* >();
00044
00045 VideoSource::InitializeCustomTypes();
00046 }
00047
00048 public:
00049
00050 VideoSourceList(QObject *parent = 0)
00051 : QObject( parent )
00052 {
00053 }
00054
00055 VideoSourceList( const VideoSourceList &src )
00056 {
00057 Copy( src );
00058 }
00059
00060 void Copy( const VideoSourceList &src )
00061 {
00062 m_AsOf = src.m_AsOf ;
00063 m_Version = src.m_Version ;
00064 m_ProtoVer = src.m_ProtoVer ;
00065
00066 CopyListContents< VideoSource >( this, m_VideoSources, src.m_VideoSources );
00067 }
00068
00069 VideoSource *AddNewVideoSource()
00070 {
00071
00072
00073
00074 VideoSource *pObject = new VideoSource( this );
00075 m_VideoSources.append( QVariant::fromValue<QObject *>( pObject ));
00076
00077 return pObject;
00078 }
00079
00080 };
00081
00082 }
00083
00084 Q_DECLARE_METATYPE( DTC::VideoSourceList )
00085 Q_DECLARE_METATYPE( DTC::VideoSourceList* )
00086
00087 #endif