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