Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QtxActionMgr::XMLReader Class Reference

XML file reader. More...

#include <QtxActionMgr.h>

Inheritance diagram for QtxActionMgr::XMLReader:
Inheritance graph

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...
 

Detailed Description

This class is used to read files of XML format to create actions and fill an action manager with actions automatically.

Constructor & Destructor Documentation

QtxActionMgr::XMLReader::XMLReader ( const QString &  root,
const QString &  item,
const QString &  dir 
)
Parameters
rootroot XML tag name
itemmenu item XML tag name
dirresources directory (containing icons, etc)

References QtxActionMgr::Reader::setOption().

QtxActionMgr::XMLReader::~XMLReader ( )
virtual

Member Function Documentation

bool QtxActionMgr::XMLReader::isNodeSimilar ( const QDomNode &  node,
const QString &  pattern 
) const
protectedvirtual
Parameters
nodeXML file node
patternnode name pattern
Returns
true if node satisfies pattern
bool QtxActionMgr::XMLReader::read ( const QString &  fname,
Creator cr 
) const
virtual
Parameters
fnameXML file name
cractions creator
Returns
true on success and false in case of error

Implements QtxActionMgr::Reader.

References doc.

void QtxActionMgr::XMLReader::read ( const QDomNode &  parent_node,
const int  parent_id,
Creator cr 
) const
protectedvirtual
Parameters
parent_nodeparent XML file node
parent_idparent action ID
cractions creator

References QtxActionMgr::Creator::append().


The documentation for this class was generated from the following files: