Mapping file reading class. More...
#include <xmlmapreader.h>

Public Member Functions | |
| XMLMapReader (KockpitMap *kmap, QObject *parent=0) | |
| Constructor. | |
| virtual | ~XMLMapReader () |
| Destructor. | |
| bool | readFile (const QString &fileName) |
| Read file. | |
Protected Member Functions | |
| bool | startElement (const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts) |
| Start element. | |
| bool | endElement (const QString &namespaceURI, const QString &localName, const QString &qName) |
| End element. | |
| bool | characters (const QString &ch) |
| Characters. | |
| bool | fatalError (const QXmlParseException &exception) |
| Error handler. | |
| attrmode | toAttrMode (const QString &mode) |
| Converter. | |
Private Attributes | |
| KockpitMap * | kmap |
| Object which is will be mapped on based on the configuration file. | |
| QString | currentText |
| Text between tags. | |
| objtype | type |
| Object Type of the object given by the constructor parameter. | |
Mapping file reading class.
This class is needed to read mapping
| XMLMapReader::XMLMapReader | ( | KockpitMap * | kmap, | |
| QObject * | parent = 0 | |||
| ) |
Constructor.
| kmap | KockpitMap for which the mapping file should be used. | |
| parent | Parent Object. |
| virtual XMLMapReader::~XMLMapReader | ( | ) | [inline, virtual] |
Destructor.
| bool XMLMapReader::characters | ( | const QString & | ch | ) | [protected] |
Characters.
The function is needed to parse the text between xml tags.
| ch | String between tags |
| bool XMLMapReader::endElement | ( | const QString & | namespaceURI, | |
| const QString & | localName, | |||
| const QString & | qName | |||
| ) | [protected] |
End element.
The reader calls this function when it has parsed a end element tag.
| namespaceURI | Namespace URI. | |
| localName | Local name. | |
| qName | Qualified name. |
| bool XMLMapReader::fatalError | ( | const QXmlParseException & | exception | ) | [protected] |
Error handler.
The function is needed to parse the text between xml tags.
| exception | String between tags |
| bool XMLMapReader::readFile | ( | const QString & | fileName | ) |
Read file.
If this function is called the specified configuration file will be read.
| fileName | Path to configuration file |
| bool XMLMapReader::startElement | ( | const QString & | namespaceURI, | |
| const QString & | localName, | |||
| const QString & | qName, | |||
| const QXmlAttributes & | atts | |||
| ) | [protected] |
Start element.
The reader calls this function when it has parsed a start element tag.
| namespaceURI | Namespace URI. | |
| localName | Local name. | |
| qName | Qualified name. | |
| atts | Attributes. |
| attrmode XMLMapReader::toAttrMode | ( | const QString & | mode | ) | [protected] |
Converter.
Convert a given String to attribute mode
| mode | String representaion of attribute mode. |
QString XMLMapReader::currentText [private] |
Text between tags.
KockpitMap* XMLMapReader::kmap [private] |
Object which is will be mapped on based on the configuration file.
objtype XMLMapReader::type [private] |
Object Type of the object given by the constructor parameter.
1.6.3