XML file reader. More...
#include <QtxActionMgr.h>

Public Member Functions | |
| XMLReader (const QString &, const QString &, const QString &) | |
| Constructor. | |
| virtual | ~XMLReader () |
| Destructor. | |
| virtual bool | read (const QString &, Creator &) const |
| Read the file and fill and action manager with actions by using actions creator. | |
| QStringList | options () const |
| Get the list of options. | |
| QString | option (const QString &, const QString &=QString()) const |
| Get option value. | |
| void | setOption (const QString &, const QString &) |
| Set option value. | |
Protected Member Functions | |
| virtual void | read (const QDomNode &, const int, Creator &) const |
| Read XML mode and create an item if requied. | |
| virtual bool | isNodeSimilar (const QDomNode &, const QString &) const |
| Check node name correspondance to some pattern. | |
This class is used to read files of XML format to create actions and fill an action manager with actions automatically.
| QtxActionMgr.XMLReader::XMLReader | ( | const QString & | root, |
| const QString & | item, | ||
| const QString & | dir | ||
| ) |
| root | root XML tag name |
| item | menu item XML tag name |
| dir | resources directory (containing icons, etc) |
References QtxActionMgr.Reader.setOption().
| QtxActionMgr.XMLReader::~XMLReader | ( | ) | [virtual] |
| bool QtxActionMgr.XMLReader::read | ( | const QString & | fname, |
| Creator & | cr | ||
| ) | const [virtual] |
| fname | XML file name |
| cr | actions creator |
true on success and false in case of error Implements QtxActionMgr.Reader.
| void QtxActionMgr.XMLReader::read | ( | const QDomNode & | parent_node, |
| const int | parent_id, | ||
| Creator & | cr | ||
| ) | const [protected, virtual] |
| parent_node | parent XML file node |
| parent_id | parent action ID |
| cr | actions creator |
References test_table.a, and QtxActionMgr.Creator.append().
| bool QtxActionMgr.XMLReader::isNodeSimilar | ( | const QDomNode & | node, |
| const QString & | pattern | ||
| ) | const [protected, virtual] |
| node | XML file node |
| pattern | node name pattern |
true if node satisfies pattern References test_table.a.
| QStringList QtxActionMgr.Reader::options | ( | ) | const [inherited] |
| QString QtxActionMgr.Reader::option | ( | const QString & | name, |
| const QString & | def = QString() |
||
| ) | const [inherited] |
If there is no such option the default value (def) is returned.
| name | option name |
| def | default option value |
| void QtxActionMgr.Reader::setOption | ( | const QString & | name, |
| const QString & | value | ||
| ) | [inherited] |
| name | option name |
| value | new option value |