Package flumotion :: Package wizard :: Module configurationwizard :: Class ConfigurationWizard
[hide private]

Class ConfigurationWizard

source code

             object --+                            
                      |                            
        gobject.GObject --+                        
                          |                        
    kiwi.ui.views.SlaveView --+                    
                              |                    
         kiwi.ui.views.BaseView --+                
                                  |                
kiwi.controllers.BaseController --+                
                                  |                
    kiwi.ui.delegates.GladeDelegate --+            
                                      |            
                   ui.glade.GladeBacked --+        
                                          |        
                       ui.glade.GladeWindow --+    
                                              |    
                    extern.log.log.Loggable --+    
                                              |    
                        ui.wizard.SectionWizard --+
                                                  |
                                                 ConfigurationWizard
Known Subclasses:

Instance Methods [hide private]
 
__init__(self, parent=None)
Creates a new GladeDelegate.
source code
 
completed(self) source code
 
destroy(self) source code
 
beforeShowStep(self, step) source code
 
prepareNextStep(self, step) source code
 
blockNext(self, block) source code
 
addSteps(self)
Add the step sections of the wizard, can be overridden in a subclass
source code
 
setScenario(self, scenario)
Sets the current scenario of the wizard.
source code
a flumotion.wizard.scenarios.Scenario subclass
getScenario(self)
Fetches the currently set scenario of the wizard.
source code
 
setWorkerHeavenState(self, workerHeavenState)
Sets the worker heaven state of the wizard
source code
 
setAdminModel(self, adminModel)
Sets the admin model of the wizard
source code
 
getAdminModel(self)
Gets the admin model of the wizard
source code
 
waitForTask(self, taskName)
Instruct the wizard that we're waiting for a task to be finished.
source code
 
taskFinished(self, blockNext=False)
Instruct the wizard that a task was finished.
source code
bool
pendingTask(self)
Returns true if there are any pending tasks
source code
bool
hasAudio(self)
If the configured feed has a audio stream
source code
bool
hasVideo(self)
If the configured feed has a video stream
source code
flumotion.wizard.models.AudioProducer
getAudioProducer(self)
Returns the selected audio producer or None
source code
flumotion.wizard.models.VideoProducer
getVideoProducer(self)
Returns the selected video producer or None
source code
 
setHTTPPorter(self, httpPorter)
Sets the HTTP porter of the wizard.
source code
 
getHTTPPorter(self) source code
twisted.internet.defer.Deferred
checkElements(self, workerName, *elementNames)
Check if the given list of GStreamer elements exist on the given worker.
source code
deferred -> list of strings
requireElements(self, workerName, *elementNames)
Require that the given list of GStreamer elements exists on the given worker.
source code
twisted.internet.defer.Deferred
checkImport(self, workerName, moduleName)
Check if the given module can be imported.
source code
twisted.internet.defer.Deferred
requireImport(self, workerName, moduleName, projectName=None, projectURL=None)
Require that the given module can be imported on the given worker.
source code
twisted.internet.defer.Deferred
runInWorker(self, workerName, moduleName, functionName, *args, **kwargs)
Run the given function and arguments on the selected worker.
source code
twisted.internet.defer.Deferred
getWizardEntry(self, componentType)
Fetches a wizard bundle from a specific kind of component
source code
twisted.internet.defer.Deferred
getWizardPlugEntry(self, plugType)
Fetches a wizard bundle from a specific kind of plug
source code
twisted.internet.defer.Deferred
getWizardEntries(self, wizardTypes=None, provides=None, accepts=None)
Queries the manager for a list of wizard entries matching the query.
source code
 
setExistingComponentNames(self, componentNames)
Tells the wizard about the existing components available, so we can resolve naming conflicts when saving the configuration
source code
 
workerChangedForStep(self, step, workerName)
Tell a step that its worker changed.
source code
 
_gotEntryPoint(self, (filename, procname)) source code
 
_setupWorker(self, step, worker) source code
 
on_combobox_worker_changed(self, combobox, worker) source code

Inherited from ui.wizard.SectionWizard: __len__, __nonzero__, addStepSection, add_msg, cleanFutureSteps, clear_msg, finish, getCurrentStep, getStep, getVisitedSteps, goNext, hasStep, hide, on_button_next_clicked, on_button_prev_clicked, on_sidebar_step_chosen, on_window_delete_event, on_window_destroy, on_window_realize, packStep, run, updateButtons

