Package Camelot :: Package camelot :: Package admin :: Package form_action :: Class FormAction
[frames] | no frames]

Class FormAction

source code


Abstract base class to implement form actions
Instance Methods
 
__init__(self, name, icon=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
get_name(self) source code
 
get_icon(self) source code
 
render(*args, **kwargs)
Returns a QWidget the user can use to trigger the action
source code
 
run(*args, **kwargs)
Overwrite this method to create an action that does something
source code
 
enabled(*args, **kwargs)
Overwrite this method to have the action only enabled for certain states of the entity displayed :param entity: the entity currently in the form view :return: True or False, returns True by default
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, name, icon=None)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Parameters:
  • name - the name used in the button to trigger the action
  • icon - Icon to be used in the button to trigger the action
Overrides: object.__init__

render(*args, **kwargs)

source code 
Returns a QWidget the user can use to trigger the action
Decorators:
  • @gui_function

run(*args, **kwargs)

source code 
Overwrite this method to create an action that does something
Decorators:
  • @gui_function

enabled(*args, **kwargs)

source code 
Overwrite this method to have the action only enabled for certain states of the entity displayed :param entity: the entity currently in the form view :return: True or False, returns True by default
Decorators:
  • @model_function