Configuration file reading class. More...
#include <xmlconfigreader.h>

Public Member Functions | |
| XMLConfigReader (KockpitAuthObj &auth, KockpitBaseObj &user, KockpitBaseObj &group, QString *plugInPath, QString *scriptPath, QObject *parent=0) | |
| Constructor. | |
| virtual | ~XMLConfigReader () |
| 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. | |
Private Attributes | |
| QString | currentText |
| Text between tags. | |
| QString * | plugInPath |
| Pointer to plugin path - will be filled with configuration file entry. | |
| QString * | scriptPath |
| Pointer to script path - will be filled with configuration file entry. | |
| KockpitBaseObj * | user |
| Pointer to object with backend information associated with a KockpitUser object - will be filled with configuration file entry. | |
| KockpitBaseObj * | group |
| Pointer to object with backend information associated with a KockpitGroup object - will be filled with configuration file entry. | |
| KockpitAuthObj * | auth |
| Pointer to object with authentication information. | |
| KockpitBaseObj * | currentObj |
| Needed for internal use the separate KockpitBaseObj objects. | |
Configuration file reading class.
This class is needed to read configuration files for the main application and plugins. The configuration files need to have a special format and are validated by XML schema.
| XMLConfigReader::XMLConfigReader | ( | KockpitAuthObj & | auth, | |
| KockpitBaseObj & | user, | |||
| KockpitBaseObj & | group, | |||
| QString * | plugInPath, | |||
| QString * | scriptPath, | |||
| QObject * | parent = 0 | |||
| ) |
Constructor.
| auth | Will be filled with configuration files entries. | |
| user | Will be filled with configuration files entries. | |
| group | Will be filled with configuration files entries. | |
| plugInPath | Will be filled with configuration file entries. | |
| scriptPath | Will be filled with configuration file entries. | |
| parent | Parent Object. |
| virtual XMLConfigReader::~XMLConfigReader | ( | ) | [inline, virtual] |
Destructor.
| bool XMLConfigReader::characters | ( | const QString & | ch | ) | [protected] |
Characters.
The function is needed to parse the text between xml tags.
| ch | String between tags |
| bool XMLConfigReader::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 XMLConfigReader::fatalError | ( | const QXmlParseException & | exception | ) | [protected] |
Error handler.
The function is needed to parse the text between xml tags.
| exception | String between tags |
| bool XMLConfigReader::readFile | ( | const QString & | fileName | ) |
Read file.
If this function is called the specified configuration file will be read.
| fileName | Path to configuration file |
| bool XMLConfigReader::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. |
KockpitAuthObj* XMLConfigReader::auth [private] |
Pointer to object with authentication information.
KockpitBaseObj* XMLConfigReader::currentObj [private] |
Needed for internal use the separate KockpitBaseObj objects.
QString XMLConfigReader::currentText [private] |
Text between tags.
KockpitBaseObj* XMLConfigReader::group [private] |
Pointer to object with backend information associated with a KockpitGroup object - will be filled with configuration file entry.
QString* XMLConfigReader::plugInPath [private] |
Pointer to plugin path - will be filled with configuration file entry.
QString* XMLConfigReader::scriptPath [private] |
Pointer to script path - will be filled with configuration file entry.
KockpitBaseObj* XMLConfigReader::user [private] |
Pointer to object with backend information associated with a KockpitUser object - will be filled with configuration file entry.
1.6.3