Inherited from ui.wizard.SectionWizard (private): _setStepIcon, _setStepTitle

Inherited from kiwi.ui.views.BaseView: check_focus, get_focus_widget, get_glade_adaptor, hide_and_quit, quit_if_last, set_title, set_transient_for, show, show_all

Inherited from kiwi.ui.views.BaseView (private): _attach_callbacks, _setup_keypress_handler

Inherited from kiwi.ui.views.SlaveView: add_proxy, attach_slave, check_and_notify_validity, connect_multiple, detach_slave, disconnect_autoconnected, focus_toplevel, focus_topmost, force_validation, get_sizegroups, get_slave, get_toplevel, get_topmost_widget, get_widget, handler_block, handler_unblock, on_attach, on_startup, register_validate_function, set_controller, show_and_loop

Inherited from kiwi.ui.views.SlaveView (private): _attach_groups, _check_reserved, _get_notebooks, _get_toplevel, _merge_sizegroup, _on_child__validation_changed, _on_notebook_slave__validation_changed

Inherited from gobject.GObject: __cmp__, __delattr__, __gdoc__, __gobject_init__, __hash__, __new__, __repr__, __setattr__, chain, connect, connect_after, connect_object, connect_object_after, disconnect, disconnect_by_func, emit, emit_stop_by_name, freeze_notify, get_data, get_properties, get_property, handler_block_by_func, handler_disconnect, handler_is_connected, handler_unblock_by_func, notify, props, set_data, set_properties, set_property, stop_emission, thaw_notify, weak_ref

Inherited from object: __getattribute__, __reduce__, __reduce_ex__, __str__

Inherited from kiwi.controllers.BaseController: get_parent, get_view, on_key_press, set_keyactions, set_parent, set_view, update_keyactions

Inherited from kiwi.controllers.BaseController (private): _get_all_methods

Inherited from extern.log.log.Loggable: __providedBy__, debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure, writeMarker

Class Variables [hide private]
  __gtype__ = <GType flumotion+wizard+configurationwizard+Config...

Inherited from ui.wizard.SectionWizard: gladeFile, logCategory

Inherited from ui.glade.GladeBacked: toplevel_name

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

Inherited from kiwi.ui.views.SlaveView: controller, domain, gladefile, toplevel

Inherited from kiwi.controllers.BaseController: view

Inherited from extern.log.log.Loggable: __implemented__, __provides__

Instance Variables [hide private]

Inherited from ui.glade.GladeWindow: window

Inherited from ui.glade.GladeBacked: gladeTypedict, widgets

Properties [hide private]

Inherited from gobject.GObject: __grefcount__

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent=None)
(Constructor)

source code 

Creates a new GladeDelegate. The keyactions parameter is sent to kiwi.controllers.BaseController, the rest are sent to kiwi.ui.views.BaseView

Overrides: kiwi.controllers.BaseController.__init__
(inherited documentation)

completed(self)

source code 
Overrides: ui.wizard.SectionWizard.completed

destroy(self)

source code 
Overrides: ui.glade.GladeWindow.destroy

beforeShowStep(self, step)

source code 
Overrides: ui.wizard.SectionWizard.beforeShowStep

blockNext(self, block)

source code 
Overrides: ui.wizard.SectionWizard.blockNext

setScenario(self, scenario)

source code 

Sets the current scenario of the wizard. Normally called by ScenarioStep to tell the wizard the current scenario just after creating it.

Parameters:

setWorkerHeavenState(self, workerHeavenState)

source code 

Sets the worker heaven state of the wizard

Parameters:

setAdminModel(self, adminModel)

source code 

Sets the admin model of the wizard

Parameters:

waitForTask(self, taskName)

source code 

Instruct the wizard that we're waiting for a task to be finished. This changes the cursor and prevents the user from continuing moving forward. Each call to this method should have another call to taskFinished() when the task is actually done.

Parameters:
  • taskName (string) - name of the name

taskFinished(self, blockNext=False)

source code 

Instruct the wizard that a task was finished.

Parameters:
  • blockNext (boolean) - if we should still next when done

pendingTask(self)

