00001 /*************************************************************************** 00002 pcontent.h - description 00003 ------------------- 00004 begin : Fri Jul 12 2002 00005 copyright : (C) 2002 by Ryan Rusaw 00006 email : rrusaw@sasktel.net 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 #ifndef PCONTENT_H 00018 #define PCONTENT_H 00019 00020 #include <qxml.h> 00021 #include <qobject.h> 00022 #include <qlist.h> 00023 00029 class pXmlNode : public QObject 00030 { 00031 00032 public: 00037 pXmlNode(); 00045 pXmlNode(pXmlNode *p, const QString &qName, const QXmlAttributes &attrib); 00049 ~pXmlNode(){}; 00053 QList<pXmlNode> children; 00058 QString &getNodeName(); 00063 void setNodeName(const QString &name); 00068 QString &getText(); 00073 void setText(const QString &t); 00078 pXmlNode *getParent(); 00083 void setParent(pXmlNode *node); 00088 QXmlAttributes &getA(); 00093 void setA(const QXmlAttributes &attr); 00100 pXmlNode *findFirstChildWithName(const QString &s, bool recurse = TRUE); 00107 pXmlNode *findLastChildWithName(const QString &s, bool recurse = TRUE); 00116 pXmlNode *findChildWithNameAndValue(const QString &s, const QString &qName, const QString &val, bool recurse = TRUE); 00117 00118 private: 00122 QString *text; 00126 QString *nodename; 00130 pXmlNode *parent; 00134 QXmlAttributes a; 00135 00136 }; 00137 00143 class pImage : public QObject 00144 { 00145 00146 public: 00150 pImage(); 00154 ~pImage(){}; 00158 QString filename; 00162 QImage *image; 00163 }; 00164 00165 #endif 00166 00167 00168