Version: 9.12.0
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

XML file reader.

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

Constructor & Destructor Documentation

◆ XMLReader()

QtxActionMgr::XMLReader::XMLReader ( const QString &  root,
const QString &  item,
const QString &  dir 
)

Constructor.

Parameters
rootroot XML tag name
itemmenu item XML tag name
dirresources directory (containing icons, etc)

References QtxActionMgr::Reader::setOption().

◆ ~XMLReader()

QtxActionMgr::XMLReader::~XMLReader ( )
virtual

Destructor.

Member Function Documentation

◆ isNodeSimilar()

bool QtxActionMgr::XMLReader::isNodeSimilar ( const QDomNode &  node,
const QString &  pattern 
) const
protectedvirtual

Check node name correspondance to some pattern.

Parameters
nodeXML file node
patternnode name pattern
Returns
true if node satisfies pattern

◆ read() [1/2]

void QtxActionMgr::XMLReader::read ( const QDomNode &  parent_node,
const int  parent_id,
Creator cr 
) const
protectedvirtual

Read XML mode and create an item if requied.

Parameters
parent_nodeparent XML file node
parent_idparent action ID
cractions creator

References QtxActionMgr::Creator::append().

◆ read() [2/2]

bool QtxActionMgr::XMLReader::read ( const QString &  fname,
Creator cr 
) const
virtual

Read the file and fill and action manager with actions by using actions creator.

Parameters
fnameXML file name
cractions creator
Returns
true on success and false in case of error

Implements QtxActionMgr::Reader.


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