Package flumotion :: Package admin :: Package gtk :: Module wizard :: Class Wizard
[hide private]

Class Wizard

source code

     gobject.GObject --+    
                       |    
ui.glade.GladeBacked --+    
                       |    
    ui.glade.GladeWindow --+
                           |
                          Wizard


A generic wizard.

This wizard runs its own GObject main loop.
The wizard is run with the run() method.

Example:
  w = Wizard('foo', 'first-step', FirstStep)
  w.show()
  w.run() => {'bank-account': 'foo'}

Instance Methods [hide private]
 
__init__(self, initial_page) source code
 
_setup_ui(self) source code
 
set_page(self, name) source code
 
on_delete_event(self, *window) source code
 
on_next(self, button) source code
 
on_prev(self, button) source code
 
set_sensitive(self, is_sensitive) source code
 
run(self)
Run in a recursive main loop.
source code
 
run_async(self)
Show the wizard.
source code

Inherited from ui.glade.GladeWindow: connect_signal, destroy, with_blocked_signal

Class Variables [hide private]
  name = None
  steps = []
str glade_file = 'admin-wizard.glade'
filename of glade file containing the interface
  page = None
  page_stack = []
  pages = {}
  state = {}

Inherited from ui.glade.GladeWindow: interesting_signals, window

Inherited from ui.glade.GladeBacked (private): _window

Instance Variables [hide private]

Inherited from ui.glade.GladeBacked: glade_dir, glade_typedict, widgets

Method Details [hide private]

__init__(self, initial_page)
(Constructor)

source code 
Parameters:
  • initial_page (str) - name of the WizardStep to start on
Overrides: ui.glade.GladeBacked.__init__

run(self)

source code 

Run in a recursive main loop. Will block until the user finishes or closes the wizard.

run_async(self)

source code 

Show the wizard. Returns a deferred that fires when the user has closed the wizard, either via completing the process or has cancelled somehow.

Returns:
a deferred that will fire the state dict accumulated by the pages, or None on cancel