#include <docbookwalker.h>
Collaboration diagram for DocbookWalker:

Public Member Functions | ||||
| DocbookWalker (DocbookDoc doc) | ||||
| virtual QDomDocument | transform () | |||
| Traverses whole tree. | ||||
| virtual | ~DocbookWalker () | |||
| virtual int | visited () const | |||
| ||||
Protected Member Functions | ||||
| virtual bool | visit (int depth, Element e) | |||
| Visits the current Element. | ||||
| QString | currentHeading () const | |||
| ||||
| QString | heading (Element sect) const | |||
| ||||
| QDomNode | walkTree (int depth, QDomNode current) | |||
| void | newChapter (Element e) | |||
| void | newSection (Element e, int depth) | |||
| void | newAppendix (Element e) | |||
| Element & | currentChapter () | |||
| Element & | currentSection () | |||
Protected Attributes | ||||
| DocbookDoc | m_document | |||
Keeps track of section::s and chapter::s.
Definition at line 12 of file docbookwalker.h.
| bool DocbookWalker::visit | ( | int | depth, | |
| Element | e | |||
| ) | [protected, virtual] |
Visits the current Element.
Handles elements like <chapter> <section> nd <appendix> for numbering purposes.
Called from walkTree from transform. Not to be called pubclicly.
You can override this, handle specific elements, and call the base class version for elements you do not handle.
| e | the Element to visit | |
| depth | the current depth of the tree |
Definition at line 63 of file docbookwalker.cpp.
References newAppendix(), newChapter(), and newSection().
Referenced by walkTree().
Here is the call graph for this function:

| QString DocbookWalker::heading | ( | Element | sect | ) | const [protected] |
| sect | a chapter, section or appendix |
Definition at line 18 of file docbookwalker.cpp.
References DocbookDoc::getTitle(), and m_document.
Referenced by currentHeading().
Here is the call graph for this function:

1.5.1