eric3.Wizards.WizardHandler

Module implementing the handler class for reading an XML project session file.

Classes

WizardHandler Class implementing a sax handler to read an XML project session file.

Functions

None

WizardHandler

Class implementing a sax handler to read an XML project session file.

The wizards configuration file must have a <Wizards></Wizards> entry per wizard. Each of these entries must have the following sections.

<Import>: This names the module to be imported.
<Class>: This names the class.
<Translations>: This names the basename of the translation files.

Import and Class are mandatory, Translations is optional.

The value of the Translations section will be combined with the location string determined at startup time and be given an extension of '.qm' to yield the filename to be loaded into a QTranslator object.

An entry of <Separator /> will yield a separator line in the Wizards menu.

Derived from

XMLSAXHandler

Methods

WizardHandler Constructor
characters Handler called for ordinary text.
defaultEndElement Handler method for the common end tags.
defaultStartElement Handler method for common start tags.
endClass Handler method for the "Class" end tag.
endElement Handler called, when an ending tag is found.
endImport Handler method for the "Import" end tag.
endTranslations Handler method for the "Translations" end tag.
endWizard Handler method for the "Wizard" end tag.
startDocument Handler called, when the document parsing is started.
startElement Handler called, when a starting tag is found.
startSeparator Handler method for the "Separator" start tag.
startWizard Handler method for the "Wizard" start tag.
unescape Private method used to unescape certain characters.
utf8_to_code Private method to convert a string to unicode and encode it for XML.

WizardHandler (Constructor)

WizardHandler(wizards, wizdir, locale)

Constructor

locale
locale string used for translations
wizards
reference to the Wizard manager
wizdir
directory containing the wizards

WizardHandler.characters

characters(chars)

Handler called for ordinary text.

chars
the scanned text (string)

WizardHandler.defaultEndElement

defaultEndElement()

Handler method for the common end tags.

WizardHandler.defaultStartElement

defaultStartElement(attrs)

Handler method for common start tags.

attrs
list of tag attributes

WizardHandler.endClass

endClass()

Handler method for the "Class" end tag.

WizardHandler.endElement

endElement(name)

Handler called, when an ending tag is found.

name
name of the tag (string)

WizardHandler.endImport

endImport()

Handler method for the "Import" end tag.

WizardHandler.endTranslations

endTranslations()

Handler method for the "Translations" end tag.

WizardHandler.endWizard

endWizard()

Handler method for the "Wizard" end tag.

WizardHandler.startDocument

startDocument()

Handler called, when the document parsing is started.

WizardHandler.startElement

startElement(name, attrs)

Handler called, when a starting tag is found.

attrs
list of tag attributes
name
name of the tag (string)

WizardHandler.startSeparator

startSeparator(attrs)

Handler method for the "Separator" start tag.

attrs
list of tag attributes

WizardHandler.startWizard

startWizard(attrs)

Handler method for the "Wizard" start tag.

attrs
list of tag attributes

WizardHandler.unescape

unescape(text)

Private method used to unescape certain characters.

text
the text to unescape (string)

WizardHandler.utf8_to_code

utf8_to_code(text)

Private method to convert a string to unicode and encode it for XML.

text
the text to encode (string)

Up