Table of Contents

Class: Wizards ./Wizards/Wizard.py

Class implementing the highlevel wizard functions.

Base Classes   
QObject
Methods   
__init__
getCurrentEditor
init
initMenu
parseWizardConfig
  __init__ 
__init__ (
        self,
        loc,
        parent=None,
        )

Constructor

Arguments

loc
the localizer string as determined by the main script (string)
  getCurrentEditor 
getCurrentEditor ( self )

Public method to get a reference to the current editor.

Returns

the current editor

  init 
init ( self )

Private method to register all the wizards.

  initMenu 
initMenu ( self )

Public slot to initialize the wizards menu.

Returns

the generated menu

  parseWizardConfig 
parseWizardConfig ( self,  fn )

Private method used to parse a wizards config file.

The files have to be installed in the Wizards subdirectory of the eric3 installation directory. The order of the files in the directory will determine the structure of the Wizards menu. The files have the following structure.

Lines beginning with # are comments and will be ignored. Lines beginning with these keyword will be processed. IMPORT: This names the module to be imported. CLASS: This names the class TRANSLATIONS: This names the basename of the translation files.

All keywords are separated by = from their respective values.

IMPORT and CLASS are mandatory, TRANSLATIONS is optional.

An IMPORT value of Separator will yield a separator line in the Wizards menu.

The value of the TRANSLATIONS key 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.

The method returns a tuple of four values, the value of the IMPORT key, the value of the CLASS key, the value of the TRANSLATIONS key and a status value.

Arguments

fn
filename of the wizards config file

Returns

tuple of four 3 strings and a boolean (module to be imported, class to be imported, basename of the translator file, flag indicating success)


Table of Contents

This document was automatically generated on Fri Mar 14 19:55:01 2003 by HappyDoc version 2.1