source code 

Returns true if there are any pending tasks

Returns: bool
if there are pending tasks

hasAudio(self)

source code 

If the configured feed has a audio stream

Returns: bool
if we have audio

hasVideo(self)

source code 

If the configured feed has a video stream

Returns: bool
if we have video

getAudioProducer(self)

source code 

Returns the selected audio producer or None

Returns: flumotion.wizard.models.AudioProducer
producer or None

getVideoProducer(self)

source code 

Returns the selected video producer or None

Returns: flumotion.wizard.models.VideoProducer
producer or None

setHTTPPorter(self, httpPorter)

source code 

Sets the HTTP porter of the wizard. If the http port set in the new wizard is identical to the old one, this porter will be reused

Parameters:

checkElements(self, workerName, *elementNames)

source code 

Check if the given list of GStreamer elements exist on the given worker.

Parameters:
  • workerName (string) - name of the worker to check on
  • elementNames (list of strings) - names of the elements to check
Returns: twisted.internet.defer.Deferred
a deferred returning a tuple of the missing elements

requireElements(self, workerName, *elementNames)

source code 

Require that the given list of GStreamer elements exists on the given worker. If the elements do not exist, an error message is posted and the next button remains blocked.

Parameters:
  • workerName (string) - name of the worker to check on
  • elementNames (list of strings) - names of the elements to check
Returns: deferred -> list of strings
element name

checkImport(self, workerName, moduleName)

source code 

Check if the given module can be imported.

Parameters:
  • workerName (string) - name of the worker to check on
  • moduleName (string) - name of the module to import
Returns: twisted.internet.defer.Deferred
a deferred firing None or Failure.

requireImport(self, workerName, moduleName, projectName=None, projectURL=None)

source code 

Require that the given module can be imported on the given worker. If the module cannot be imported, an error message is posted and the next button remains blocked.

Parameters:
  • workerName (string) - name of the worker to check on
  • moduleName (string) - name of the module to import
  • projectName (string) - name of the module to import
  • projectURL (string) - URL of the project
Returns: twisted.internet.defer.Deferred
a deferred firing None or Failure

runInWorker(self, workerName, moduleName, functionName, *args, **kwargs)

source code 

Run the given function and arguments on the selected worker. The given function should return a messages.Result.

Parameters:
  • workerName (string) - name of the worker to run the function in
  • moduleName (string) - name of the module where the function is found
  • functionName (string) - name of the function to run
Returns: twisted.internet.defer.Deferred
a deferred firing the Result's value.

getWizardEntry(self, componentType)

source code 

Fetches a wizard bundle from a specific kind of component

Parameters:
  • componentType (string) - the component type to get the wizard entry bundle from.
Returns: twisted.internet.defer.Deferred
a deferred returning either:
 - factory of the component
 - noBundle error: if the component lacks a wizard bundle

getWizardPlugEntry(self, plugType)

source code 

Fetches a wizard bundle from a specific kind of plug

Parameters:
  • plugType (string) - the plug type to get the wizard entry bundle from.
Returns: twisted.internet.defer.Deferred
a deferred returning either:
 - factory of the plug
 - noBundle error: if the plug lacks a wizard bundle

getWizardEntries(self, wizardTypes=None, provides=None, accepts=None)

source code 

Queries the manager for a list of wizard entries matching the query.

Parameters:
  • wizardTypes (list of str) - list of component types to fetch, is usually something like ['video-producer'] or ['audio-encoder']
  • provides (list of str) - formats provided, eg ['jpeg', 'speex']
  • accepts (list of str) - formats accepted, eg ['theora']
Returns: twisted.internet.defer.Deferred
a deferred firing a list of flumotion.common.componentui.WizardEntryState

setExistingComponentNames(self, componentNames)

source code 

Tells the wizard about the existing components available, so we can resolve naming conflicts when saving the configuration

Parameters:
  • componentNames (list of strings) - existing component names

workerChangedForStep(self, step, workerName)

source code 

Tell a step that its worker changed.

Parameters:
  • step (a WorkerWizardStep subclass) - step which worker changed for
  • workerName (string) - name of the worker

Class Variable Details [hide private]

__gtype__

Value:
<GType flumotion+wizard+configurationwizard+ConfigurationWizard (15152\
7576)>