oopapidocs  2.0
docbookdoc.h
00001 #ifndef DOCBOOKDOC_H
00002 #define DOCBOOKDOC_H
00003 
00004 #include "docbook_export.h"
00005 #include <QString>
00006 #include <QDomDocument>
00007 #include <QDomElement>
00008 #include <QDomNode>
00009 //start id=typedef
00010 typedef QDomElement Element; /* Saves on typing, and is
00011 consistent with Java DOM. */
00012 //end
00013    
00018 class DOCBOOK_EXPORT DocbookDoc : public QDomDocument {
00019    public:
00020     DocbookDoc(QString title);
00021 
00024     Element title(QString title, Element parent = Element());
00025     
00027     Element bridgehead(QString title);
00028     
00029     Element orderedlist();
00030         
00031     
00034     Element chapter(QString title);
00035    
00038     Element xref(QString id) ;
00040     Element xrefP(QString id) ;
00041     
00044     Element section(QString title);
00045     
00047     Element appendix(QString title);
00048     
00050     Element bold(QString boldText);
00051 
00052     Element listitem();
00053     
00056     QString getTitle(Element el) const;
00057     
00060     Element formalpara(QString title, QString text);
00062     Element para(QString text);
00063     
00065     Element simplesect(QString titleStr) ;
00066     
00071     static void setRole(Element el, QString role); 
00072 
00073     Element currentParent; /* All new paragraphs go under this
00074     parent */
00075 
00076     Element currentPara;
00077     
00078     Element currentChapter; /* All new sections go under this */
00079     
00080     Element currentList; /* All new ListItems go under this */
00081 };
00082 
00083 inline Element& operator<<(Element& parent, QDomNode newChild) {
00084     parent.appendChild(newChild);
00085     return parent;
00086 }
00087 
00088 
00089 #endif        //  #ifndef DOCBOOKDOC_H
 All Classes Namespaces Functions Enumerations