From: konrad Date: Sun, 22 Feb 2009 17:56:31 +0000 (+0000) Subject: completed WObjects for Qt X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=16d043da543ee82e6c9706699feb5b2f27fe35b5;p=web%2Fkonrad%2Fsmoke.git completed WObjects for Qt git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@275 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- diff --git a/src/wbase/WObject.h b/src/wbase/WObject.h index 6e57f15..d10cbc6 100644 --- a/src/wbase/WObject.h +++ b/src/wbase/WObject.h @@ -20,6 +20,7 @@ #include "exception.h" class QDomElement; +class QDomDocument; class WObject:public QObject { diff --git a/wob/order.wolf b/wob/order.wolf index 8b2c486..fbcc7b7 100644 --- a/wob/order.wolf +++ b/wob/order.wolf @@ -122,6 +122,9 @@ + + voucherid value price status + voucherid value price status diff --git a/woc/qtout.cpp b/woc/qtout.cpp index 21390de..914f350 100644 --- a/woc/qtout.cpp +++ b/woc/qtout.cpp @@ -60,7 +60,8 @@ static const QByteArray SRCSTART= "//AUTOMATICALLY GENERATED FILE\n" "#include \"%.h\"\n" "#include \n" - "#include \n"; + "#include \n" + "#include \n"; //end section of all source files static const QByteArray SRCEND="\n//END OF FILE\n"; @@ -102,7 +103,7 @@ void WocQtClientOut::newClass(const WocClass&cls) classProperties(cls,hdr,src); //serializer - classSerializers(cls,hdr,src); + classSerializers(cls,hdr,src,cna); //deserializer (constructor) classDeserializer(cls,hdr,src,cna); @@ -298,9 +299,83 @@ void WocQtClientOut::classDeserializer(const WocClass&cls,QFile&hdr,QFile&src,QS src.write(scd.toAscii()); } -void WocQtClientOut::classSerializers(const WocClass&cls,QFile&hdr,QFile&src) +void WocQtClientOut::classSerializers(const WocClass&cls,QFile&hdr,QFile&src,QString cn) { - //TODO: implement + QStringList k=cls.serializers(); + if(k.size()==0)return; + QString hcd=" public:\n"; + QString scd; + for(int i=0;i1)var=pv[1]; + //is it a list + if(cls.propertyIsList(prop)){ + scd+="\tfor(int i=0;i