Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 AQSLayout_p.h 00003 ------------------- 00004 begin : 07/02/2011 00005 copyright : (C) 2003-2011 by InfoSiAL S.L. 00006 email : mail@infosial.com 00007 ***************************************************************************/ 00008 /*************************************************************************** 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; version 2 of the License. * 00012 ***************************************************************************/ 00013 /*************************************************************************** 00014 Este programa es software libre. Puede redistribuirlo y/o modificarlo 00015 bajo los términos de la Licencia Pública General de GNU en su 00016 versión 2, publicada por la Free Software Foundation. 00017 ***************************************************************************/ 00018 00019 #ifndef AQSLAYOUT_P_H_ 00020 #define AQSLAYOUT_P_H_ 00021 00022 #include "AQSObject_p.h" 00023 #include <qlayout.h> 00024 00025 class AQSLayout : public AQSObject 00026 { 00027 Q_OBJECT 00028 00029 AQ_DECLARE_AQS_OBJECT(Layout, Object); 00030 00031 public slots: 00032 virtual QDomNode *toXml(bool includeComplexTypes = false) { 00033 AQSObject::toXml(includeComplexTypes); 00034 00035 if (!o_) 00036 return &xml_; 00037 00038 QLayoutIterator it = o_->iterator(); 00039 QLayoutItem *child; 00040 while ((child = it.current()) != 0) { 00041 QDomElement e(xml_.createElement("item")); 00042 00043 if (child->widget()) { 00044 QWidget *w = child->widget(); 00045 e.setAttribute("type", "widget"); 00046 e.setAttribute("class", w->className()); 00047 e.setAttribute("name", w->name()); 00048 } else if (child->layout()) { 00049 QLayout *l = child->layout(); 00050 e.setAttribute("type", "layout"); 00051 e.setAttribute("class", l->className()); 00052 e.setAttribute("name", l->name()); 00053 } else 00054 e.setAttribute("type", "spacer"); 00055 00056 xml_.firstChild().appendChild(e); 00057 ++it; 00058 } 00059 00060 return &xml_; 00061 } 00062 00063 //@AQ_BEGIN_DEF_PUB_SLOTS@ 00064 //@AQ_END_DEF_PUB_SLOTS@ 00065 }; 00066 00067 //@AQ_BEGIN_IMP_PUB_SLOTS@ 00068 //@AQ_END_IMP_PUB_SLOTS@ 00069 00070 #endif /* AQSLAYOUT_P_H_ */ 00071 // @AQSOBJECT@