lib Library API Documentation

KoOasisSettings Class Reference

Parse settings.xml file. More...

#include <koOasisSettings.h>

Collaboration diagram for KoOasisSettings:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 KoOasisSettings (const QDomDocument &doc)
 KoOasisSettings (const QDomDocument &doc, const char *officeNSURI, const char *configNSURI)
Items itemSet (const QString &itemSetName) const

Friends

class Items
class IndexedMap
class NamedMap

Classes

class  Items
 Represents a collection of items (config-item or maps). More...
class  Map
 Internal base class for IndexedMap and NamedMap. More...

Detailed Description

Parse settings.xml file.

This class helps parsing the settings.xml file of an OASIS document.

For reference, the structure of settings.xml looks like:

   <office:settings>
      <config:config-item-set config:name="configure-settings">
      ....
      </config:config-item-set>
      <config:config-item-set config:name="view-settings">
         <config:config-item-map-indexed config:name="Views">
           <config:config-item-map-entry>
             <config:config-item config:name="SnapLinesDrawing" config:type="string">value</config:config-item>
               ....
                <config:config-item-map-named config:name="Tables">
                  <config:config-item-map-entry config:name="Sheet1">
                    <config:config-item config:name="CursorPositionX">
                    ......
                  </config:config-item-map-entry>
                  <config:config-item-map-entry config:name="Sheet2">
                  ....
                  </config:config-item-map-entry>
                </config:config-item-map-named>
           .....
           </config:config-item-map-entry>
         </config:config-item-map-indexed>
         <config:config-item-map-indexed config:name="Interface">
         .......
         </config:config-item-map-indexed>
      </config:config-item-set>
   </office:settings>
 
Basically, an item-set is a set of named <config-item>s and/or maps. There are two kinds of maps (by-index or by-name), and entries in the maps contain <config-item>s too, or nested maps.

The API of KoOasisSettings allows the caller to look for a given item-set or item-map once, and then lookup multiple items inside it. It also allows "drilling down" inside the tree in case of nesting.

Definition at line 70 of file koOasisSettings.h.


Constructor & Destructor Documentation

KoOasisSettings::KoOasisSettings const QDomDocument doc  )  [explicit]
 

Normal KoOasisSettings constructor, for an OASIS settings.xml.

Definition at line 25 of file koOasisSettings.cc.

KoOasisSettings::KoOasisSettings const QDomDocument doc,
const char *  officeNSURI,
const char *  configNSURI
 

KoOasisSettings constructor for an OpenOffice-1.1 file.

Definition at line 34 of file koOasisSettings.cc.


Member Function Documentation

KoOasisSettings::Items KoOasisSettings::itemSet const QString itemSetName  )  const
 

Returns the toplevel item-set named itemSetName.

If not found, the returned items instance is null.

Definition at line 43 of file koOasisSettings.cc.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for lib Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:41:04 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003