XML file reader. More...
#include <QtxActionMgr.h>
Public Member Functions | |
XMLReader (const QString &, const QString &, const QString &) | |
Constructor. More... | |
virtual | ~XMLReader () |
Destructor. More... | |
virtual bool | read (const QString &, Creator &) const |
Read the file and fill and action manager with actions by using actions creator. More... | |
Public Member Functions inherited from QtxActionMgr::Reader | |
Reader () | |
Constructor. More... | |
virtual | ~Reader () |
Destructor. More... | |
QStringList | options () const |
Get the list of options. More... | |
QString | option (const QString &, const QString &=QString()) const |
Get option value. More... | |
void | setOption (const QString &, const QString &) |
Set option value. More... | |
Protected Member Functions | |
virtual void | read (const QDomNode &, const int, Creator &) const |
Read XML mode and create an item if requied. More... | |
virtual bool | isNodeSimilar (const QDomNode &, const QString &) const |
Check node name correspondance to some pattern. More... | |
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().
|
virtual |
|
protectedvirtual |
node | XML file node |
pattern | node name pattern |
true
if node satisfies pattern fname | XML file name |
cr | actions creator |
true
on success and false
in case of error Implements QtxActionMgr::Reader.
References doc.
|
protectedvirtual |
parent_node | parent XML file node |
parent_id | parent action ID |
cr | actions creator |
References QtxActionMgr::Creator::append().