DomAccessibleState Class Reference

The DomAccessibleState class provides an interface for extracting and initialising an object's state as and to an XML DOM element. More...

#include <domaccessiblestate.h>

Inheritance diagram for DomAccessibleState:

AbstractElement AbstractElementAttribute Doc AbstractDiagramElement AbstractDiagramElementAttribute AbstractElementByteArray AbstractElementDouble AbstractElementInteger AbstractElementString AttributeDoc DiagramGesture DiagramPolygon DiagramPolyline DiagramShape DiagramText DiagramElementCiderInfo DiagramElementComment DiagramElementInk DiagramElementLabel DiagramElementOrigin DiagramElementPolygon DiagramElementPos DiagramElementRect DiagramElementShape DiagramElementSize ElementDoc List of all members.

Public Types

enum  InitMode { InitStructure = 0x1, InitStates = 0x2, AttemptInitAll = (InitStructure | InitStates) }

Public Member Functions

 Q_DECLARE_FLAGS (InitModeFlags, InitMode)
virtual ~DomAccessibleState ()
virtual const QByteArray & key () const=0
virtual QDomElement domElement (QDomDocument &doc) const
virtual void initFromDomElement (const QDomElement &element, InitModeFlags modeFlags)

Detailed Description

The DomAccessibleState class provides an interface for extracting and initialising an object's state as and to an XML DOM element.


Member Enumeration Documentation

enum DomAccessibleState::InitMode

Enumerator:
InitStructure 
InitStates  Use this for building the object structure.
AttemptInitAll  Use this for states and inter-object refs.


Constructor & Destructor Documentation

virtual DomAccessibleState::~DomAccessibleState (  )  [inline, virtual]


Member Function Documentation

DomAccessibleState::Q_DECLARE_FLAGS ( InitModeFlags  ,
InitMode   
)

virtual const QByteArray& DomAccessibleState::key (  )  const [pure virtual]

Having this method as pure-virtual forces sub-classes to implement it, which is a requirement for both it and ther other methods to work correctly.

Sub-classes must return their version of classKey().

Implemented in AbstractElement, and Doc.

QDomElement DomAccessibleState::domElement ( QDomDocument &  doc  )  const [virtual]

Creates an XML QDomElement that represents the DomAccessibleState.

Use initFromDOMElement() to restore the DomAccessibleState state from the resulting QDomElement.

Reimplemented in AbstractElement, AbstractElementAttribute, Doc, and ElementDoc.

void DomAccessibleState::initFromDomElement ( const QDomElement &  e,
InitModeFlags  modeFlags 
) [virtual]

Restore the DomAccessibleState state from a QDomElement created by domElement().

The "mode" parameter is essential when dealing with models that have objects that refer to other objects, such as in graphs. In this case, this method should first be called with mode=InitStructure, where the objects are created and then again with mode=InitStates, where the inter-object references are then set.

Note: Returns immediately if e.tagName() != typeName().

Reimplemented in AbstractElement, AbstractElementAttribute, Doc, and ElementDoc.


The documentation for this class was generated from the following files:
Generated on Mon Jul 30 09:46:52 2007 for Digest by  doxygen 1.5.2